dbbs-lab / bsb-neuron

NEURON simulation adapter for the BSB framework
GNU General Public License v3.0
0 stars 0 forks source link

Fixed GID assignment to transmitters involved in multiple connectivity sets #15

Closed danilobenozzo closed 1 day ago

danilobenozzo commented 2 months ago

For each connectivity set, kept track of GIDs grouped by pre-synaptic cell type. If a pre-synaptic cell already has a GID for [cell, branch], it is re-used in the case of multiple synapses.

Helveg commented 2 months ago

The tests also show that somehow you're now placing transmitters with duplicate GIDs. I think more tests are the only way out of this precarious mess.

If you have any deadlines that depend on this code, perhaps you can use a fork with your previous code (which seemed to work? At least it didn't break the existing tests) and then at a later point you can finish this PR with the optimal implementation.

Helveg commented 2 months ago

@filimarc @danilobenozzo could you add at least add a couple of test cases that test correct GID assigment and transmitter placement for single/multiple conn models with overlapping cell types etc?

danilobenozzo commented 1 month ago

yeah.. new config files are not being found. I added them https://github.com/dbbs-lab/bsb-test/pull/7#issue-2445315781 isn't this enough?

filimarc commented 1 month ago

Hi, i will publish the bsb-test package with your new config so github can dowload it with pip. Btw i tried to run test on my PC but it fails the 4chunck test. with mpirun -n 2 python -m unittest discover -v -s ./tests :

ok ok test_double_sim_minimal (test_neuron.TestNeuronMinimal) ... test_double_sim_minimal (test_neuron.TestNeuronMinimal) ... ok test_minimal (test_neuron.TestNeuronMinimal) ... ok test_minimal (test_neuron.TestNeuronMinimal) ... ok ok test_500ch_multibranch_manualconn (test_neuron.TestNeuronMultiBranch) Tests runnability of the NEURON adapter with 500 chunks filled with 12x3 single ... test_500ch_multibranch_manualconn (test_neuron.TestNeuronMultiBranch) Tests runnability of the NEURON adapter with 500 chunks filled with 12x3 single ... ? <bsb_hdf5.chunks.ChunkedCollection object at 0x7ec33fbecc40> ? <bsb_hdf5.chunks.ChunkedCollection object at 0x78fc4d22f880> ? <bsb_hdf5.chunks.ChunkedCollection object at 0x7ec33fbed030> ? <bsb_hdf5.chunks.ChunkedCollection object at 0x78fc4d22e770> ? <bsb_hdf5.chunks.ChunkedCollection object at 0x7ec33fbed120> ? <bsb_hdf5.chunks.ChunkedCollection object at 0x78fc4d22f5b0> ok ok test_500ch_manualloop (test_neuron.TestNeuronMultiBranchLoop) Tests runnability of the NEURON adapter with 500 chunks filled with 12x3 single ... test_500ch_manualloop (test_neuron.TestNeuronMultiBranchLoop) Tests runnability of the NEURON adapter with 500 chunks filled with 12x3 single ... ? <bsb_hdf5.chunks.ChunkedCollection object at 0x7ec33fb42500> ? <bsb_hdf5.chunks.ChunkedCollection object at 0x78fc50475570> ? <bsb_hdf5.chunks.ChunkedCollection object at 0x7ec33fb42c80> ? <bsb_hdf5.chunks.ChunkedCollection object at 0x78fc50475600> ? <bsb_hdf5.chunks.ChunkedCollection object at 0x7ec33fb42d70> ? <bsb_hdf5.chunks.ChunkedCollection object at 0x78fc505e0760> ok ok test_4ch_manual (test_neuron.TestNeuronMultichunk) Tests runnability of the NEURON adapter with 4 chunks filled with 12x3 single ... test_4ch_manual (test_neuron.TestNeuronMultichunk) Tests runnability of the NEURON adapter with 4 chunks filled with 12x3 single ... ? <bsb_hdf5.chunks.ChunkedCollection object at 0x7ec33882d090> ? <bsb_hdf5.chunks.ChunkedCollection object at 0x78fc504c17e0> ? <bsb_hdf5.chunks.ChunkedCollection object at 0x7ec33882c040> ? <bsb_hdf5.chunks.ChunkedCollection object at 0x78fc504c29e0> ? <bsb_hdf5.chunks.ChunkedCollection object at 0x7ec33882d570> ? <bsb_hdf5.chunks.ChunkedCollection object at 0x78fc504c2020> 0 NEURON: gid=0 already exists on this process as an output port 0 near line 0 0 ^ 0 ParallelContext[0].set_gid2node(0, 0)

danilobenozzo commented 1 month ago

@filimarc ok now it should work

Helveg commented 1 month ago

@filimarc please use code formatting: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks