Page 2 of 2

Re: Minimal Working Example of MPI Gap Junctions (in python)

Posted: Mon Feb 11, 2013 11:31 am
by hines
The code you sent works fine in my hands. We can continue resolving this by email. For now, thought I'd mention something here which might be of use to others.
I could not run your code using
mpiexec -n 3 nrniv -mpi -python gap_mwe.py
because of the use of argparse.ArgumentParser
Also I do not have mpi4py installed so
mpiexec -n 3 python gap_mwe.py
with a subsequent
from neuron import h
would not notify neuron that it is running under mpi. therefore 3 processes all thinking they were rank 0 of 1. The solution (apart from removing your use of argparse) is
export NEURON_INIT_MPI=1
which causes "from neuron import h" to initialize MPI.

Re: Minimal Working Example of MPI Gap Junctions (in python)

Posted: Fri Sep 13, 2019 11:09 pm
by JustasB
In case others are having a similar problem, I was receiving Segmentation Fault errors under MPI with gap junctions when I had h.cvode.cache_efficient(1). Under h.cvode.cache_efficient(0), the simulation ran without the error.

Re: Minimal Working Example of MPI Gap Junctions (in python)

Posted: Sat Sep 14, 2019 2:47 am
by hines
Segmentation Fault errors under MPI with gap junctions when I had h.cvode.cache_efficient(1)
I'd like to attempt to fix this bug. Can you send me a (hopefully small) version of your model that exhibits this error. (Michael.hines@yale.edu)

An unrelated point is that it is now possible to avoid the "export NEURON_INIT_MPI=1" and instead have the same effect by executing the HOC
function nrnmpi_init() (but needs to happen before the first instantiation of ParallelContext)