GithubHelp home page GithubHelp logo

Comments (5)

slayoo avatar slayoo commented on June 15, 2024

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:

from numba-mpi.

Konjkov avatar Konjkov commented on June 15, 2024

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.

slayoo avatar slayoo commented on June 15, 2024

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.

Konjkov avatar Konjkov commented on June 15, 2024

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.

slayoo avatar slayoo commented on June 15, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.