Skip to content

Arbor backend: fixes from running the examples, MPI support, and documentation - #854

Merged
apdavison merged 7 commits into
NeuralEnsemble:masterfrom
apdavison:arbor-benchmark-fixes
Nov 15, 2026
Merged

apdavison merged 7 commits into
NeuralEnsemble:masterfrom
apdavison:arbor-benchmark-fixes

Conversation

@apdavison

Copy link
Copy Markdown
Member

Running examples/VAbenchmarks.py and the other examples with pyNN.arbor turned up a number of problems. This PR fixes them, adds support for distributed simulations, and adds a documentation page for the backend.

Bug fixes

  • Currently, all SpikeSourcePoisson sources use the same seed, so they emit identical spike trains. This is why the COBA benchmark barely fires on Arbor (0.4 Hz, against 15.8 Hz on NEST). Each source is now seeded from the simulator's rng_seed and its gid.
  • Random initial values are drawn when Arbor builds each cell, so they come out in Arbor's construction order rather than cell-index order. They are now evaluated when initialize() is called.
  • get_data() on a PopulationView returns every recorded cell, in arbitrary order; Projection.size() counts postsynaptic cells rather than connections; and Projection.connections yields postsynaptic indices rather than Connection objects, so Projection.get() fails.
  • The default synaptic delay is one time step, but Arbor requires delays of at least twice the time step, so any projection created without an explicit delay fails at run().

New features

  • Point neurons can record synaptic conductances and currents (gsyn_exc, gsyn_inh, <receptor>.gsyn, <receptor>.isyn) and the state variables of their dynamics (w, u, g_s, g_r).
  • Population.get() works for point neurons, and set() works before the simulation starts. Arbor builds its cells only once, so changing parameters after the first run() (currently silently ignored) now raises NotImplementedError.
  • setup() accepts threads and rng_seed, with the same names and defaults as pyNN.nest.
  • Distributed simulations with MPI. Cells are now distributed round-robin, as in the other backends, and Arbor is given the same decomposition. This needs an Arbor built with MPI and mpi4py support; the PyPI wheels have neither.
  • Projecting onto a cell type with no receptor types (Arbor's Izhikevich, whose voltage-step synapses a cable-cell mechanism cannot express) raises a ConnectionError instead of failing an assertion.

Test environment and documentation

  • make setup builds Arbor (ARBOR_VERSION, default 0.12.2) from source with MPI support, with new targets test-arbor, test-arbor-mpi and clean-arbor-catalogue. MPI_ROOT, which the Makefile uses but never defines, now defaults to the installation providing mpicc.
  • New page doc/backends/Arbor.txt, and the outdated installation warning that Arbor only supports multi-compartment models is replaced.

Testing

  • New cross-backend scenario tests for each fix, and Arbor enabled for the existing connector tests that now pass.
  • Full test suite locally (NEST 3.10, NEURON 9.0.1, Brian2 and Arbor 0.12.2): 902 passed, 21 skipped. Arbor tests also pass with Arbor 0.10.0, in the EBRAINS Software Distribution container.
  • VAbenchmarks.py on Arbor now matches NEST: synapse counts are identical, and the firing rates are close (COBA 15.3 Hz against 15.8 Hz).
  • With 1 and 4 MPI processes, VAbenchmarks.py (CUBA and COBA) gives identical spike trains and membrane potential traces, on both Arbor 0.10 and 0.12.2.

All SpikeSourcePoisson sources shared the same seed and so emitted identical spike trains, which is why the COBA benchmark barely fired on Arbor (0.4 Hz, against 15.8 Hz on NEST). Each source is now seeded from rng_seed and its gid.

Random initial values were drawn lazily as Arbor built each cell, so they came out in Arbor's construction order (reversed) and after the connector had used the same RNG.
…rons

Arbor 0.10 addresses point-mechanism probes by the target's index among the cell's synapse placements, and 0.12 by its label, hence the compatibility shim.

Arbor builds its cells once, at the first run(), so changing parameters after that used to be silently ignored; it now raises NotImplementedError.

Arbor's Izhikevich model has no receptor types, because its synapses are voltage steps, which a cable-cell mechanism cannot express.
…efault delay

Arbor requires delays of at least twice the time step, so with the old default (one time step) any projection without an explicit delay failed at run().
PyNN treated every cell as local on every rank, while Arbor distributed them with its own load balancer, so ranks asked for data on cells they weren't simulating and multi-process runs hung. Both now use the same round-robin distribution as the other backends.

Parameter values are still stored for all cells, because Arbor builds each cell from its index in the population.

Checked with VAbenchmarks: 1 and 4 processes give identical spike trains and membrane potential traces.
The PyPI wheels have no MPI support and there is no sdist for 0.12.2, so Arbor is built from the git tag. --no-build-isolation is needed for cmake to find the venv's mpi4py, and CXXFLAGS has to be the single token -includecstddef: "-include cstddef" ends up in Arbor's cmake config as a list and breaks arbor-build-catalogue.

Also gives MPI_ROOT, which was used but never defined, a default.
Also removes the outdated warning in the installation instructions that Arbor only supports multi-compartment models.
@coveralls

coveralls commented Nov 14, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 73.745% (+0.3%) from 73.42% — apdavison:arbor-benchmark-fixes into NeuralEnsemble:master

The Arbor tests enabled in this PR use `NumpyRNG`, which loads mpi4py's MPI module; mpi4py 4 raises `RuntimeError` (not `ImportError`) when no MPI library is installed.
@apdavison
apdavison merged commit 15150bf into NeuralEnsemble:master Nov 15, 2026
9 checks passed
@apdavison
apdavison deleted the arbor-benchmark-fixes branch November 15, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants