Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nest.simulate() doesn't complete with music support compiled in #958

Closed
permosegaard opened this issue May 24, 2018 · 3 comments
Closed
Assignees
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority T: External bug Not an issue that can be solved here. (May need documentation, though) ZC: Kernel DO NOT USE THIS LABEL ZP: Pending DO NOT USE THIS LABEL

Comments

@permosegaard
Copy link

permosegaard commented May 24, 2018

I'm having some issues trying to run nest with music, nest without music support seems to work well but as soon as I add in music support calls to nest.simulate() seem to never return and surprisingly that's with no music neurons defined in the code

The python process spins up to 100% cpu and never comes down so I assumed it was stuck in a tight loop. Running "perf" against the process it seems to be spending most of its time in "MUSIC::Scheduler::pushForward()" which wasn't as helpful as I was hoping.

Both music and nest are built from the current masters, openmpi is v3.1.0 and I have tried "--disable-isend" with music on the off chance this is related to music/#37

Here's my reduced test-case:
[root@alarmpi nest-music-test]# cat nest.music
[nest]
binary=./simulation.py
args=
wd=./
np=1

[root@alarmpi nest-music-test]# cat simulation.py
#!/usr/bin/env python

import nest

input_neurons = nest.Create("poisson_generator", 3)
state_neurons = nest.Create("iaf_psc_alpha", 1)
output_neurons = nest.Create("spike_detector", 3)

nest.Connect(input_neurons, state_neurons)
nest.Connect(state_neurons, output_neurons)

nest.Simulate(10)

[root@alarmpi nest-music-test]# mpirun --allow-run-as-root --timestamp-output --host localhost:1 -np 1 /opt/music/bin/music ./nest.music
Thu May 24 09:39:14 2018:[INFO] [2018.5.24 9:39:14 /root/nest-build/nest-simulator/nestkernel/rng_manager.cpp:238 @ Network::create_rngs_] : Creating default RNGs
Thu May 24 09:39:14 2018:[INFO] [2018.5.24 9:39:14 /root/nest-build/nest-simulator/nestkernel/rng_manager.cpp:233 @ Network::create_rngs_] : Deleting existing random number generators
Thu May 24 09:39:14 2018:[INFO] [2018.5.24 9:39:14 /root/nest-build/nest-simulator/nestkernel/rng_manager.cpp:238 @ Network::create_rngs_] : Creating default RNGs
Thu May 24 09:39:14 2018:[INFO] [2018.5.24 9:39:14 /root/nest-build/nest-simulator/nestkernel/rng_manager.cpp:284 @ Network::create_grng_] : Creating new default global RNG
Thu May 24 09:39:14 2018:
Thu May 24 09:39:14 2018: -- N E S T --
Thu May 24 09:39:14 2018:
Thu May 24 09:39:14 2018: Copyright (C) 2004 The NEST Initiative
Thu May 24 09:39:14 2018: Version 2.14.0 May 18 2018 11:33:36
Thu May 24 09:39:14 2018:
Thu May 24 09:39:14 2018:This program is provided AS IS and comes with
Thu May 24 09:39:14 2018:NO WARRANTY. See the file LICENSE for details.
Thu May 24 09:39:14 2018:
Thu May 24 09:39:14 2018:Problems or suggestions?
Thu May 24 09:39:14 2018: Visit http://www.nest-simulator.org
Thu May 24 09:39:14 2018:
Thu May 24 09:39:14 2018:Type 'nest.help()' to find out more about NEST.
Thu May 24 09:39:14 2018:
Thu May 24 09:39:14 2018:May 24 09:39:14 NodeManager::prepare_nodes [Info]:
Thu May 24 09:39:14 2018: Preparing 7 nodes for simulation.
Thu May 24 09:39:14 2018:
Thu May 24 09:39:14 2018:May 24 09:39:14 MUSICManager::enter_runtime [Info]:
Thu May 24 09:39:14 2018: Entering MUSIC runtime with tick = 1 ms
^C

Thanks in advance for any asistance or pointers you can provide and also for your amazing work on nest and providing it for the community to use for free :)

@heplesser heplesser added T: Bug Wrong statements in the code or documentation ZC: Kernel DO NOT USE THIS LABEL ZP: Pending DO NOT USE THIS LABEL S: High Should be handled next I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) labels May 28, 2018
@weidel-p
Copy link
Contributor

Dear @permosegaard, thanks for reporting this bug.

MUSIC creates an "application graph" defining the connections between the defined processes which is empty in your case. The function pushForward iterates over all existing connections and somehow runs into an endless loop if the graph is empty.

This is a bug in the MUSIC library and not in NEST but it seems to be easily fixable. I will create an issue in the MUSIC repo linking to this issue here. I guess @mdjurfeldt can fix that without much effort.

In your case you don't need MUSIC, so until this bug is fixed, you can still execute your code without using MUSIC (python simulation.py) even if you installed NEST with MUSIC support.

@heplesser heplesser added S: Normal Handle this with default priority T: External bug Not an issue that can be solved here. (May need documentation, though) and removed S: High Should be handled next T: Bug Wrong statements in the code or documentation labels May 28, 2018
@heplesser
Copy link
Contributor

@weidel-p Thanks for investigating!
@permosegaard Since this seems not to be a NEST issue, would you consider closing this issue once @weidel-p has posted the reference to the MUSIC issue on this matter?

@terhorstd
Copy link
Contributor

Issue has to be handled in INCF/MUSIC#54
closing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: No breaking change Previously written code will work as before, no one should note anything changing (aside the fix) S: Normal Handle this with default priority T: External bug Not an issue that can be solved here. (May need documentation, though) ZC: Kernel DO NOT USE THIS LABEL ZP: Pending DO NOT USE THIS LABEL
Projects
None yet
Development

No branches or pull requests

4 participants