numba-mpi 0.40__tar.gz → 0.41__tar.gz

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.
Files changed (53) hide show
  1. {numba-mpi-0.40 → numba_mpi-0.41}/.github/workflows/readme_snippets.yml +12 -2
  2. {numba-mpi-0.40 → numba_mpi-0.41}/.github/workflows/tests+pypi.yml +3 -3
  3. numba_mpi-0.41/PKG-INFO +172 -0
  4. numba_mpi-0.41/README.md +153 -0
  5. numba_mpi-0.41/numba_mpi.egg-info/PKG-INFO +172 -0
  6. numba-mpi-0.40/PKG-INFO +0 -66
  7. numba-mpi-0.40/README.md +0 -47
  8. numba-mpi-0.40/numba_mpi.egg-info/PKG-INFO +0 -66
  9. {numba-mpi-0.40 → numba_mpi-0.41}/.github/numba_mpi_logo.svg +0 -0
  10. {numba-mpi-0.40 → numba_mpi-0.41}/.github/workflows/stale.yml +0 -0
  11. {numba-mpi-0.40 → numba_mpi-0.41}/.gitignore +0 -0
  12. {numba-mpi-0.40 → numba_mpi-0.41}/.pre-commit-config.yaml +0 -0
  13. {numba-mpi-0.40 → numba_mpi-0.41}/.vscode/settings.json +0 -0
  14. {numba-mpi-0.40 → numba_mpi-0.41}/.zenodo.json +0 -0
  15. {numba-mpi-0.40 → numba_mpi-0.41}/LICENSE +0 -0
  16. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/__init__.py +0 -0
  17. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/api/__init__.py +0 -0
  18. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/api/allreduce.py +0 -0
  19. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/api/barrier.py +0 -0
  20. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/api/bcast.py +0 -0
  21. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/api/initialized.py +0 -0
  22. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/api/irecv.py +0 -0
  23. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/api/isend.py +0 -0
  24. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/api/operator.py +0 -0
  25. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/api/rank.py +0 -0
  26. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/api/recv.py +0 -0
  27. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/api/requests.py +0 -0
  28. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/api/scatter_gather.py +0 -0
  29. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/api/send.py +0 -0
  30. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/api/size.py +0 -0
  31. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/api/wtime.py +0 -0
  32. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/common.py +0 -0
  33. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi/utils.py +0 -0
  34. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi.egg-info/SOURCES.txt +0 -0
  35. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi.egg-info/dependency_links.txt +0 -0
  36. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi.egg-info/requires.txt +0 -0
  37. {numba-mpi-0.40 → numba_mpi-0.41}/numba_mpi.egg-info/top_level.txt +0 -0
  38. {numba-mpi-0.40 → numba_mpi-0.41}/setup.cfg +0 -0
  39. {numba-mpi-0.40 → numba_mpi-0.41}/setup.py +0 -0
  40. {numba-mpi-0.40 → numba_mpi-0.41}/tests/__init__.py +0 -0
  41. {numba-mpi-0.40 → numba_mpi-0.41}/tests/api/test_allreduce.py +0 -0
  42. {numba-mpi-0.40 → numba_mpi-0.41}/tests/api/test_barrier.py +0 -0
  43. {numba-mpi-0.40 → numba_mpi-0.41}/tests/api/test_bcast.py +0 -0
  44. {numba-mpi-0.40 → numba_mpi-0.41}/tests/api/test_init.py +0 -0
  45. {numba-mpi-0.40 → numba_mpi-0.41}/tests/api/test_isend_irecv.py +0 -0
  46. {numba-mpi-0.40 → numba_mpi-0.41}/tests/api/test_rank.py +0 -0
  47. {numba-mpi-0.40 → numba_mpi-0.41}/tests/api/test_scatter_gather.py +0 -0
  48. {numba-mpi-0.40 → numba_mpi-0.41}/tests/api/test_send_recv.py +0 -0
  49. {numba-mpi-0.40 → numba_mpi-0.41}/tests/api/test_size.py +0 -0
  50. {numba-mpi-0.40 → numba_mpi-0.41}/tests/api/test_wtime.py +0 -0
  51. {numba-mpi-0.40 → numba_mpi-0.41}/tests/common.py +0 -0
  52. {numba-mpi-0.40 → numba_mpi-0.41}/tests/test_version.py +0 -0
  53. {numba-mpi-0.40 → numba_mpi-0.41}/tests/utils.py +0 -0
@@ -22,7 +22,17 @@ jobs:
22
22
  python-version: "3.10"
23
23
  - uses: mpi4py/setup-mpi@v1
24
24
  - run: pip install -e .
25
- - run: pip install pytest-codeblocks pytest
25
+ - run: pip install pytest-codeblocks pytest matplotlib
26
26
  - run: python -c "import pytest_codeblocks; code=pytest_codeblocks.extract_from_file('README.md'); f=open('readme.py', 'w'); f.writelines(block.code for block in code if block.syntax=='python'); f.close()"
27
27
  - run: cat -n readme.py
28
- - run: mpiexec -n 2 python -We readme.py
28
+ - run: mpiexec -n 4 python -We readme.py
29
+ - uses: actions/upload-artifact@v3
30
+ with:
31
+ path: readme_plot.png
32
+ name: readme_plot
33
+ - if: github.ref == 'refs/heads/main'
34
+ uses: eine/tip@master
35
+ with:
36
+ token: ${{ secrets.GITHUB_TOKEN }}
37
+ files: |
38
+ readme_plot.png
@@ -88,13 +88,13 @@ jobs:
88
88
  needs: [pylint, precommit, pdoc, zenodo_json]
89
89
  strategy:
90
90
  matrix:
91
- platform: [ubuntu-latest, macos-latest, windows-latest]
91
+ platform: [ubuntu-latest, macos-12, windows-latest]
92
92
  python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
93
93
  mpi: [ 'mpich', 'openmpi', 'msmpi', 'intelmpi']
94
94
  exclude:
95
- - platform: macos-latest
95
+ - platform: macos-12
96
96
  mpi: msmpi
97
- - platform: macos-latest
97
+ - platform: macos-12
98
98
  mpi: intelmpi
99
99
  - platform: ubuntu-latest
100
100
  mpi: msmpi
@@ -0,0 +1,172 @@
1
+ Metadata-Version: 2.1
2
+ Name: numba-mpi
3
+ Version: 0.41
4
+ Summary: Numba @njittable MPI wrappers tested on Linux, macOS and Windows
5
+ Home-page: https://github.com/numba-mpi/numba-mpi
6
+ Author: https://github.com/numba-mpi/numba-mpi/graphs/contributors
7
+ License: GPL v3
8
+ Project-URL: Tracker, https://github.com/numba-mpi/numba-mpi/issues
9
+ Project-URL: Documentation, https://numba-mpi.github.io/numba-mpi
10
+ Project-URL: Source, https://github.com/numba-mpi/numba-mpi
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: numba
14
+ Requires-Dist: numpy
15
+ Requires-Dist: mpi4py
16
+ Requires-Dist: psutil
17
+ Provides-Extra: tests
18
+ Requires-Dist: pytest<8.0.0; extra == "tests"
19
+
20
+ # <img src="https://raw.githubusercontent.com/numba-mpi/numba-mpi/main/.github/numba_mpi_logo.svg" style="height:50pt" alt="numba-mpi logo"> numba-mpi
21
+
22
+ [![Python 3](https://img.shields.io/static/v1?label=Python&logo=Python&color=3776AB&message=3)](https://www.python.org/)
23
+ [![LLVM](https://img.shields.io/static/v1?label=LLVM&logo=LLVM&color=gold&message=Numba)](https://numba.pydata.org)
24
+ [![Linux OK](https://img.shields.io/static/v1?label=Linux&logo=Linux&color=yellow&message=%E2%9C%93)](https://en.wikipedia.org/wiki/Linux)
25
+ [![macOS OK](https://img.shields.io/static/v1?label=macOS&logo=Apple&color=silver&message=%E2%9C%93)](https://en.wikipedia.org/wiki/macOS)
26
+ [![Windows OK](https://img.shields.io/static/v1?label=Windows&logo=Windows&color=white&message=%E2%9C%93)](https://en.wikipedia.org/wiki/Windows)
27
+ [![Github Actions Status](https://github.com/numba-mpi/numba-mpi/workflows/tests+pypi/badge.svg?branch=main)](https://github.com/numba-mpi/numba-mpi/actions/workflows/tests+pypi.yml)
28
+ [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/numba-mpi/numba-mpi/graphs/commit-activity)
29
+ [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
30
+ [![PyPI version](https://badge.fury.io/py/numba-mpi.svg)](https://pypi.org/project/numba-mpi)
31
+ [![Anaconda-Server Badge](https://anaconda.org/conda-forge/numba-mpi/badges/version.svg)](https://anaconda.org/conda-forge/numba-mpi)
32
+ [![AUR package](https://repology.org/badge/version-for-repo/aur/python:numba-mpi.svg)](https://aur.archlinux.org/packages/python-numba-mpi)
33
+ [![DOI](https://zenodo.org/badge/316911228.svg)](https://zenodo.org/badge/latestdoi/316911228)
34
+
35
+ ### Overview
36
+ 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) (@njit mode).
37
+
38
+ Support is provided for a subset of MPI routines covering: `size`/`rank`, `send`/`recv`, `allreduce`, `bcast`, `scatter`/`gather` & `allgather`, `barrier`, `wtime`
39
+ and basic asynchronous communication with `isend`/`irecv` (only for contiguous arrays); for request handling including `wait`/`waitall`/`waitany` and `test`/`testall`/`testany`.
40
+
41
+ The API uses NumPy and supports both numeric and character datatypes (e.g., `broadcast`).
42
+ Auto-generated docstring-based API docs are published on the web: https://numba-mpi.github.io/numba-mpi
43
+
44
+ Packages can be obtained from
45
+ [PyPI](https://pypi.org/project/numba-mpi),
46
+ [Conda Forge](https://anaconda.org/conda-forge/numba-mpi),
47
+ [Arch Linux](https://aur.archlinux.org/packages/python-numba-mpi)
48
+ or by invoking `pip install git+https://github.com/numba-mpi/numba-mpi.git`.
49
+
50
+ numba-mpi is a pure-Python package.
51
+ The codebase includes a test suite used through the GitHub Actions workflows ([thanks to mpi4py's setup-mpi](https://github.com/mpi4py/setup-mpi)!)
52
+ for automated testing on: Linux ([MPICH](https://www.mpich.org/), [OpenMPI](https://www.open-mpi.org/doc/)
53
+ & [Intel MPI](https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library.html)),
54
+ macOS ([MPICH](https://www.mpich.org/) & [OpenMPI](https://www.open-mpi.org/doc/)) and
55
+ Windows ([MS MPI](https://docs.microsoft.com/en-us/message-passing-interface/microsoft-mpi)).
56
+
57
+ Features that are not implemented yet include (help welcome!):
58
+ - support for non-default communicators
59
+ - support for `MPI_IN_PLACE` in `[all]gather`/`scatter` and `allreduce`
60
+ - support for `MPI_Type_create_struct` (Numpy structured arrays)
61
+ - ...
62
+
63
+ ### Hello world send/recv example:
64
+ ```python
65
+ import numba, numba_mpi, numpy
66
+
67
+ @numba.njit()
68
+ def hello():
69
+ src = numpy.array([1., 2., 3., 4., 5.])
70
+ dst_tst = numpy.empty_like(src)
71
+
72
+ if numba_mpi.rank() == 0:
73
+ numba_mpi.send(src, dest=1, tag=11)
74
+ elif numba_mpi.rank() == 1:
75
+ numba_mpi.recv(dst_tst, source=0, tag=11)
76
+
77
+ hello()
78
+ ```
79
+
80
+ ### Example comparing numba-mpi vs. mpi4py performance:
81
+
82
+ The example below compares Numba + mpi4py vs. Numba + numba-mpi performance.
83
+ The sample code estimates $\pi$ by integration of $4/(1+x^2)$ between 0 and 1
84
+ dividing the workload into `n_intervals` handled by separate MPI processes
85
+ and then obtaining a sum using `allreduce`.
86
+ The computation is carried out in a JIT-compiled function and is repeated
87
+ `N_TIMES`, the repetitions and the MPI-handled reduction are done outside or
88
+ inside of the JIT-compiled block for mpi4py and numba-mpi, respectively.
89
+ Timing is repeated `N_REPEAT` times and the minimum time is reported.
90
+ The generated plot shown below depicts the speedup obtained by replacing mpi4py
91
+ with numba_mpi as a function of `n_intervals` - the more often communication
92
+ is needed (smaller `n_intervals`), the larger the expected speedup.
93
+
94
+ ```python
95
+ import timeit, mpi4py, numba, numpy as np, numba_mpi
96
+
97
+ N_TIMES = 10000
98
+ N_REPEAT = 10
99
+ RTOL = 1e-3
100
+
101
+ @numba.njit
102
+ def get_pi_part(out, n_intervals, rank, size):
103
+ h = 1 / n_intervals
104
+ partial_sum = 0.0
105
+ for i in range(rank + 1, n_intervals, size):
106
+ x = h * (i - 0.5)
107
+ partial_sum += 4 / (1 + x**2)
108
+ out[0] = h * partial_sum
109
+
110
+ @numba.njit
111
+ def pi_numba_mpi(n_intervals):
112
+ pi = np.array([0.])
113
+ part = np.empty_like(pi)
114
+ for _ in range(N_TIMES):
115
+ get_pi_part(part, n_intervals, numba_mpi.rank(), numba_mpi.size())
116
+ numba_mpi.allreduce(part, pi, numba_mpi.Operator.SUM)
117
+ assert abs(pi[0] - np.pi) / np.pi < RTOL
118
+
119
+ def pi_mpi4py(n_intervals):
120
+ pi = np.array([0.])
121
+ part = np.empty_like(pi)
122
+ for _ in range(N_TIMES):
123
+ get_pi_part(part, n_intervals, mpi4py.MPI.COMM_WORLD.rank, mpi4py.MPI.COMM_WORLD.size)
124
+ mpi4py.MPI.COMM_WORLD.Allreduce(part, (pi, mpi4py.MPI.DOUBLE), op=mpi4py.MPI.SUM)
125
+ assert abs(pi[0] - np.pi) / np.pi < RTOL
126
+
127
+ plot_x = [1000 * k for k in range(1, 11)]
128
+ plot_y = {'numba_mpi': [], 'mpi4py': []}
129
+ for n_intervals in plot_x:
130
+ for impl in plot_y:
131
+ plot_y[impl].append(min(timeit.repeat(
132
+ f"pi_{impl}({n_intervals})",
133
+ globals=locals(),
134
+ number=1,
135
+ repeat=N_REPEAT
136
+ )))
137
+
138
+ if numba_mpi.rank() == 0:
139
+ from matplotlib import pyplot
140
+ pyplot.figure(figsize=(8.3, 3.5), tight_layout=True)
141
+ pyplot.plot(plot_x, np.array(plot_y['mpi4py'])/np.array(plot_y['numba_mpi']), marker='o')
142
+ pyplot.xlabel('n_intervals (workload in between communication)')
143
+ pyplot.ylabel('wall time ratio (mpi4py / numba_mpi)')
144
+ pyplot.title(f'mpiexec -np {numba_mpi.size()}')
145
+ pyplot.grid()
146
+ pyplot.savefig('readme_plot.png')
147
+ ```
148
+
149
+ ![plot](https://github.com/numba-mpi/numba-mpi/releases/download/tip/readme_plot.png)
150
+
151
+
152
+ ### MPI resources on the web:
153
+
154
+ - MPI standard and general information:
155
+ - https://www.mpi-forum.org/docs
156
+ - https://en.wikipedia.org/wiki/Message_Passing_Interface
157
+ - MPI implementations:
158
+ - OpenMPI: https://www.open-mpi.org
159
+ - MPICH: https://www.mpich.org
160
+ - MS MPI: https://learn.microsoft.com/en-us/message-passing-interface
161
+ - Intel MPI: https://intel.com/content/www/us/en/developer/tools/oneapi/mpi-library-documentation.html
162
+ - MPI bindings:
163
+ - Python: https://mpi4py.readthedocs.io
164
+ - Julia: https://juliaparallel.org/MPI.jl
165
+ - Rust: https://docs.rs/mpi
166
+ - C++: https://boost.org/doc/html/mpi.html
167
+ - R: https://cran.r-project.org/web/packages/Rmpi
168
+
169
+ ### Acknowledgements:
170
+
171
+ 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).
172
+
@@ -0,0 +1,153 @@
1
+ # <img src="https://raw.githubusercontent.com/numba-mpi/numba-mpi/main/.github/numba_mpi_logo.svg" style="height:50pt" alt="numba-mpi logo"> numba-mpi
2
+
3
+ [![Python 3](https://img.shields.io/static/v1?label=Python&logo=Python&color=3776AB&message=3)](https://www.python.org/)
4
+ [![LLVM](https://img.shields.io/static/v1?label=LLVM&logo=LLVM&color=gold&message=Numba)](https://numba.pydata.org)
5
+ [![Linux OK](https://img.shields.io/static/v1?label=Linux&logo=Linux&color=yellow&message=%E2%9C%93)](https://en.wikipedia.org/wiki/Linux)
6
+ [![macOS OK](https://img.shields.io/static/v1?label=macOS&logo=Apple&color=silver&message=%E2%9C%93)](https://en.wikipedia.org/wiki/macOS)
7
+ [![Windows OK](https://img.shields.io/static/v1?label=Windows&logo=Windows&color=white&message=%E2%9C%93)](https://en.wikipedia.org/wiki/Windows)
8
+ [![Github Actions Status](https://github.com/numba-mpi/numba-mpi/workflows/tests+pypi/badge.svg?branch=main)](https://github.com/numba-mpi/numba-mpi/actions/workflows/tests+pypi.yml)
9
+ [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/numba-mpi/numba-mpi/graphs/commit-activity)
10
+ [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
11
+ [![PyPI version](https://badge.fury.io/py/numba-mpi.svg)](https://pypi.org/project/numba-mpi)
12
+ [![Anaconda-Server Badge](https://anaconda.org/conda-forge/numba-mpi/badges/version.svg)](https://anaconda.org/conda-forge/numba-mpi)
13
+ [![AUR package](https://repology.org/badge/version-for-repo/aur/python:numba-mpi.svg)](https://aur.archlinux.org/packages/python-numba-mpi)
14
+ [![DOI](https://zenodo.org/badge/316911228.svg)](https://zenodo.org/badge/latestdoi/316911228)
15
+
16
+ ### Overview
17
+ 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) (@njit mode).
18
+
19
+ Support is provided for a subset of MPI routines covering: `size`/`rank`, `send`/`recv`, `allreduce`, `bcast`, `scatter`/`gather` & `allgather`, `barrier`, `wtime`
20
+ and basic asynchronous communication with `isend`/`irecv` (only for contiguous arrays); for request handling including `wait`/`waitall`/`waitany` and `test`/`testall`/`testany`.
21
+
22
+ The API uses NumPy and supports both numeric and character datatypes (e.g., `broadcast`).
23
+ Auto-generated docstring-based API docs are published on the web: https://numba-mpi.github.io/numba-mpi
24
+
25
+ Packages can be obtained from
26
+ [PyPI](https://pypi.org/project/numba-mpi),
27
+ [Conda Forge](https://anaconda.org/conda-forge/numba-mpi),
28
+ [Arch Linux](https://aur.archlinux.org/packages/python-numba-mpi)
29
+ or by invoking `pip install git+https://github.com/numba-mpi/numba-mpi.git`.
30
+
31
+ numba-mpi is a pure-Python package.
32
+ The codebase includes a test suite used through the GitHub Actions workflows ([thanks to mpi4py's setup-mpi](https://github.com/mpi4py/setup-mpi)!)
33
+ for automated testing on: Linux ([MPICH](https://www.mpich.org/), [OpenMPI](https://www.open-mpi.org/doc/)
34
+ & [Intel MPI](https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library.html)),
35
+ macOS ([MPICH](https://www.mpich.org/) & [OpenMPI](https://www.open-mpi.org/doc/)) and
36
+ Windows ([MS MPI](https://docs.microsoft.com/en-us/message-passing-interface/microsoft-mpi)).
37
+
38
+ Features that are not implemented yet include (help welcome!):
39
+ - support for non-default communicators
40
+ - support for `MPI_IN_PLACE` in `[all]gather`/`scatter` and `allreduce`
41
+ - support for `MPI_Type_create_struct` (Numpy structured arrays)
42
+ - ...
43
+
44
+ ### Hello world send/recv example:
45
+ ```python
46
+ import numba, numba_mpi, numpy
47
+
48
+ @numba.njit()
49
+ def hello():
50
+ src = numpy.array([1., 2., 3., 4., 5.])
51
+ dst_tst = numpy.empty_like(src)
52
+
53
+ if numba_mpi.rank() == 0:
54
+ numba_mpi.send(src, dest=1, tag=11)
55
+ elif numba_mpi.rank() == 1:
56
+ numba_mpi.recv(dst_tst, source=0, tag=11)
57
+
58
+ hello()
59
+ ```
60
+
61
+ ### Example comparing numba-mpi vs. mpi4py performance:
62
+
63
+ The example below compares Numba + mpi4py vs. Numba + numba-mpi performance.
64
+ The sample code estimates $\pi$ by integration of $4/(1+x^2)$ between 0 and 1
65
+ dividing the workload into `n_intervals` handled by separate MPI processes
66
+ and then obtaining a sum using `allreduce`.
67
+ The computation is carried out in a JIT-compiled function and is repeated
68
+ `N_TIMES`, the repetitions and the MPI-handled reduction are done outside or
69
+ inside of the JIT-compiled block for mpi4py and numba-mpi, respectively.
70
+ Timing is repeated `N_REPEAT` times and the minimum time is reported.
71
+ The generated plot shown below depicts the speedup obtained by replacing mpi4py
72
+ with numba_mpi as a function of `n_intervals` - the more often communication
73
+ is needed (smaller `n_intervals`), the larger the expected speedup.
74
+
75
+ ```python
76
+ import timeit, mpi4py, numba, numpy as np, numba_mpi
77
+
78
+ N_TIMES = 10000
79
+ N_REPEAT = 10
80
+ RTOL = 1e-3
81
+
82
+ @numba.njit
83
+ def get_pi_part(out, n_intervals, rank, size):
84
+ h = 1 / n_intervals
85
+ partial_sum = 0.0
86
+ for i in range(rank + 1, n_intervals, size):
87
+ x = h * (i - 0.5)
88
+ partial_sum += 4 / (1 + x**2)
89
+ out[0] = h * partial_sum
90
+
91
+ @numba.njit
92
+ def pi_numba_mpi(n_intervals):
93
+ pi = np.array([0.])
94
+ part = np.empty_like(pi)
95
+ for _ in range(N_TIMES):
96
+ get_pi_part(part, n_intervals, numba_mpi.rank(), numba_mpi.size())
97
+ numba_mpi.allreduce(part, pi, numba_mpi.Operator.SUM)
98
+ assert abs(pi[0] - np.pi) / np.pi < RTOL
99
+
100
+ def pi_mpi4py(n_intervals):
101
+ pi = np.array([0.])
102
+ part = np.empty_like(pi)
103
+ for _ in range(N_TIMES):
104
+ get_pi_part(part, n_intervals, mpi4py.MPI.COMM_WORLD.rank, mpi4py.MPI.COMM_WORLD.size)
105
+ mpi4py.MPI.COMM_WORLD.Allreduce(part, (pi, mpi4py.MPI.DOUBLE), op=mpi4py.MPI.SUM)
106
+ assert abs(pi[0] - np.pi) / np.pi < RTOL
107
+
108
+ plot_x = [1000 * k for k in range(1, 11)]
109
+ plot_y = {'numba_mpi': [], 'mpi4py': []}
110
+ for n_intervals in plot_x:
111
+ for impl in plot_y:
112
+ plot_y[impl].append(min(timeit.repeat(
113
+ f"pi_{impl}({n_intervals})",
114
+ globals=locals(),
115
+ number=1,
116
+ repeat=N_REPEAT
117
+ )))
118
+
119
+ if numba_mpi.rank() == 0:
120
+ from matplotlib import pyplot
121
+ pyplot.figure(figsize=(8.3, 3.5), tight_layout=True)
122
+ pyplot.plot(plot_x, np.array(plot_y['mpi4py'])/np.array(plot_y['numba_mpi']), marker='o')
123
+ pyplot.xlabel('n_intervals (workload in between communication)')
124
+ pyplot.ylabel('wall time ratio (mpi4py / numba_mpi)')
125
+ pyplot.title(f'mpiexec -np {numba_mpi.size()}')
126
+ pyplot.grid()
127
+ pyplot.savefig('readme_plot.png')
128
+ ```
129
+
130
+ ![plot](https://github.com/numba-mpi/numba-mpi/releases/download/tip/readme_plot.png)
131
+
132
+
133
+ ### MPI resources on the web:
134
+
135
+ - MPI standard and general information:
136
+ - https://www.mpi-forum.org/docs
137
+ - https://en.wikipedia.org/wiki/Message_Passing_Interface
138
+ - MPI implementations:
139
+ - OpenMPI: https://www.open-mpi.org
140
+ - MPICH: https://www.mpich.org
141
+ - MS MPI: https://learn.microsoft.com/en-us/message-passing-interface
142
+ - Intel MPI: https://intel.com/content/www/us/en/developer/tools/oneapi/mpi-library-documentation.html
143
+ - MPI bindings:
144
+ - Python: https://mpi4py.readthedocs.io
145
+ - Julia: https://juliaparallel.org/MPI.jl
146
+ - Rust: https://docs.rs/mpi
147
+ - C++: https://boost.org/doc/html/mpi.html
148
+ - R: https://cran.r-project.org/web/packages/Rmpi
149
+
150
+ ### Acknowledgements:
151
+
152
+ 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).
153
+
@@ -0,0 +1,172 @@
1
+ Metadata-Version: 2.1
2
+ Name: numba-mpi
3
+ Version: 0.41
4
+ Summary: Numba @njittable MPI wrappers tested on Linux, macOS and Windows
5
+ Home-page: https://github.com/numba-mpi/numba-mpi
6
+ Author: https://github.com/numba-mpi/numba-mpi/graphs/contributors
7
+ License: GPL v3
8
+ Project-URL: Tracker, https://github.com/numba-mpi/numba-mpi/issues
9
+ Project-URL: Documentation, https://numba-mpi.github.io/numba-mpi
10
+ Project-URL: Source, https://github.com/numba-mpi/numba-mpi
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: numba
14
+ Requires-Dist: numpy
15
+ Requires-Dist: mpi4py
16
+ Requires-Dist: psutil
17
+ Provides-Extra: tests
18
+ Requires-Dist: pytest<8.0.0; extra == "tests"
19
+
20
+ # <img src="https://raw.githubusercontent.com/numba-mpi/numba-mpi/main/.github/numba_mpi_logo.svg" style="height:50pt" alt="numba-mpi logo"> numba-mpi
21
+
22
+ [![Python 3](https://img.shields.io/static/v1?label=Python&logo=Python&color=3776AB&message=3)](https://www.python.org/)
23
+ [![LLVM](https://img.shields.io/static/v1?label=LLVM&logo=LLVM&color=gold&message=Numba)](https://numba.pydata.org)
24
+ [![Linux OK](https://img.shields.io/static/v1?label=Linux&logo=Linux&color=yellow&message=%E2%9C%93)](https://en.wikipedia.org/wiki/Linux)
25
+ [![macOS OK](https://img.shields.io/static/v1?label=macOS&logo=Apple&color=silver&message=%E2%9C%93)](https://en.wikipedia.org/wiki/macOS)
26
+ [![Windows OK](https://img.shields.io/static/v1?label=Windows&logo=Windows&color=white&message=%E2%9C%93)](https://en.wikipedia.org/wiki/Windows)
27
+ [![Github Actions Status](https://github.com/numba-mpi/numba-mpi/workflows/tests+pypi/badge.svg?branch=main)](https://github.com/numba-mpi/numba-mpi/actions/workflows/tests+pypi.yml)
28
+ [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/numba-mpi/numba-mpi/graphs/commit-activity)
29
+ [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
30
+ [![PyPI version](https://badge.fury.io/py/numba-mpi.svg)](https://pypi.org/project/numba-mpi)
31
+ [![Anaconda-Server Badge](https://anaconda.org/conda-forge/numba-mpi/badges/version.svg)](https://anaconda.org/conda-forge/numba-mpi)
32
+ [![AUR package](https://repology.org/badge/version-for-repo/aur/python:numba-mpi.svg)](https://aur.archlinux.org/packages/python-numba-mpi)
33
+ [![DOI](https://zenodo.org/badge/316911228.svg)](https://zenodo.org/badge/latestdoi/316911228)
34
+
35
+ ### Overview
36
+ 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) (@njit mode).
37
+
38
+ Support is provided for a subset of MPI routines covering: `size`/`rank`, `send`/`recv`, `allreduce`, `bcast`, `scatter`/`gather` & `allgather`, `barrier`, `wtime`
39
+ and basic asynchronous communication with `isend`/`irecv` (only for contiguous arrays); for request handling including `wait`/`waitall`/`waitany` and `test`/`testall`/`testany`.
40
+
41
+ The API uses NumPy and supports both numeric and character datatypes (e.g., `broadcast`).
42
+ Auto-generated docstring-based API docs are published on the web: https://numba-mpi.github.io/numba-mpi
43
+
44
+ Packages can be obtained from
45
+ [PyPI](https://pypi.org/project/numba-mpi),
46
+ [Conda Forge](https://anaconda.org/conda-forge/numba-mpi),
47
+ [Arch Linux](https://aur.archlinux.org/packages/python-numba-mpi)
48
+ or by invoking `pip install git+https://github.com/numba-mpi/numba-mpi.git`.
49
+
50
+ numba-mpi is a pure-Python package.
51
+ The codebase includes a test suite used through the GitHub Actions workflows ([thanks to mpi4py's setup-mpi](https://github.com/mpi4py/setup-mpi)!)
52
+ for automated testing on: Linux ([MPICH](https://www.mpich.org/), [OpenMPI](https://www.open-mpi.org/doc/)
53
+ & [Intel MPI](https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library.html)),
54
+ macOS ([MPICH](https://www.mpich.org/) & [OpenMPI](https://www.open-mpi.org/doc/)) and
55
+ Windows ([MS MPI](https://docs.microsoft.com/en-us/message-passing-interface/microsoft-mpi)).
56
+
57
+ Features that are not implemented yet include (help welcome!):
58
+ - support for non-default communicators
59
+ - support for `MPI_IN_PLACE` in `[all]gather`/`scatter` and `allreduce`
60
+ - support for `MPI_Type_create_struct` (Numpy structured arrays)
61
+ - ...
62
+
63
+ ### Hello world send/recv example:
64
+ ```python
65
+ import numba, numba_mpi, numpy
66
+
67
+ @numba.njit()
68
+ def hello():
69
+ src = numpy.array([1., 2., 3., 4., 5.])
70
+ dst_tst = numpy.empty_like(src)
71
+
72
+ if numba_mpi.rank() == 0:
73
+ numba_mpi.send(src, dest=1, tag=11)
74
+ elif numba_mpi.rank() == 1:
75
+ numba_mpi.recv(dst_tst, source=0, tag=11)
76
+
77
+ hello()
78
+ ```
79
+
80
+ ### Example comparing numba-mpi vs. mpi4py performance:
81
+
82
+ The example below compares Numba + mpi4py vs. Numba + numba-mpi performance.
83
+ The sample code estimates $\pi$ by integration of $4/(1+x^2)$ between 0 and 1
84
+ dividing the workload into `n_intervals` handled by separate MPI processes
85
+ and then obtaining a sum using `allreduce`.
86
+ The computation is carried out in a JIT-compiled function and is repeated
87
+ `N_TIMES`, the repetitions and the MPI-handled reduction are done outside or
88
+ inside of the JIT-compiled block for mpi4py and numba-mpi, respectively.
89
+ Timing is repeated `N_REPEAT` times and the minimum time is reported.
90
+ The generated plot shown below depicts the speedup obtained by replacing mpi4py
91
+ with numba_mpi as a function of `n_intervals` - the more often communication
92
+ is needed (smaller `n_intervals`), the larger the expected speedup.
93
+
94
+ ```python
95
+ import timeit, mpi4py, numba, numpy as np, numba_mpi
96
+
97
+ N_TIMES = 10000
98
+ N_REPEAT = 10
99
+ RTOL = 1e-3
100
+
101
+ @numba.njit
102
+ def get_pi_part(out, n_intervals, rank, size):
103
+ h = 1 / n_intervals
104
+ partial_sum = 0.0
105
+ for i in range(rank + 1, n_intervals, size):
106
+ x = h * (i - 0.5)
107
+ partial_sum += 4 / (1 + x**2)
108
+ out[0] = h * partial_sum
109
+
110
+ @numba.njit
111
+ def pi_numba_mpi(n_intervals):
112
+ pi = np.array([0.])
113
+ part = np.empty_like(pi)
114
+ for _ in range(N_TIMES):
115
+ get_pi_part(part, n_intervals, numba_mpi.rank(), numba_mpi.size())
116
+ numba_mpi.allreduce(part, pi, numba_mpi.Operator.SUM)
117
+ assert abs(pi[0] - np.pi) / np.pi < RTOL
118
+
119
+ def pi_mpi4py(n_intervals):
120
+ pi = np.array([0.])
121
+ part = np.empty_like(pi)
122
+ for _ in range(N_TIMES):
123
+ get_pi_part(part, n_intervals, mpi4py.MPI.COMM_WORLD.rank, mpi4py.MPI.COMM_WORLD.size)
124
+ mpi4py.MPI.COMM_WORLD.Allreduce(part, (pi, mpi4py.MPI.DOUBLE), op=mpi4py.MPI.SUM)
125
+ assert abs(pi[0] - np.pi) / np.pi < RTOL
126
+
127
+ plot_x = [1000 * k for k in range(1, 11)]
128
+ plot_y = {'numba_mpi': [], 'mpi4py': []}
129
+ for n_intervals in plot_x:
130
+ for impl in plot_y:
131
+ plot_y[impl].append(min(timeit.repeat(
132
+ f"pi_{impl}({n_intervals})",
133
+ globals=locals(),
134
+ number=1,
135
+ repeat=N_REPEAT
136
+ )))
137
+
138
+ if numba_mpi.rank() == 0:
139
+ from matplotlib import pyplot
140
+ pyplot.figure(figsize=(8.3, 3.5), tight_layout=True)
141
+ pyplot.plot(plot_x, np.array(plot_y['mpi4py'])/np.array(plot_y['numba_mpi']), marker='o')
142
+ pyplot.xlabel('n_intervals (workload in between communication)')
143
+ pyplot.ylabel('wall time ratio (mpi4py / numba_mpi)')
144
+ pyplot.title(f'mpiexec -np {numba_mpi.size()}')
145
+ pyplot.grid()
146
+ pyplot.savefig('readme_plot.png')
147
+ ```
148
+
149
+ ![plot](https://github.com/numba-mpi/numba-mpi/releases/download/tip/readme_plot.png)
150
+
151
+
152
+ ### MPI resources on the web:
153
+
154
+ - MPI standard and general information:
155
+ - https://www.mpi-forum.org/docs
156
+ - https://en.wikipedia.org/wiki/Message_Passing_Interface
157
+ - MPI implementations:
158
+ - OpenMPI: https://www.open-mpi.org
159
+ - MPICH: https://www.mpich.org
160
+ - MS MPI: https://learn.microsoft.com/en-us/message-passing-interface
161
+ - Intel MPI: https://intel.com/content/www/us/en/developer/tools/oneapi/mpi-library-documentation.html
162
+ - MPI bindings:
163
+ - Python: https://mpi4py.readthedocs.io
164
+ - Julia: https://juliaparallel.org/MPI.jl
165
+ - Rust: https://docs.rs/mpi
166
+ - C++: https://boost.org/doc/html/mpi.html
167
+ - R: https://cran.r-project.org/web/packages/Rmpi
168
+
169
+ ### Acknowledgements:
170
+
171
+ 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).
172
+
numba-mpi-0.40/PKG-INFO DELETED
@@ -1,66 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: numba-mpi
3
- Version: 0.40
4
- Summary: Numba @njittable MPI wrappers tested on Linux, macOS and Windows
5
- Home-page: https://github.com/numba-mpi/numba-mpi
6
- Author: https://github.com/numba-mpi/numba-mpi/graphs/contributors
7
- License: GPL v3
8
- Project-URL: Tracker, https://github.com/numba-mpi/numba-mpi/issues
9
- Project-URL: Documentation, https://numba-mpi.github.io/numba-mpi
10
- Project-URL: Source, https://github.com/numba-mpi/numba-mpi
11
- Description-Content-Type: text/markdown
12
- License-File: LICENSE
13
- Requires-Dist: numba
14
- Requires-Dist: numpy
15
- Requires-Dist: mpi4py
16
- Requires-Dist: psutil
17
- Provides-Extra: tests
18
- Requires-Dist: pytest<8.0.0; extra == "tests"
19
-
20
- # <img src="https://raw.githubusercontent.com/numba-mpi/numba-mpi/main/.github/numba_mpi_logo.svg" style="height:50pt" alt="numba-mpi logo"> numba-mpi
21
-
22
- [![Python 3](https://img.shields.io/static/v1?label=Python&logo=Python&color=3776AB&message=3)](https://www.python.org/)
23
- [![LLVM](https://img.shields.io/static/v1?label=LLVM&logo=LLVM&color=gold&message=Numba)](https://numba.pydata.org)
24
- [![Linux OK](https://img.shields.io/static/v1?label=Linux&logo=Linux&color=yellow&message=%E2%9C%93)](https://en.wikipedia.org/wiki/Linux)
25
- [![macOS OK](https://img.shields.io/static/v1?label=macOS&logo=Apple&color=silver&message=%E2%9C%93)](https://en.wikipedia.org/wiki/macOS)
26
- [![Windows OK](https://img.shields.io/static/v1?label=Windows&logo=Windows&color=white&message=%E2%9C%93)](https://en.wikipedia.org/wiki/Windows)
27
- [![Github Actions Status](https://github.com/numba-mpi/numba-mpi/workflows/tests+pypi/badge.svg?branch=main)](https://github.com/numba-mpi/numba-mpi/actions/workflows/tests+pypi.yml)
28
- [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/numba-mpi/numba-mpi/graphs/commit-activity)
29
- [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
30
- [![PyPI version](https://badge.fury.io/py/numba-mpi.svg)](https://pypi.org/project/numba-mpi)
31
- [![Anaconda-Server Badge](https://anaconda.org/conda-forge/numba-mpi/badges/version.svg)](https://anaconda.org/conda-forge/numba-mpi)
32
- [![AUR package](https://repology.org/badge/version-for-repo/aur/python:numba-mpi.svg)](https://aur.archlinux.org/packages/python-numba-mpi)
33
- [![DOI](https://zenodo.org/badge/316911228.svg)](https://zenodo.org/badge/latestdoi/316911228)
34
-
35
- #### Numba @njittable MPI wrappers
36
- - covering: `size`/`rank`, `send`/`recv`, `allreduce`, `bcast`, `scatter`/`gather` & `allgather`, `barrier` and `wtime`
37
- - basic asynchronous communication with `isend`/`irecv` (only for contiguous arrays); for request handling including `wait`/`waitall`/`waitany` and `test`/`testall`/`testany`
38
- - not yet implemented: support for non-default communicators, ...
39
- - API based on NumPy and supporting numeric and character datatypes
40
- - auto-generated docstring-based API docs on the web: https://numba-mpi.github.io/numba-mpi
41
- - pure-Python implementation with packages available at [PyPI](https://pypi.org/project/numba-mpi), [Conda Forge](https://anaconda.org/conda-forge/numba-mpi) and for [Arch Linux](https://aur.archlinux.org/packages/python-numba-mpi)
42
- - CI-tested on: Linux ([MPICH](https://www.mpich.org/), [OpenMPI](https://www.open-mpi.org/doc/) & [Intel MPI](https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library.html)), macOS ([MPICH](https://www.mpich.org/) & [OpenMPI](https://www.open-mpi.org/doc/)) and Windows ([MS MPI](https://docs.microsoft.com/en-us/message-passing-interface/microsoft-mpi))
43
-
44
- Hello world example:
45
- ```python
46
- import numba, numba_mpi, numpy
47
-
48
- @numba.njit()
49
- def hello():
50
- print(numba_mpi.rank())
51
- print(numba_mpi.size())
52
-
53
- src = numpy.array([1., 2., 3., 4., 5.])
54
- dst_tst = numpy.empty_like(src)
55
-
56
- if numba_mpi.rank() == 0:
57
- numba_mpi.send(src, dest=1, tag=11)
58
- elif numba_mpi.rank() == 1:
59
- numba_mpi.recv(dst_tst, source=0, tag=11)
60
-
61
- hello()
62
- ```
63
-
64
- For information on MPI, see:
65
- - https://www.mpi-forum.org/docs/
66
- - https://mpi4py.readthedocs.io/en/stable/
numba-mpi-0.40/README.md DELETED
@@ -1,47 +0,0 @@
1
- # <img src="https://raw.githubusercontent.com/numba-mpi/numba-mpi/main/.github/numba_mpi_logo.svg" style="height:50pt" alt="numba-mpi logo"> numba-mpi
2
-
3
- [![Python 3](https://img.shields.io/static/v1?label=Python&logo=Python&color=3776AB&message=3)](https://www.python.org/)
4
- [![LLVM](https://img.shields.io/static/v1?label=LLVM&logo=LLVM&color=gold&message=Numba)](https://numba.pydata.org)
5
- [![Linux OK](https://img.shields.io/static/v1?label=Linux&logo=Linux&color=yellow&message=%E2%9C%93)](https://en.wikipedia.org/wiki/Linux)
6
- [![macOS OK](https://img.shields.io/static/v1?label=macOS&logo=Apple&color=silver&message=%E2%9C%93)](https://en.wikipedia.org/wiki/macOS)
7
- [![Windows OK](https://img.shields.io/static/v1?label=Windows&logo=Windows&color=white&message=%E2%9C%93)](https://en.wikipedia.org/wiki/Windows)
8
- [![Github Actions Status](https://github.com/numba-mpi/numba-mpi/workflows/tests+pypi/badge.svg?branch=main)](https://github.com/numba-mpi/numba-mpi/actions/workflows/tests+pypi.yml)
9
- [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/numba-mpi/numba-mpi/graphs/commit-activity)
10
- [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
11
- [![PyPI version](https://badge.fury.io/py/numba-mpi.svg)](https://pypi.org/project/numba-mpi)
12
- [![Anaconda-Server Badge](https://anaconda.org/conda-forge/numba-mpi/badges/version.svg)](https://anaconda.org/conda-forge/numba-mpi)
13
- [![AUR package](https://repology.org/badge/version-for-repo/aur/python:numba-mpi.svg)](https://aur.archlinux.org/packages/python-numba-mpi)
14
- [![DOI](https://zenodo.org/badge/316911228.svg)](https://zenodo.org/badge/latestdoi/316911228)
15
-
16
- #### Numba @njittable MPI wrappers
17
- - covering: `size`/`rank`, `send`/`recv`, `allreduce`, `bcast`, `scatter`/`gather` & `allgather`, `barrier` and `wtime`
18
- - basic asynchronous communication with `isend`/`irecv` (only for contiguous arrays); for request handling including `wait`/`waitall`/`waitany` and `test`/`testall`/`testany`
19
- - not yet implemented: support for non-default communicators, ...
20
- - API based on NumPy and supporting numeric and character datatypes
21
- - auto-generated docstring-based API docs on the web: https://numba-mpi.github.io/numba-mpi
22
- - pure-Python implementation with packages available at [PyPI](https://pypi.org/project/numba-mpi), [Conda Forge](https://anaconda.org/conda-forge/numba-mpi) and for [Arch Linux](https://aur.archlinux.org/packages/python-numba-mpi)
23
- - CI-tested on: Linux ([MPICH](https://www.mpich.org/), [OpenMPI](https://www.open-mpi.org/doc/) & [Intel MPI](https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library.html)), macOS ([MPICH](https://www.mpich.org/) & [OpenMPI](https://www.open-mpi.org/doc/)) and Windows ([MS MPI](https://docs.microsoft.com/en-us/message-passing-interface/microsoft-mpi))
24
-
25
- Hello world example:
26
- ```python
27
- import numba, numba_mpi, numpy
28
-
29
- @numba.njit()
30
- def hello():
31
- print(numba_mpi.rank())
32
- print(numba_mpi.size())
33
-
34
- src = numpy.array([1., 2., 3., 4., 5.])
35
- dst_tst = numpy.empty_like(src)
36
-
37
- if numba_mpi.rank() == 0:
38
- numba_mpi.send(src, dest=1, tag=11)
39
- elif numba_mpi.rank() == 1:
40
- numba_mpi.recv(dst_tst, source=0, tag=11)
41
-
42
- hello()
43
- ```
44
-
45
- For information on MPI, see:
46
- - https://www.mpi-forum.org/docs/
47
- - https://mpi4py.readthedocs.io/en/stable/
@@ -1,66 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: numba-mpi
3
- Version: 0.40
4
- Summary: Numba @njittable MPI wrappers tested on Linux, macOS and Windows
5
- Home-page: https://github.com/numba-mpi/numba-mpi
6
- Author: https://github.com/numba-mpi/numba-mpi/graphs/contributors
7
- License: GPL v3
8
- Project-URL: Tracker, https://github.com/numba-mpi/numba-mpi/issues
9
- Project-URL: Documentation, https://numba-mpi.github.io/numba-mpi
10
- Project-URL: Source, https://github.com/numba-mpi/numba-mpi
11
- Description-Content-Type: text/markdown
12
- License-File: LICENSE
13
- Requires-Dist: numba
14
- Requires-Dist: numpy
15
- Requires-Dist: mpi4py
16
- Requires-Dist: psutil
17
- Provides-Extra: tests
18
- Requires-Dist: pytest<8.0.0; extra == "tests"
19
-
20
- # <img src="https://raw.githubusercontent.com/numba-mpi/numba-mpi/main/.github/numba_mpi_logo.svg" style="height:50pt" alt="numba-mpi logo"> numba-mpi
21
-
22
- [![Python 3](https://img.shields.io/static/v1?label=Python&logo=Python&color=3776AB&message=3)](https://www.python.org/)
23
- [![LLVM](https://img.shields.io/static/v1?label=LLVM&logo=LLVM&color=gold&message=Numba)](https://numba.pydata.org)
24
- [![Linux OK](https://img.shields.io/static/v1?label=Linux&logo=Linux&color=yellow&message=%E2%9C%93)](https://en.wikipedia.org/wiki/Linux)
25
- [![macOS OK](https://img.shields.io/static/v1?label=macOS&logo=Apple&color=silver&message=%E2%9C%93)](https://en.wikipedia.org/wiki/macOS)
26
- [![Windows OK](https://img.shields.io/static/v1?label=Windows&logo=Windows&color=white&message=%E2%9C%93)](https://en.wikipedia.org/wiki/Windows)
27
- [![Github Actions Status](https://github.com/numba-mpi/numba-mpi/workflows/tests+pypi/badge.svg?branch=main)](https://github.com/numba-mpi/numba-mpi/actions/workflows/tests+pypi.yml)
28
- [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/numba-mpi/numba-mpi/graphs/commit-activity)
29
- [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
30
- [![PyPI version](https://badge.fury.io/py/numba-mpi.svg)](https://pypi.org/project/numba-mpi)
31
- [![Anaconda-Server Badge](https://anaconda.org/conda-forge/numba-mpi/badges/version.svg)](https://anaconda.org/conda-forge/numba-mpi)
32
- [![AUR package](https://repology.org/badge/version-for-repo/aur/python:numba-mpi.svg)](https://aur.archlinux.org/packages/python-numba-mpi)
33
- [![DOI](https://zenodo.org/badge/316911228.svg)](https://zenodo.org/badge/latestdoi/316911228)
34
-
35
- #### Numba @njittable MPI wrappers
36
- - covering: `size`/`rank`, `send`/`recv`, `allreduce`, `bcast`, `scatter`/`gather` & `allgather`, `barrier` and `wtime`
37
- - basic asynchronous communication with `isend`/`irecv` (only for contiguous arrays); for request handling including `wait`/`waitall`/`waitany` and `test`/`testall`/`testany`
38
- - not yet implemented: support for non-default communicators, ...
39
- - API based on NumPy and supporting numeric and character datatypes
40
- - auto-generated docstring-based API docs on the web: https://numba-mpi.github.io/numba-mpi
41
- - pure-Python implementation with packages available at [PyPI](https://pypi.org/project/numba-mpi), [Conda Forge](https://anaconda.org/conda-forge/numba-mpi) and for [Arch Linux](https://aur.archlinux.org/packages/python-numba-mpi)
42
- - CI-tested on: Linux ([MPICH](https://www.mpich.org/), [OpenMPI](https://www.open-mpi.org/doc/) & [Intel MPI](https://www.intel.com/content/www/us/en/developer/tools/oneapi/mpi-library.html)), macOS ([MPICH](https://www.mpich.org/) & [OpenMPI](https://www.open-mpi.org/doc/)) and Windows ([MS MPI](https://docs.microsoft.com/en-us/message-passing-interface/microsoft-mpi))
43
-
44
- Hello world example:
45
- ```python
46
- import numba, numba_mpi, numpy
47
-
48
- @numba.njit()
49
- def hello():
50
- print(numba_mpi.rank())
51
- print(numba_mpi.size())
52
-
53
- src = numpy.array([1., 2., 3., 4., 5.])
54
- dst_tst = numpy.empty_like(src)
55
-
56
- if numba_mpi.rank() == 0:
57
- numba_mpi.send(src, dest=1, tag=11)
58
- elif numba_mpi.rank() == 1:
59
- numba_mpi.recv(dst_tst, source=0, tag=11)
60
-
61
- hello()
62
- ```
63
-
64
- For information on MPI, see:
65
- - https://www.mpi-forum.org/docs/
66
- - https://mpi4py.readthedocs.io/en/stable/
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes