Skip to main content

Numba @njittable MPI wrappers tested on Linux, macOS and Windows

Project description

numba-mpi logo numba-mpi

Python 3 LLVM Linux OK macOS OK Windows OK Github Actions Status Maintenance License: GPL v3 PyPI version Anaconda-Server Badge DOI

Numba @njittable MPI wrappers

  • covering: size/rank, send/recv, allreduce, bcast, scatter/gather & allgather, barrier and wtime
  • basic asynchronous communication with isend/irecv (only for contiguous arrays); for request handling including wait/waitall/waitany and test/testall/testany
  • not yet implemented: support for non-default communicators, ...
  • API based on NumPy and supporting numeric and character datatypes
  • auto-generated docstring-based API docs on the web: https://numba-mpi.github.io/numba-mpi
  • pure-Python implementation with packages available on PyPI and Conda Forge
  • CI-tested on: Linux (MPICH, OpenMPI & Intel MPI), macOS (MPICH & OpenMPI) and Windows (MS MPI)

Hello world example:

import numba, numba_mpi, numpy

@numba.njit()
def hello():
  print(numba_mpi.rank())
  print(numba_mpi.size())

  src = numpy.array([1., 2., 3., 4., 5.])
  dst_tst = numpy.empty_like(src)

  if numba_mpi.rank() == 0:
    numba_mpi.send(src, dest=1, tag=11)
  elif numba_mpi.rank() == 1:
    numba_mpi.recv(dst_tst, source=0, tag=11)

hello()

For information on MPI, see:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

numba-mpi-0.36.tar.gz (33.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

numba_mpi-0.36-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

Details for the file numba-mpi-0.36.tar.gz.

File metadata

  • Download URL: numba-mpi-0.36.tar.gz
  • Upload date:
  • Size: 33.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for numba-mpi-0.36.tar.gz
Algorithm Hash digest
SHA256 3c4d26f14a870b9a3e7d869a7b94ad18d14e8856ded68261024d528d8f244d27
MD5 43d071f2b2a89793eda0fa56b49c3063
BLAKE2b-256 91789d775a123157eac23a03e2ee1c01f5338684f9e8d094d7db2ed1584e8183

See more details on using hashes here.

File details

Details for the file numba_mpi-0.36-py3-none-any.whl.

File metadata

  • Download URL: numba_mpi-0.36-py3-none-any.whl
  • Upload date:
  • Size: 26.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for numba_mpi-0.36-py3-none-any.whl
Algorithm Hash digest
SHA256 f512870e1fc6a85a496369b70c8a21da10cbea2d1b89187973cb0f474ac5d3c5
MD5 d6dde8dd67016edf11a1af3b190a8b71
BLAKE2b-256 0013ec107f7ec4ed17dc430bd3fcc375623034aa9843bcc0eeeb690a84b701ed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page