Closed lguyot closed 6 years ago
I don't think that this issue is directly related to multithreading. My guess is that any of the threads is using memory out of the allocated space and terminating with segmentation fault, so that the thread manager is throwing the exception.
Can you change line 6 of your code to the following?:
sim.setup(timestep=0.5, threads=1, min_delay=0.5, max_delay=100.0)
I have tested with several number of threads and the code always finishes correctly. Hopefully, changing the number of threads will unveil the real issue.
@lguyot, could you also run the script src/testSTDPCos_New.py and let me know if it shows the ending plots? This script uses the same synapse type, but calling it directly from PyNEST.
@jgarridoalcazar Dear Jesus, I set the number of threads to 1 and the result remains the same.
Here is what happens when I run testSTDPCos_New.py:
`(platform_venv) ✔ ~/SpikingCerebellum/src [master|✔] 09:36 $ python testSTDPCos_New.py [INFO] [2018.8.15 9:37:1 /home/lguyot/Documents/NRP/nest-simulator/nestkernel/rng_manager.cpp:226 @ Network::createrngs] : Creating default RNGs [INFO] [2018.8.15 9:37:1 /home/lguyot/Documents/NRP/nest-simulator/nestkernel/rng_manager.cpp:221 @ Network::createrngs] : Deleting existing random number generators [INFO] [2018.8.15 9:37:1 /home/lguyot/Documents/NRP/nest-simulator/nestkernel/rng_manager.cpp:226 @ Network::createrngs] : Creating default RNGs [INFO] [2018.8.15 9:37:1 /home/lguyot/Documents/NRP/nest-simulator/nestkernel/rng_manager.cpp:272 @ Network::creategrng] : Creating new default global RNG
-- N E S T --
Copyright (C) 2004 The NEST Initiative Version 2.12.0 Aug 6 2018 17:07:17
This program is provided AS IS and comes with NO WARRANTY. See the file LICENSE for details.
Problems or suggestions? Visit http://www.nest-simulator.org
Type 'nest.help()' to find out more about NEST. Segmentation fault `
Thanks @lguyot. Can you isolate the line in testSTDPCos_New.py where the segmentation fault occurs?
Actually, I just needed to remove the nest.Install('cerebellummodule') cerebellum command. Afterwards, there is a problem with "pylab.figure()" (AttributeError: 'figure()' is not a Qt property or a signal), which is not relevant to us. Once I removed all the matplotlib instructions, I can see that the network is built and simulated successfully:
(platform_venv) ✘-1 ~/SpikingCerebellum/src [master|✚ 1]
11:04 $ python testSTDPCos_New.py
[INFO] [2018.8.15 11:4:40 /home/lguyot/Documents/NRP/nest-simulator/nestkernel/rng_manager.cpp:226 @ Network::create_rngs_] : Creating default RNGs
[INFO] [2018.8.15 11:4:40 /home/lguyot/Documents/NRP/nest-simulator/nestkernel/rng_manager.cpp:221 @ Network::create_rngs_] : Deleting existing random number generators
[INFO] [2018.8.15 11:4:40 /home/lguyot/Documents/NRP/nest-simulator/nestkernel/rng_manager.cpp:226 @ Network::create_rngs_] : Creating default RNGs
[INFO] [2018.8.15 11:4:40 /home/lguyot/Documents/NRP/nest-simulator/nestkernel/rng_manager.cpp:272 @ Network::create_grng_] : Creating new default global RNG
-- N E S T --
Copyright (C) 2004 The NEST Initiative
Version 2.12.0 Aug 6 2018 17:07:17
This program is provided AS IS and comes with
NO WARRANTY. See the file LICENSE for details.
Problems or suggestions?
Visit http://www.nest-simulator.org
Type 'nest.help()' to find out more about NEST.
Aug 15 11:04:41 ModelManager::clear_models_ [Info]:
Models will be cleared and parameters reset.
Aug 15 11:04:41 Network::create_rngs_ [Info]:
Deleting existing random number generators
Aug 15 11:04:41 Network::create_rngs_ [Info]:
Creating default RNGs
Aug 15 11:04:41 Network::create_grng_ [Info]:
Creating new default global RNG
Aug 15 11:04:41 NodeManager::prepare_nodes [Info]:
Preparing 2005 nodes for simulation.
Aug 15 11:04:41 MUSICManager::enter_runtime [Info]:
Entering MUSIC runtime with tick = 1 ms
Aug 15 11:04:41 SimulationManager::resume [Info]:
Number of local nodes: 2005
Simulaton time (ms): 1550
Number of OpenMP threads: 1
Number of MPI processes: 1
Aug 15 11:04:41 SimulationManager::resume [Info]:
Simulation finished.
So it seems that the problem lies on the PyNN side.
@lguyot That could be an explanation. The other one, some memory issue in the NEST module code that does not always shows. Still trying to reproduce the issue. Which PyNN version are you using in your environment? PyNN 0.9.2 here.
@jgarridoalcazar I am using PyNN==0.9.0 (this is the version installed by with NRP, se CLE/hbp_nrp_cle/requirements.txt).
Upgrading to PyNN==0.9.2 fixes the issue, in the sense that python iCub_VOR_UGR_brain_GOLGI.py
runs without the final error message terminate called without an active exception Aborted
That is a good piece of news. Checking the PyNN repository there exist many changes in the code of the projection setting for NEST since PyNN 0.9.0. My desktop computer has 0.9.1 and it seems to work too. We have to check the PyNN version in the computer where the NRP is working (and the VOR example has been developed).
@FranciscoNaveros can you check the PyNN version the desktop computer? In a python terminal run import pyNN and pyNN.version
We close this issue as it seems to be fixed using PyNN 0.9.1 and higher
As explained in https://hbpneurorobotics.atlassian.net/browse/NUIT-36, If I run the following code snippet
I get
The above error is related to C++ multithreading, see https://stackoverflow.com/questions/7381757/c-terminate-called-without-an-active-exception.