numba-mpi 0.39__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.39 → numba_mpi-0.41}/.github/workflows/readme_snippets.yml +12 -2
  2. {numba-mpi-0.39 → numba_mpi-0.41}/.github/workflows/stale.yml +7 -4
  3. {numba-mpi-0.39 → numba_mpi-0.41}/.github/workflows/tests+pypi.yml +11 -13
  4. {numba-mpi-0.39 → numba_mpi-0.41}/.pre-commit-config.yaml +3 -3
  5. numba_mpi-0.41/PKG-INFO +172 -0
  6. numba_mpi-0.41/README.md +153 -0
  7. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/__init__.py +4 -3
  8. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/api/allreduce.py +1 -0
  9. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/api/barrier.py +1 -0
  10. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/api/bcast.py +1 -0
  11. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/api/initialized.py +1 -0
  12. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/api/operator.py +1 -0
  13. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/api/rank.py +1 -0
  14. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/api/recv.py +1 -0
  15. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/api/requests.py +1 -0
  16. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/api/scatter_gather.py +1 -0
  17. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/api/send.py +1 -0
  18. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/api/size.py +1 -0
  19. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/api/wtime.py +1 -0
  20. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/common.py +1 -0
  21. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/utils.py +1 -0
  22. numba_mpi-0.41/numba_mpi.egg-info/PKG-INFO +172 -0
  23. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi.egg-info/requires.txt +3 -0
  24. {numba-mpi-0.39 → numba_mpi-0.41}/setup.py +2 -0
  25. numba-mpi-0.39/PKG-INFO +0 -63
  26. numba-mpi-0.39/README.md +0 -46
  27. numba-mpi-0.39/numba_mpi.egg-info/PKG-INFO +0 -63
  28. {numba-mpi-0.39 → numba_mpi-0.41}/.github/numba_mpi_logo.svg +0 -0
  29. {numba-mpi-0.39 → numba_mpi-0.41}/.gitignore +0 -0
  30. {numba-mpi-0.39 → numba_mpi-0.41}/.vscode/settings.json +0 -0
  31. {numba-mpi-0.39 → numba_mpi-0.41}/.zenodo.json +0 -0
  32. {numba-mpi-0.39 → numba_mpi-0.41}/LICENSE +0 -0
  33. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/api/__init__.py +0 -0
  34. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/api/irecv.py +0 -0
  35. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi/api/isend.py +0 -0
  36. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi.egg-info/SOURCES.txt +0 -0
  37. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi.egg-info/dependency_links.txt +0 -0
  38. {numba-mpi-0.39 → numba_mpi-0.41}/numba_mpi.egg-info/top_level.txt +0 -0
  39. {numba-mpi-0.39 → numba_mpi-0.41}/setup.cfg +0 -0
  40. {numba-mpi-0.39 → numba_mpi-0.41}/tests/__init__.py +0 -0
  41. {numba-mpi-0.39 → numba_mpi-0.41}/tests/api/test_allreduce.py +0 -0
  42. {numba-mpi-0.39 → numba_mpi-0.41}/tests/api/test_barrier.py +0 -0
  43. {numba-mpi-0.39 → numba_mpi-0.41}/tests/api/test_bcast.py +0 -0
  44. {numba-mpi-0.39 → numba_mpi-0.41}/tests/api/test_init.py +0 -0
  45. {numba-mpi-0.39 → numba_mpi-0.41}/tests/api/test_isend_irecv.py +0 -0
  46. {numba-mpi-0.39 → numba_mpi-0.41}/tests/api/test_rank.py +0 -0
  47. {numba-mpi-0.39 → numba_mpi-0.41}/tests/api/test_scatter_gather.py +0 -0
  48. {numba-mpi-0.39 → numba_mpi-0.41}/tests/api/test_send_recv.py +0 -0
  49. {numba-mpi-0.39 → numba_mpi-0.41}/tests/api/test_size.py +0 -0
  50. {numba-mpi-0.39 → numba_mpi-0.41}/tests/api/test_wtime.py +0 -0
  51. {numba-mpi-0.39 → numba_mpi-0.41}/tests/common.py +0 -0
  52. {numba-mpi-0.39 → numba_mpi-0.41}/tests/test_version.py +0 -0
  53. {numba-mpi-0.39 → 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
@@ -7,7 +7,7 @@ name: Mark stale issues and pull requests
7
7
 
8
8
  on:
9
9
  schedule:
10
- - cron: '33 12 * * *'
10
+ - cron: '45 12 * * *'
11
11
 
12
12
  jobs:
13
13
  stale:
@@ -18,10 +18,13 @@ jobs:
18
18
  pull-requests: write
19
19
 
20
20
  steps:
21
- - uses: actions/stale@v3
21
+ - uses: actions/stale@v9
22
22
  with:
23
23
  repo-token: ${{ secrets.GITHUB_TOKEN }}
24
24
  stale-issue-message: 'Stale issue message'
25
25
  stale-pr-message: 'Stale pull request message'
26
- stale-issue-label: 'no-issue-activity'
27
- stale-pr-label: 'no-pr-activity'
26
+ stale-issue-label: 'no-activity'
27
+ stale-pr-label: 'no-activity'
28
+ operations-per-run: 3
29
+ days-before-stale: 90
30
+ days-before-close: 30
@@ -27,9 +27,10 @@ jobs:
27
27
  - name: Install dependencies
28
28
  run: |
29
29
  python -m pip install --upgrade pip
30
- pip install pylint==2.14.5 pytest
30
+ pip install pylint==2.14.5
31
31
  python setup.py egg_info
32
- pip install -r *.egg-info/requires.txt
32
+ ex -sc 'g/^\[tests\]$/d' -cx numba_mpi.egg-info/requires.txt
33
+ pip install -r numba_mpi.egg-info/requires.txt
33
34
  - name: Analysing the code with pylint
34
35
  run: |
35
36
  pylint --unsafe-load-any-extension=y --disable=fixme $(git ls-files '*.py')
@@ -87,13 +88,13 @@ jobs:
87
88
  needs: [pylint, precommit, pdoc, zenodo_json]
88
89
  strategy:
89
90
  matrix:
90
- platform: [ubuntu-latest, macos-latest, windows-latest]
91
- python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
91
+ platform: [ubuntu-latest, macos-12, windows-latest]
92
+ python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
92
93
  mpi: [ 'mpich', 'openmpi', 'msmpi', 'intelmpi']
93
94
  exclude:
94
- - platform: macos-latest
95
+ - platform: macos-12
95
96
  mpi: msmpi
96
- - platform: macos-latest
97
+ - platform: macos-12
97
98
  mpi: intelmpi
98
99
  - platform: ubuntu-latest
99
100
  mpi: msmpi
@@ -104,10 +105,7 @@ jobs:
104
105
  - platform: windows-latest
105
106
  mpi: intelmpi
106
107
 
107
- # https://github.com/atmos-cloud-sim-uj/numba-mpi/issues/69
108
- - platform: ubuntu-latest
109
- python-version: 3.7
110
- mpi: mpich
108
+ # https://github.com/numba-mpi/numba-mpi/issues/69
111
109
  - platform: ubuntu-latest
112
110
  python-version: 3.8
113
111
  mpi: mpich
@@ -129,8 +127,7 @@ jobs:
129
127
  # checking if multiple MPI libs are OK
130
128
  sudo apt-get install mpi-default-bin
131
129
  mpiexec python -c "import os; assert 'I_MPI_ROOT' in os.environ"
132
- - run: pip install -e .
133
- - run: pip install pytest
130
+ - run: pip install -e .[tests]
134
131
  - run: python -We -c "import mpi4py"
135
132
  - run: python -We -c "import numba_mpi"
136
133
  - run: mpiexec -n 2 pytest --durations=10 -p no:unraisableexception -We
@@ -160,7 +157,8 @@ jobs:
160
157
 
161
158
  - run: |
162
159
  python setup.py egg_info
163
- pip install -r *.egg-info/requires.txt
160
+ ex -sc 'g/^\[tests\]$/d' -cx numba_mpi.egg-info/requires.txt
161
+ pip install -r numba_mpi.egg-info/requires.txt
164
162
  pip install --no-index --find-links file:./dist numba-mpi
165
163
  cd /tmp # make sure local files are not picked up
166
164
  python -We -c "import numba_mpi"
@@ -4,18 +4,18 @@ default_stages: [commit]
4
4
 
5
5
  repos:
6
6
  - repo: https://github.com/psf/black
7
- rev: 23.1.0
7
+ rev: 24.1.1
8
8
  hooks:
9
9
  - id: black
10
10
 
11
11
  - repo: https://github.com/timothycrosley/isort
12
- rev: 5.12.0
12
+ rev: 5.13.2
13
13
  hooks:
14
14
  - id: isort
15
15
  args: ["--profile", "black"]
16
16
 
17
17
  - repo: https://github.com/pre-commit/pre-commit-hooks
18
- rev: v4.4.0
18
+ rev: v4.5.0
19
19
  hooks:
20
20
  - id: trailing-whitespace
21
21
  - id: end-of-file-fixer
@@ -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
+
@@ -1,5 +1,6 @@
1
1
  """ Numba @njittable MPI wrappers tested on Linux, macOS and Windows """
2
- from pkg_resources import DistributionNotFound, VersionConflict, get_distribution
2
+
3
+ from importlib.metadata import PackageNotFoundError, version
3
4
 
4
5
  from .api.allreduce import allreduce
5
6
  from .api.barrier import barrier
@@ -18,7 +19,7 @@ from .api.wtime import wtime
18
19
  from .common import RequestType
19
20
 
20
21
  try:
21
- __version__ = get_distribution(__name__).version
22
- except (DistributionNotFound, VersionConflict):
22
+ __version__ = version(__name__)
23
+ except PackageNotFoundError:
23
24
  # package is not installed
24
25
  pass
@@ -1,4 +1,5 @@
1
1
  """file contains MPI_Allreduce() implementations"""
2
+
2
3
  import ctypes
3
4
  from numbers import Number
4
5
 
@@ -1,4 +1,5 @@
1
1
  """file contains MPI_Barrier() implementation"""
2
+
2
3
  import ctypes
3
4
 
4
5
  import numba
@@ -1,4 +1,5 @@
1
1
  """MPI_Bcast() implementation"""
2
+
2
3
  import ctypes
3
4
 
4
5
  import numba
@@ -1,4 +1,5 @@
1
1
  """file contains MPI_Initialized() implementation"""
2
+
2
3
  import ctypes
3
4
 
4
5
  import numba
@@ -1,4 +1,5 @@
1
1
  """operators supported by MPI"""
2
+
2
3
  from enum import IntEnum
3
4
 
4
5
  from mpi4py import MPI
@@ -1,4 +1,5 @@
1
1
  """MPI_Comm_rank() implementation"""
2
+
2
3
  import ctypes
3
4
 
4
5
  import numba
@@ -1,4 +1,5 @@
1
1
  """MPI_Recv() implementation"""
2
+
2
3
  import ctypes
3
4
 
4
5
  import numba
@@ -1,6 +1,7 @@
1
1
  """ Utilities for handling MPI_Requests with respective Wait and Test function
2
2
  wrappers.
3
3
  """
4
+
4
5
  import ctypes
5
6
 
6
7
  import numba
@@ -1,4 +1,5 @@
1
1
  """MPI_Scatter() implementation"""
2
+
2
3
  import ctypes
3
4
 
4
5
  import numba
@@ -1,4 +1,5 @@
1
1
  """MPI_Send() implementation"""
2
+
2
3
  import ctypes
3
4
 
4
5
  import numba
@@ -1,4 +1,5 @@
1
1
  """MPI_Comm_size() implementation"""
2
+
2
3
  import ctypes
3
4
 
4
5
  import numba
@@ -1,4 +1,5 @@
1
1
  """MPI_Wtime() implementation"""
2
+
2
3
  import ctypes
3
4
 
4
5
  import numba
@@ -1,4 +1,5 @@
1
1
  """variables used across API implementation"""
2
+
2
3
  import ctypes
3
4
  import os
4
5
  from ctypes.util import find_library
@@ -1,4 +1,5 @@
1
1
  """helper functions used across API implementation"""
2
+
2
3
  import numba
3
4
  import numpy as np
4
5
  from numba.core import cgutils, types
@@ -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
+
@@ -2,3 +2,6 @@ numba
2
2
  numpy
3
3
  mpi4py
4
4
  psutil
5
+
6
+ [tests]
7
+ pytest<8.0.0
@@ -1,4 +1,5 @@
1
1
  """ the magick behind ``pip install ...`` """
2
+
2
3
  from setuptools import find_packages, setup
3
4
 
4
5
 
@@ -21,6 +22,7 @@ setup(
21
22
  license="GPL v3",
22
23
  description="Numba @njittable MPI wrappers tested on Linux, macOS and Windows",
23
24
  install_requires=("numba", "numpy", "mpi4py", "psutil"),
25
+ extras_require={"tests": ("pytest<8.0.0")}, # TODO #122
24
26
  long_description=get_long_description(),
25
27
  long_description_content_type="text/markdown",
26
28
  packages=find_packages(include=["numba_mpi", "numba_mpi.*"]),
numba-mpi-0.39/PKG-INFO DELETED
@@ -1,63 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: numba-mpi
3
- Version: 0.39
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
-
18
- # <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
19
-
20
- [![Python 3](https://img.shields.io/static/v1?label=Python&logo=Python&color=3776AB&message=3)](https://www.python.org/)
21
- [![LLVM](https://img.shields.io/static/v1?label=LLVM&logo=LLVM&color=gold&message=Numba)](https://numba.pydata.org)
22
- [![Linux OK](https://img.shields.io/static/v1?label=Linux&logo=Linux&color=yellow&message=%E2%9C%93)](https://en.wikipedia.org/wiki/Linux)
23
- [![macOS OK](https://img.shields.io/static/v1?label=macOS&logo=Apple&color=silver&message=%E2%9C%93)](https://en.wikipedia.org/wiki/macOS)
24
- [![Windows OK](https://img.shields.io/static/v1?label=Windows&logo=Windows&color=white&message=%E2%9C%93)](https://en.wikipedia.org/wiki/Windows)
25
- [![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)
26
- [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/numba-mpi/numba-mpi/graphs/commit-activity)
27
- [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
28
- [![PyPI version](https://badge.fury.io/py/numba-mpi.svg)](https://pypi.org/project/numba-mpi)
29
- [![Anaconda-Server Badge](https://anaconda.org/conda-forge/numba-mpi/badges/version.svg)](https://anaconda.org/conda-forge/numba-mpi)
30
- [![DOI](https://zenodo.org/badge/316911228.svg)](https://zenodo.org/badge/latestdoi/316911228)
31
-
32
- #### Numba @njittable MPI wrappers
33
- - covering: `size`/`rank`, `send`/`recv`, `allreduce`, `bcast`, `scatter`/`gather` & `allgather`, `barrier` and `wtime`
34
- - basic asynchronous communication with `isend`/`irecv` (only for contiguous arrays); for request handling including `wait`/`waitall`/`waitany` and `test`/`testall`/`testany`
35
- - not yet implemented: support for non-default communicators, ...
36
- - API based on NumPy and supporting numeric and character datatypes
37
- - auto-generated docstring-based API docs on the web: https://numba-mpi.github.io/numba-mpi
38
- - pure-Python implementation with packages available on [PyPI](https://pypi.org/project/numba-mpi) and [Conda Forge](https://anaconda.org/conda-forge/numba-mpi)
39
- - 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))
40
-
41
- Hello world example:
42
- ```python
43
- import numba, numba_mpi, numpy
44
-
45
- @numba.njit()
46
- def hello():
47
- print(numba_mpi.rank())
48
- print(numba_mpi.size())
49
-
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
- For information on MPI, see:
62
- - https://www.mpi-forum.org/docs/
63
- - https://mpi4py.readthedocs.io/en/stable/
numba-mpi-0.39/README.md DELETED
@@ -1,46 +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
- [![DOI](https://zenodo.org/badge/316911228.svg)](https://zenodo.org/badge/latestdoi/316911228)
14
-
15
- #### Numba @njittable MPI wrappers
16
- - covering: `size`/`rank`, `send`/`recv`, `allreduce`, `bcast`, `scatter`/`gather` & `allgather`, `barrier` and `wtime`
17
- - basic asynchronous communication with `isend`/`irecv` (only for contiguous arrays); for request handling including `wait`/`waitall`/`waitany` and `test`/`testall`/`testany`
18
- - not yet implemented: support for non-default communicators, ...
19
- - API based on NumPy and supporting numeric and character datatypes
20
- - auto-generated docstring-based API docs on the web: https://numba-mpi.github.io/numba-mpi
21
- - pure-Python implementation with packages available on [PyPI](https://pypi.org/project/numba-mpi) and [Conda Forge](https://anaconda.org/conda-forge/numba-mpi)
22
- - 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))
23
-
24
- Hello world example:
25
- ```python
26
- import numba, numba_mpi, numpy
27
-
28
- @numba.njit()
29
- def hello():
30
- print(numba_mpi.rank())
31
- print(numba_mpi.size())
32
-
33
- src = numpy.array([1., 2., 3., 4., 5.])
34
- dst_tst = numpy.empty_like(src)
35
-
36
- if numba_mpi.rank() == 0:
37
- numba_mpi.send(src, dest=1, tag=11)
38
- elif numba_mpi.rank() == 1:
39
- numba_mpi.recv(dst_tst, source=0, tag=11)
40
-
41
- hello()
42
- ```
43
-
44
- For information on MPI, see:
45
- - https://www.mpi-forum.org/docs/
46
- - https://mpi4py.readthedocs.io/en/stable/
@@ -1,63 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: numba-mpi
3
- Version: 0.39
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
-
18
- # <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
19
-
20
- [![Python 3](https://img.shields.io/static/v1?label=Python&logo=Python&color=3776AB&message=3)](https://www.python.org/)
21
- [![LLVM](https://img.shields.io/static/v1?label=LLVM&logo=LLVM&color=gold&message=Numba)](https://numba.pydata.org)
22
- [![Linux OK](https://img.shields.io/static/v1?label=Linux&logo=Linux&color=yellow&message=%E2%9C%93)](https://en.wikipedia.org/wiki/Linux)
23
- [![macOS OK](https://img.shields.io/static/v1?label=macOS&logo=Apple&color=silver&message=%E2%9C%93)](https://en.wikipedia.org/wiki/macOS)
24
- [![Windows OK](https://img.shields.io/static/v1?label=Windows&logo=Windows&color=white&message=%E2%9C%93)](https://en.wikipedia.org/wiki/Windows)
25
- [![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)
26
- [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/numba-mpi/numba-mpi/graphs/commit-activity)
27
- [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
28
- [![PyPI version](https://badge.fury.io/py/numba-mpi.svg)](https://pypi.org/project/numba-mpi)
29
- [![Anaconda-Server Badge](https://anaconda.org/conda-forge/numba-mpi/badges/version.svg)](https://anaconda.org/conda-forge/numba-mpi)
30
- [![DOI](https://zenodo.org/badge/316911228.svg)](https://zenodo.org/badge/latestdoi/316911228)
31
-
32
- #### Numba @njittable MPI wrappers
33
- - covering: `size`/`rank`, `send`/`recv`, `allreduce`, `bcast`, `scatter`/`gather` & `allgather`, `barrier` and `wtime`
34
- - basic asynchronous communication with `isend`/`irecv` (only for contiguous arrays); for request handling including `wait`/`waitall`/`waitany` and `test`/`testall`/`testany`
35
- - not yet implemented: support for non-default communicators, ...
36
- - API based on NumPy and supporting numeric and character datatypes
37
- - auto-generated docstring-based API docs on the web: https://numba-mpi.github.io/numba-mpi
38
- - pure-Python implementation with packages available on [PyPI](https://pypi.org/project/numba-mpi) and [Conda Forge](https://anaconda.org/conda-forge/numba-mpi)
39
- - 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))
40
-
41
- Hello world example:
42
- ```python
43
- import numba, numba_mpi, numpy
44
-
45
- @numba.njit()
46
- def hello():
47
- print(numba_mpi.rank())
48
- print(numba_mpi.size())
49
-
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
- For information on MPI, see:
62
- - https://www.mpi-forum.org/docs/
63
- - 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