numba-mpi 1.1.2__py3-none-any.whl → 1.1.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
numba_mpi/api/requests.py CHANGED
@@ -1,5 +1,5 @@
1
- """ Utilities for handling MPI_Requests with respective Wait and Test function
2
- wrappers.
1
+ """Utilities for handling MPI_Requests with respective Wait and Test function
2
+ wrappers.
3
3
  """
4
4
 
5
5
  import ctypes
numba_mpi/common.py CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  import ctypes
4
4
  import os
5
+ import sys
5
6
  from ctypes.util import find_library
6
7
  from pathlib import Path
7
8
 
@@ -72,6 +73,12 @@ else:
72
73
  break
73
74
 
74
75
  if LIB is None:
76
+ if sys.platform == "darwin":
77
+ raise RuntimeError(
78
+ """MPI library not found, if MPI was installed with Homebrew, export the following:
79
+ DYLD_FALLBACK_LIBRARY_PATH="/opt/homebrew/lib:/usr/lib:$DYLD_FALLBACK_LIBRARY_PATH
80
+ """
81
+ )
75
82
  raise RuntimeError("no MPI library found")
76
83
 
77
84
  libmpi = ctypes.CDLL(LIB)
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: numba-mpi
3
- Version: 1.1.2
3
+ Version: 1.1.4
4
4
  Summary: Numba @jittable MPI wrappers tested on Linux, macOS and Windows
5
5
  Home-page: https://github.com/numba-mpi/numba-mpi
6
6
  Author: https://github.com/numba-mpi/numba-mpi/graphs/contributors
@@ -18,6 +18,17 @@ Requires-Dist: psutil
18
18
  Provides-Extra: tests
19
19
  Requires-Dist: pytest<8.0.0; extra == "tests"
20
20
  Requires-Dist: py-pde; extra == "tests"
21
+ Dynamic: author
22
+ Dynamic: description
23
+ Dynamic: description-content-type
24
+ Dynamic: home-page
25
+ Dynamic: license
26
+ Dynamic: license-file
27
+ Dynamic: project-url
28
+ Dynamic: provides-extra
29
+ Dynamic: requires-dist
30
+ Dynamic: requires-python
31
+ Dynamic: summary
21
32
 
22
33
  # <img src="https://raw.githubusercontent.com/numba-mpi/numba-mpi/main/.github/numba_mpi_logo.png" width=128 height=142 alt="numba-mpi logo"> numba-mpi
23
34
 
@@ -35,31 +46,32 @@ Requires-Dist: py-pde; extra == "tests"
35
46
  [![DOI](https://zenodo.org/badge/316911228.svg)](https://zenodo.org/badge/latestdoi/316911228)
36
47
 
37
48
  ### Overview
38
- numba-mpi provides Python wrappers to the C MPI API callable from within [Numba JIT-compiled code](https://numba.readthedocs.io/en/stable/user/jit.html) (@jit mode). For an outline of the project, rationale, architecture, and features, refer to: [numba-mpi arXiv e-print](https://doi.org/10.48550/arXiv.2407.13712) (please cite if numba-mpi is used in your research).
49
+ numba-mpi provides Python wrappers to the C MPI API callable from within [Numba JIT-compiled code](https://numba.readthedocs.io/en/stable/user/jit.html) (@jit mode). For an outline of the project, rationale, architecture, and features, refer to: [numba-mpi paper in SoftwareX (open access)](https://www.sciencedirect.com/science/article/pii/S235271102400267X) (please cite if numba-mpi is used in your research).
39
50
 
40
51
  Support is provided for a subset of MPI routines covering: `size`/`rank`, `send`/`recv`, `allreduce`, `reduce`, `bcast`, `scatter`/`gather` & `allgather`, `barrier`, `wtime`
41
52
  and basic asynchronous communication with `isend`/`irecv` (only for contiguous arrays); for request handling including `wait`/`waitall`/`waitany` and `test`/`testall`/`testany`.
42
53
 
43
- The API uses NumPy and supports both numeric and character datatypes (e.g., `broadcast`).
54
+ The API uses NumPy and supports both numeric and character datatypes (e.g., `broadcast`).
44
55
  Auto-generated docstring-based API docs are published on the web: https://numba-mpi.github.io/numba-mpi
45
56
 
46
- Packages can be obtained from
47
- [PyPI](https://pypi.org/project/numba-mpi),
48
- [Conda Forge](https://anaconda.org/conda-forge/numba-mpi),
57
+ Packages can be obtained from
58
+ [PyPI](https://pypi.org/project/numba-mpi),
59
+ [Conda Forge](https://anaconda.org/conda-forge/numba-mpi),
49
60
  [Arch Linux](https://aur.archlinux.org/packages/python-numba-mpi)
50
61
  or by invoking `pip install git+https://github.com/numba-mpi/numba-mpi.git`.
51
62
 
52
63
  numba-mpi is a pure-Python package.
53
64
  The codebase includes a test suite used through the GitHub Actions workflows ([thanks to mpi4py's setup-mpi](https://github.com/mpi4py/setup-mpi)!)
54
- for automated testing on: Linux ([MPICH](https://www.mpich.org/), [OpenMPI](https://www.open-mpi.org/doc/)
55
- & [Intel MPI](https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library.html)),
56
- macOS ([MPICH](https://www.mpich.org/) & [OpenMPI](https://www.open-mpi.org/doc/)) and
57
- Windows ([MS MPI](https://docs.microsoft.com/en-us/message-passing-interface/microsoft-mpi)).
65
+ for automated testing on: Linux ([MPICH](https://www.mpich.org/), [OpenMPI](https://www.open-mpi.org/doc/)
66
+ & [Intel MPI](https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library.html)),
67
+ macOS ([MPICH](https://www.mpich.org/) & [OpenMPI](https://www.open-mpi.org/doc/)) and
68
+ Windows ([MS MPI](https://docs.microsoft.com/en-us/message-passing-interface/microsoft-mpi)). Note, that some of those
69
+ combinations may not be fully supported yet - see [Known Issues](#known-issues) for more information.
58
70
 
59
71
  Features that are not implemented yet include (help welcome!):
60
72
  - support for non-default communicators
61
73
  - support for `MPI_IN_PLACE` in `[all]gather`/`scatter` and `allreduce`
62
- - support for `MPI_Type_create_struct` (Numpy structured arrays)
74
+ - support for `MPI_Type_create_struct` (Numpy structured arrays)
63
75
  - ...
64
76
 
65
77
  ### Hello world send/recv example:
@@ -82,21 +94,21 @@ hello()
82
94
  ### Example comparing numba-mpi vs. mpi4py performance:
83
95
 
84
96
  The example below compares `Numba`+`mpi4py` vs. `Numba`+`numba-mpi` performance.
85
- The sample code estimates $\pi$ by numerical integration of $\int_0^1 (4/(1+x^2))dx=\pi$
86
- dividing the workload into `n_intervals` handled by separate MPI processes
97
+ The sample code estimates $\pi$ by numerical integration of $\int_0^1 (4/(1+x^2))dx=\pi$
98
+ dividing the workload into `n_intervals` handled by separate MPI processes
87
99
  and then obtaining a sum using `allreduce` (see, e.g., analogous [Matlab docs example](https://www.mathworks.com/help/parallel-computing/numerical-estimation-of-pi-using-message-passing.html)).
88
100
  The computation is carried out in a JIT-compiled function `get_pi_part()` and is repeated
89
- `N_TIMES`. The repetitions and the MPI-handled reduction are done outside or
101
+ `N_TIMES`. The repetitions and the MPI-handled reduction are done outside or
90
102
  inside of the JIT-compiled block for `mpi4py` and `numba-mpi`, respectively.
91
103
  Timing is repeated `N_REPEAT` times and the minimum time is reported.
92
104
  The generated plot shown below depicts the speedup obtained by replacing `mpi4py`
93
- with `numba_mpi`, plotted as a function of `N_TIMES / n_intervals` - the number of MPI calls per
105
+ with `numba_mpi`, plotted as a function of `N_TIMES / n_intervals` - the number of MPI calls per
94
106
  interval. The speedup, which stems from avoiding roundtrips between JIT-compiled
95
107
  and Python code is significant (150%-300%) in all cases. The more often communication
96
- is needed (smaller `n_intervals`), the larger the measured speedup. Note that nothing
108
+ is needed (smaller `n_intervals`), the larger the measured speedup. Note that nothing
97
109
  in the actual number crunching (within the `get_pi_part()` function) or in the employed communication logic
98
110
  (handled by the same MPI library) differs between the `mpi4py` or `numba-mpi` solutions.
99
- These are the overhead of `mpi4py` higher-level abstractions and the overhead of
111
+ These are the overhead of `mpi4py` higher-level abstractions and the overhead of
100
112
  repeatedly entering and leaving the JIT-compiled block if using `mpi4py`, which can be
101
113
  eliminated by using `numba-mpi`, and which the measured differences in execution time
102
114
  stem from.
@@ -156,6 +168,14 @@ if numba_mpi.rank() == 0:
156
168
 
157
169
  ![plot](https://github.com/numba-mpi/numba-mpi/releases/download/tip/readme_plot.png)
158
170
 
171
+ ### Known Issues
172
+
173
+ **NOTE**: Issues listed below only relate to combinations of platforms and MPI distributions that we target to support, but due to various reason are currently not working and are temporarily excluded from automated testing:
174
+
175
+ - tests on Ubuntu 2024.4 that use MPICH are not run due to failures caused by newer version of MPICH (`4.2.0`); note, that previous tests ran
176
+ using version `4.0.2` of MPICH (that is installed by default on Ubuntu 2022.4 using `apt`) were passing (see [related issue](https://github.com/numba-mpi/numba-mpi/issues/162) - TODO #162),
177
+ - tests on Intel MacOS (v13) that use OpenMPI are currently not run due to failures being under investigation (see [related issue](https://github.com/numba-mpi/numba-mpi/issues/163) - TODO #163),
178
+ - `numba-mpi` currently does not support ARM-based MacOS, due to required code improvement (see [related issue](https://github.com/numba-mpi/numba-mpi/issues/164) - TODO #164).
159
179
 
160
180
  ### MPI resources on the web:
161
181
 
@@ -177,11 +197,10 @@ if numba_mpi.rank() == 0:
177
197
 
178
198
  ### Acknowledgements:
179
199
 
180
- We thank [all contributors](https://github.com/numba-mpi/numba-mpi/graphs/contributors) and users who reported feedback to the project
200
+ We thank [all contributors](https://github.com/numba-mpi/numba-mpi/graphs/contributors) and users who reported feedback to the project
181
201
  through [GitHub issues](https://github.com/numba-mpi/numba-mpi/issues).
182
202
 
183
203
  Development of numba-mpi has been supported by the [Polish National Science Centre](https://ncn.gov.pl/en) (grant no. 2020/39/D/ST10/01220),
184
- the [Max Planck Society](https://www.mpg.de/en) and the [European Union](https://erc.europa.eu/) (ERC, EmulSim, 101044662).
185
- We further acknowledge Poland’s high-performance computing infrastructure [PLGrid](https://plgrid.pl) (HPC Centers: [ACK Cyfronet AGH](https://www.cyfronet.pl/en))
204
+ the [Max Planck Society](https://www.mpg.de/en) and the [European Union](https://erc.europa.eu/) (ERC, EmulSim, 101044662).
205
+ We further acknowledge Poland’s high-performance computing infrastructure [PLGrid](https://plgrid.pl) (HPC Centers: [ACK Cyfronet AGH](https://www.cyfronet.pl/en))
186
206
  for providing computer facilities and support within computational grant no. PLG/2023/016369.
187
-
@@ -1,5 +1,5 @@
1
1
  numba_mpi/__init__.py,sha256=EsiszqT6I7-Vrbgdk36_mGp5kHpAS5AYCkhjRya-5rg,785
2
- numba_mpi/common.py,sha256=2JJoUrd3Qa6GIFk6Zlt2NudS7ZurPxpVwBLRGSkCg5E,2266
2
+ numba_mpi/common.py,sha256=XOnXiy2hDFIsNkhTUXuPY17Xz-a9xg6F-SxIayMrgqU,2555
3
3
  numba_mpi/utils.py,sha256=gfGFuzmGgs4FnBqzPI91ftAq4UHgXb_HFkvxrVWkcIo,1866
4
4
  numba_mpi/api/__init__.py,sha256=Zj5df4lWeGpxAXV8jKGFnmtLBQ50HwNU8dPf-os06X8,51
5
5
  numba_mpi/api/allreduce.py,sha256=szS7YzrQ5a90LlKDiefyxVEiAXnsHbni5g2M1of0TmE,3261
@@ -12,13 +12,13 @@ numba_mpi/api/operator.py,sha256=3VTPZAdOP05bxdqt3lA0hRDICM-iaBMa4m-krEdO91s,342
12
12
  numba_mpi/api/rank.py,sha256=1xZvHUclsK20aMtK07JzXYxW5F4Er8HZgOmcf495sjo,597
13
13
  numba_mpi/api/recv.py,sha256=YsYK-q7PNfi3zt0ftVddM363VsnJ4XFfmgMq8aeCr-o,1260
14
14
  numba_mpi/api/reduce.py,sha256=ug8WctzXRuxD3IrvrXN4sAfWdjJ1vvMhwykTgF8nn1s,3233
15
- numba_mpi/api/requests.py,sha256=5EhgFyeQCGP8YclSPwxP95c2AhBo19CLlShK0TxCR2U,9114
15
+ numba_mpi/api/requests.py,sha256=-9KstEnuP4i7udDMXojKt-xaoEgl5Xk4D_7vo93AGQY,9109
16
16
  numba_mpi/api/scatter_gather.py,sha256=goZn4BxMKakWQHjfXIOdjzK3DJ-lTeaiQQwgnyQeZ_s,2410
17
17
  numba_mpi/api/send.py,sha256=jn1hPw0YHBHOaeJop_ZbjaBChaqgfw3nM1xGhW9sabI,909
18
18
  numba_mpi/api/size.py,sha256=-RX-FtcIH4qDxCoGOhZjjgEWXpytt79vsH0YX9dtZuY,597
19
19
  numba_mpi/api/wtime.py,sha256=qrTqlefW7K7hqnAQKkGYm8kgdiRGuSAGiHmPcTrhLzE,279
20
- numba_mpi-1.1.2.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
21
- numba_mpi-1.1.2.dist-info/METADATA,sha256=N4x9AmBEnASsg-avposBP50Q7-GZDzglJ0AcuN3SZRk,9894
22
- numba_mpi-1.1.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
23
- numba_mpi-1.1.2.dist-info/top_level.txt,sha256=yb_ktLmrfuhOZS0rjS81FFNC-gK_4c19WbLG2ViP73g,10
24
- numba_mpi-1.1.2.dist-info/RECORD,,
20
+ numba_mpi-1.1.4.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
21
+ numba_mpi-1.1.4.dist-info/METADATA,sha256=eT5AKcMbkmDUvhGI0u42NXnHvCO-fiYmGzaxut0B8z0,11237
22
+ numba_mpi-1.1.4.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
23
+ numba_mpi-1.1.4.dist-info/top_level.txt,sha256=yb_ktLmrfuhOZS0rjS81FFNC-gK_4c19WbLG2ViP73g,10
24
+ numba_mpi-1.1.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5