-
Notifications
You must be signed in to change notification settings - Fork 123
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
Segmentation Fault:11 when running NetPyNE simulation in parallel (MPI) #3339
Comments
So far I'm not able to reproduce the issue. Starting with a netpyne folder with tut1.py and HHTut.py and using Python 3.12.3
The last command ran and exited normally with the last few lines being
Note:
|
Thank you for your reply! I can also reproduce the issue (easy, as I am in the same group as the original reporter), and we are using Python 3.13 (currently 3.13.2 to be precise, using the Debian-packaged Neuron). Does that help? Can you reproduce the issue with Python 3.13? Given the place where the crash occurs, it's maybe not unlikely that the Python version has something to do with it (but I haven't found anything obvious yet). |
What is the URL for the Debian-packaged Neuron you mentioned above? For Python3.13.1 and the current neuron-nightly VERSION 9.0a-493-gb17d87243 I'm not seeing a problem.
NEURON 8.2.6 definitely has a problem with Python3.13 . See #3316 Since you mention you are using 8.2 for Python3.13, I am guessing your Debian-packaged Neuron does not contain the commits 6d91299 and c624c94 |
You can find the package here: https://packages.debian.org/source/sid/neuron Looking at https://salsa.debian.org/science-team/neuron/-/tree/debian/master/debian/patches?ref_type=heads it looks like the package includes 6d91299 (and its dependencies), but not c624c94 How strange! I can include the latter patch and see if that does anything, but I'd be surprised if that changes anything. We can try with the nightly version though and report back! |
I thought I'd try building the package
but unfortunately the last cmake command generated
Anyone know a simple work around for that.
One thing that bothers me about this is that the current distribution tag is 8.2.6 and I think there are a lot of bug fixes between 8.2.2 and 8.2.6 |
Are you familiar with building Debian packages and are you on Debian? One extremely quick way to get a package out would be doing these steps: sudo apt install git-buildpackage debspawn
# create a container for Debian 13 to build in
debspawn create unstable
cd /path/to/package/git/checkout
# build the package
gbp buildpackage --git-builder='debspawn build unstable' That will create the packages in The key thing to note is that the Git checkout won't have the patches applied, so if you build it like you did, you'll be missing some of the changes. If you just want to quickly compile the thing quick&dirty to inspect the generated binary artifacts, you can try this: sudo apt install devscripts
# download the package and unpack it in the current directory
dget -ux http://deb.debian.org/debian/pool/main/n/neuron/neuron_8.2.2-8.dsc
cd neuron_8.2.2-8/
# run just the build step
make -f debian/rules build I haven't tested that, but that should create a directory for you where cmake is configured and Neuron is built, with the exact changes present in the package itself :-) Thank you for going through all this trouble! I looked through the Neuron Git history, and it looks like patch f58692e completely fixes the issue from this bug - however, that's a major refactoring and sadly not in a stable Neuron release yet... |
I'm not familiar with building debian packages. My os is ubuntu 24.04 . Taking your second approach above, after
but
However I'm not so happy with this approach as it loses the usefulness of being a git repository. Also tried the first method but I'm too out of context to understand what is going on. The second command seemed to create some container but I don't know what you meant by
I guess I'll continue developing a normal nrn release/8.2.7 which will allow |
Note that the developers of NEURON are not the same people as the maintainers of the NEURON Debian package, so for any problems with the Debian package itself, please report this to the downstream bug tracker first if your issue persists. Due to the fact that the maintainers of downstream packages often apply various patches to the original source distributions, we are only able to provide proper support if NEURON is installed in one of the following ways:
Also, as @nrnhines mentioned above, the 8.2 release of NEURON does not yet support Python 3.13. |
Context
We tried to run a python script implementing a NetpyNE model in parallel using MPI. The simulation itself ran through without errors but the output saving at the end did not work.
Overview of the issue
The output of the simulation could not be saved and this error was shown:
This seemed to be an issue in
src/nrnpython/nrnpython.cpp
and a workaround was to get rid of both the final call toPyMem_Free(wcargv);
as well asPyMem_Free(wcargv[i]);
indel_wcargv()
.Could this be a race condition where
wcargv
is modified from two places at once?NEURON setup
Minimal working example - MWE
mpiexec -n 4 nrniv -python -mpi tut1.py (example from NetPyNE tutorial: http://doc.netpyne.org/tutorial.html)
The text was updated successfully, but these errors were encountered: