Minimal Working Example of MPI Gap Junctions (in python)

General issues of interest both for network and
individual cell parallelization.

Moderator: hines

hines
Site Admin
Posts: 1580
Joined: Wed May 18, 2005 3:32 pm

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

Post by hines » Mon Feb 11, 2013 11:31 am

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.

JustasB
Posts: 25
Joined: Tue Dec 08, 2015 8:17 pm
Location: Tempe, AZ, USA
Contact:

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

Post by JustasB » Fri Sep 13, 2019 11:09 pm

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.

hines
Site Admin
Posts: 1580
Joined: Wed May 18, 2005 3:32 pm

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

Post by hines » Sat Sep 14, 2019 2:47 am

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)

Post Reply