Comments (5)
Thanks for reporting it, @Konjkov!
Here's a draft with ANY_TAG
and ANY_SOURCE
support in recv()
: #84
Is ANY_TAG
support in send()
an mpi4py
addition or is it part of the standard/C API?
I cannot find any mention of it at:
- https://www.open-mpi.org/doc/v4.0/man3/MPI_Send.3.php
- https://www.mpich.org/static/docs/v3.3/www3/MPI_Send.html
from numba-mpi.
I'm sorry, ANY_TAG not support in send().
https://www.mpich.org/static/docs/v3.2/www3/MPI_Send.html
MPI_ERR_TAG
Invalid tag argument. Tags must be non-negative; tags in a receive (MPI_Recv, MPI_Irecv, MPI_Sendrecv, etc.) may also be MPI_ANY_TAG. The largest tag value is available through the the attribute MPI_TAG_UB.
from numba-mpi.
Indeed, MPICH seems not to support it, but mpi4py
does have a default value of zero:
https://github.com/mpi4py/mpi4py/blob/master/src/mpi4py/MPI/Comm.pyx#L273
The question is, if we want to mimic mpi4py
behavior here?
from numba-mpi.
I have a small project ~10000 lines on python & numba. High-level code is easier to write on pure python, and low-level code on Numba. For pure python I use mpi4py and for numba try to use numba-mpi. It would be probably nice if the code was similar in both cases, although the differences are easily overcome.
For example numba_mpi.allreduce can`t handle scalar type as recvobj, but mpi4py provides with Comm-class functions with upper case first letter for sending buffer like objects like Numpy arrays and with lower case first letter for sending generic data objects. https://info.gwdg.de/wiki/doku.php?id=wiki:hpc:mpi4py
It would be nice to support such a convention, otherwise one have to convert generic numba types to and from numpy arrays.
code example where I should create an numpy array of one element to receive sum of lengths of self.energy_list from all processes
import numba as nb
import numba_mpi as nb_mpi
energy_list_len = np.empty(1, dtype=np.int64)
nb_mpi.allreduce(len(self.energy_list), energy_list_len)
Best Vladimir.
from numba-mpi.
@Konjkov Just to confirm, the default values for tag
and source
are now featured in numba-mpi
v0.30 available on both PyPI and conda-forge. Thank you for reporting it! Thanks @Delcior for help.
Let's track progress and discuss the allreduce
issue at #88
from numba-mpi.
Related Issues (20)
- make helper routines private to avoid displaying in the web docs HOT 3
- support for `MPI_IN_PLACE` in `[all]gather`/`scatter` and `allreduce` HOT 3
- set up `test_todos_annotated` to ensure all TODOs in the code refer to open Github issues HOT 3
- switch to exceptions for error handling (instead of statuses) + mention in README HOT 3
- direct users from README to tests codes for examples on how to use relevant wrappers (perhaps also to py-pde and PyMPDATA-MPI?) HOT 2
- getting `numba_mpi.scatter` to work (type of first argument, ...) HOT 8
- adding support for Numpy structured arrays via `MPI_Type_create_struct` HOT 4
- `test_isend_irecv` works for 2 workers (as checkd on CI), but not for one or three...
- sort out compatibility with pytest 8 (cannot find common and utils modules)
- expose MPI.Init to enable setting different thread-safety policies
- Apply to NumFOCUS for a grant HOT 1
- Benchmark numba-mpi against raw mpi4py HOT 1
- add link to numba-mpi to https://en.wikipedia.org/wiki/Message_Passing_Interface#Python
- register numba-mpi in pyOpenSci?
- numba_mpi.allreduce can`t handle **scalar type as recvobj** HOT 6
- default value for `tag=0` in `send()` (as in mpi4py) ? HOT 1
- try out pytest-mpi HOT 3
- pdoc uploads stopped to work HOT 2
- request for MPI_Gather (DONE) and MPI_Allgather (DONE) HOT 7
- refactor `_jit` methods in tests not to mislead that `py_func` points to impl HOT 4
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 numba-mpi.