Skip to content

Commit 5f6ee92

Browse files
authored
Merge pull request #3747 from heplesser/extend_whats_new
Provide more information about changes introduced by PyNEST-NG
2 parents 56112bd + 9b25fd8 commit 5f6ee92

1 file changed

Lines changed: 102 additions & 23 deletions

File tree

doc/htmldoc/whats_new/v3.10/index.rst

Lines changed: 102 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ Configuration information
5858
+++++++++++++++++++++++++
5959

6060
Various information about NEST capabilities and properties that were previously accessible
61-
in varied ways are now collected in the `nest.build_info` dictionary:
61+
in varied ways are now collected in the ``nest.build_info`` dictionary:
6262

6363
.. code-block::
6464
65-
{'built': 'Dec 4 2025 05:31:32',
66-
'datadir': '<path>',
67-
'docdir': '<path>',
65+
{'built': 'Dec 4 2025 05:31:32',
66+
'datadir': '<path>',
67+
'docdir': '<path>',
6868
'exitcode': 0,
6969
'have_boost': True,
7070
'have_gsl': True,
@@ -74,17 +74,17 @@ in varied ways are now collected in the `nest.build_info` dictionary:
7474
'have_music': False,
7575
'have_sionlib': False,
7676
'have_threads': True,
77-
'host': 'arm64-apple-darwin',
78-
'hostcpu': 'arm64',
79-
'hostos': 'darwin',
80-
'hostvendor': 'apple',
81-
'mpiexec': '/opt/homebrew/bin/mpiexec',
82-
'mpiexec_max_numprocs': '12',
83-
'mpiexec_numproc_flag': '-n',
84-
'mpiexec_postflags': '',
85-
'mpiexec_preflags': '',
77+
'host': 'arm64-apple-darwin',
78+
'hostcpu': 'arm64',
79+
'hostos': 'darwin',
80+
'hostvendor': 'apple',
81+
'mpiexec': '/opt/homebrew/bin/mpiexec',
82+
'mpiexec_max_numprocs': '12',
83+
'mpiexec_numproc_flag': '-n',
84+
'mpiexec_postflags': '',
85+
'mpiexec_preflags': '',
8686
'ndebug': False,
87-
'prefix': '<path>',
87+
'prefix': '<path>',
8888
'test_exitcodes': {'abort': 134,
8989
'exception': 125,
9090
'fatal': 127,
@@ -99,14 +99,36 @@ in varied ways are now collected in the `nest.build_info` dictionary:
9999
'success': 0,
100100
'unknownerror': 10,
101101
'userabort': 15},
102-
'threads_model': 'openmp',
103-
'version': '3.9.0-post0.dev0'}
102+
'threads_model': 'openmp',
103+
'version': '3.9.0-post0.dev0'}
104+
105+
106+
Message mechanism
107+
+++++++++++++++++
108+
109+
The :py:func:`.message` function has received a slightly different user interface. Where you previously would write
110+
111+
.. code-block:: python
112+
113+
nest.message("M_INFO", "Building network")
114+
115+
you now simply write
116+
117+
.. code-block:: python
118+
119+
nest.message("Building network")
120+
121+
and the info-level severity is implicitly set. To control the severity-level of a message, use
122+
123+
.. code-block:: python
124+
125+
nest.message("The next operation may take a very long time", nest.VerbosityLevel.WARNING)
104126
105127
106128
Deprecated functions
107129
++++++++++++++++++++
108130

109-
We have also deprecated ``nest.GetStatus()`` and ``nest.SetStatus()``, so over time you may want to replace
131+
We have deprecated :py:func:`.GetStatus` and :py:func:`.SetStatus`, so over time you may want to replace
110132

111133
.. code-block:: python
112134
@@ -118,7 +140,12 @@ with
118140
119141
node_coll.get()
120142
121-
and correspondingly for connection collections and use `nest.get()/set()` for kernel status parameters.
143+
and correspondingly for connection collections and use :py:func:`.get` and :py:func:`.set` for kernel status parameters.
144+
145+
We also deprecated :py:func:`.GetLocalNodeCollection`, because working only on nodes local to a given MPI
146+
rank carries a high risk of writing incorrect code. If you think you need rank-specific code, rather get
147+
in touch with us to see if there is a better solution using (or extending) NEST's built-in mechanisms.
148+
122149

123150
No more SLI functions
124151
+++++++++++++++++++++
@@ -134,14 +161,15 @@ If you still have your network models implemented in SLI, it is time now to migr
134161
What does this mean for you as a developer?
135162
...........................................
136163

137-
The key change from a developer perspective are that the entire SLI interpreter code has been
164+
The key changes from a developer perspective are that the entire SLI interpreter code has been
138165
removed, noticeably reducing compile times. We therefore no longer have the ``SLIModule`` concept.
139-
Also, `Dictionary`, `Datum`, and `Token` are a matter of the past. Instead, we now
166+
Also, ``Dictionary``, ``Datum``, and ``Token`` are a matter of the past. Instead, we now
140167
have class ``Dictionary`` based directly on ``std::map`` using ``boost::any`` to store entries of
141168
arbitrary type. Instead of our own ``lockPTR``, we now use ``std::unique_ptr`` to manage objects with
142-
reference counting. Where changes are necessary in code for neuron or synapse models, they will
143-
likely be limited to slightly different notation in the ``set()/get()`` methods to support the new
144-
``Dictionary`` class.
169+
reference counting.
170+
171+
Catching errors
172+
+++++++++++++++
145173

146174
To test whether certain errors are raised when writing tests, instead of
147175

@@ -156,6 +184,57 @@ you now have
156184
with pytest.raises(nest.NESTErrors.IllegalConnection):
157185
158186
187+
Changes to neuron and synapse models (for developers)
188+
+++++++++++++++++++++++++++++++++++++++++++++++++++++
189+
190+
When developing C++ level implementations of neuron or synapse models,
191+
required changes in code will likely be limited to slightly different
192+
notation in the ``set()`` and ``get()`` methods to use the new
193+
``Dictionary`` class. As an example, consider ``aeif_cond_alpha``:
194+
195+
Old NEST
196+
^^^^^^^^
197+
198+
.. code-block:: C++
199+
200+
void
201+
nest::aeif_cond_alpha::Parameters_::get( DictionaryDatum& d ) const
202+
{
203+
def< double >( d, names::C_m, C_m );
204+
def< double >( d, names::V_th, V_th );
205+
// ...
206+
}
207+
208+
void
209+
nest::aeif_cond_alpha::Parameters_::set( const DictionaryDatum& d, Node* node )
210+
{
211+
updateValueParam< double >( d, names::V_th, V_th, node );
212+
updateValueParam< double >( d, names::V_peak, V_peak_, node );
213+
// ...
214+
}
215+
216+
New NEST
217+
^^^^^^^^
218+
219+
.. code-block:: C++
220+
221+
void
222+
nest::aeif_cond_alpha::Parameters_::get( Dictionary& d ) const
223+
{
224+
d[ names::C_m ] = C_m;
225+
d[ names::V_th ] = V_th;
226+
// ...
227+
}
228+
229+
void
230+
nest::aeif_cond_alpha::Parameters_::set( const Dictionary& d, Node* node )
231+
{
232+
update_value_param( d, names::V_th, V_th, node );
233+
update_value_param( d, names::V_peak, V_peak_, node );
234+
// ...
235+
}
236+
237+
159238
Model improvements
160239
------------------
161240

0 commit comments

Comments
 (0)