Comments (6)
the workhorse for transferring python objects is
destlist = pc.py_alltoall(srclist)
where the length of srclist and destlist must be pc.nhost()
None entries are allowed and a send from I to j is just that everyone except I and j fill their array
with None and the only non None object on rank I is the jth element and
https://www.neuron.yale.edu/neuron/static/py_doc/modelspec/programmatic/network/parcon.html?highlight=alltoall#ParallelContext.py_alltoall
from nrn.
That suggestion is reasonable and I'll look into whether it can happen early enough in the process
of getting things properly setup. Til then you might try the environment variable
export NEURON_INIT_MPI=1
from nrn.
Taking this use case a bit further, it could be interesting to support MPI actions with Python objects, namely numpy arrays.
At the moment, when doing something like
pc = h.ParallelContext()
numbers = numpy.arange(100) if pc.id() == 0 else numpy.empty(10, dtype='int32')
pc.broadcast(numbers, 0)
one gets
NEURON: object type is PythonObject instead of Vector
Would it make sense to support such use case and generally serialize Python objects for MPI actions?
@pramodk
from nrn.
The ParallelContext.py_alltoall collective that takes any pickleable python object now has the
.py_[allgather, gatther, scatter, broadcast] companions.
from nrn.
@nrnhines that sounds great! Thanks for the info.
Regarding the first comment, on the initialization of MPI via a specific call, any news?
from nrn.
I'm toying with
test0.py
from neuron import h
pc = h.ParallelContext()
pc.mpi_init()
id = int(pc.id())
nhost = int(pc.nhost())
print ('I am %d of %d'%(id, nhost))
pc.barrier()
h.quit()
and
mpiexec -n 2 python3 test0.py
works on the desktop with my mpich-3.3
but my openmpi 2.1.1 gives the message
(though it works with mpiexec -n 2 nrniv -python -nobanner test0.py
$ mpiexec -n 2 python3 test0.py
[hines-T7500:53222] mca_base_component_repository_open: unable to open mca_patcher_overwrite: /usr/lib/x86_64-linux-gnu/openmpi/lib/openmpi/mca_patcher_overwrite.so: undefined symbol: mca_patcher_base_patch_t_class (ignored)
...
from nrn.
Related Issues (20)
- Rewrite `nrn_mlh_gsort` with `std::sort`
- Can `*_net_send(void*` be removed? HOT 2
- Transmembrane currents do not sum to zero HOT 21
- Eliminate make_mechanism and make_pointprocess from NEURON HOT 6
- Customizable models in ModelDB CI workflow in PRs
- Deprecation warning when building wheels on Python 3.12 and above
- ARM64 MacOS nightly wheels missing on PyPI
- Name of `h` is misleading HOT 1
- NEURON 8.2.4 patch release
- Failure to build docs on release 8.2 HOT 1
- Build failure during development. HOT 4
- Allow trivial changes without running CI. HOT 3
- Improve installation tests. HOT 1
- Update Release Documentation after 8.2.4
- Missing dependency between `nocpout.cpp` and `${mod}.cpp`. HOT 1
- Outdated `cfiles` in `nrnivmodl`. HOT 4
- Mechanism Loading Issues: nrn_dll_loaded does not update and Segfaults
- Typo for windows download url at https://nrn.readthedocs.io/en/8.2.4/ HOT 3
- Remove usage of deprecated `pkg_resources` HOT 2
- An Option to Disable Automatic Loading of Mechanisms on Import
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nrn.