Skip to content

Support NEST 3.11 in the PyNN NEST extensions - #870

Open
apdavison wants to merge 1 commit into
NeuralEnsemble:masterfrom
apdavison:nest-3.11
Open

apdavison wants to merge 1 commit into
NeuralEnsemble:masterfrom
apdavison:nest-3.11

Conversation

@apdavison

Copy link
Copy Markdown
Member

NEST 3.11 changes the C++ synapse API: nest::Connection takes a second template parameter (the delay type, e.g. nest::TotalDelay), and check_connection() takes an additional syn_id argument. As a result, the pynn_extensions module (simple_stochastic_synapse, stochastic_stp_synapse) does not compile against NEST 3.11.

Here, we add a small header, nest_compat.h, which detects NEST ≥ 3.11 and provides a pynn::NestConnection<T> alias for the appropriate base class. check_connection() has a version for each API. NEST provides only a version string, not numeric version macros, so detection uses __has_include("delay_types.h"), a header introduced in 3.11. The extensions still build against earlier NEST versions.

We also remove -Dwith-python=ON from the Makefile. The option no longer exists in NEST 3.11, which now treats unknown CMake options as errors. It defaulted to ON in earlier versions.

Tested with NEST 3.11.0rc1, NEURON 9.0.2, Brian2 2.11.0 and Arbor 0.12.2 on macOS (arm64): 957 passed, 2 failed. The two failures are in test/system/test_nest_nestml.py. Synapse code generated by NESTML 9.0.1 has the same incompatibility with the NEST 3.11 Connection API, so this needs fixing in NESTML. With NEST 3.10.0, the extensions build and test/system/test_nest.py passes.

Notes for building NEST 3.11.0rc1 with the Makefile:

  • Boost is now enabled by default; pass -Dwith-boost=OFF via EXTRA_CMAKE_ARGS if it is not installed.
  • -DCMAKE_PREFIX_PATH=... is rejected as an unknown option unless given a type: -DCMAKE_PREFIX_PATH:PATH=....

NEST 3.11 adds a delay-type template parameter to nest::Connection and a syn_id argument to check_connection(). NEST has no numeric version macros, so nest_compat.h detects 3.11+ by the presence of delay_types.h, which first appears in that release.

The with-python CMake option was removed in NEST 3.11, which now rejects unknown options; it defaulted to ON in earlier versions.

Verified that the extensions build and test_nest.py passes against both NEST 3.10.0 and 3.11.0rc1.
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 74.2%. remained the same — apdavison:nest-3.11 into NeuralEnsemble:master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants