numba-mpi 1.1.3__tar.gz → 1.1.5__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 (65) hide show
  1. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/.github/workflows/tests+pypi.yml +20 -7
  2. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/.zenodo.json +6 -2
  3. {numba_mpi-1.1.3/numba_mpi.egg-info → numba_mpi-1.1.5}/PKG-INFO +3 -2
  4. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/__init__.py +1 -0
  5. numba_mpi-1.1.5/numba_mpi/api/query_thread.py +20 -0
  6. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/common.py +7 -0
  7. {numba_mpi-1.1.3 → numba_mpi-1.1.5/numba_mpi.egg-info}/PKG-INFO +3 -2
  8. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi.egg-info/SOURCES.txt +2 -0
  9. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/api/test_bcast.py +4 -4
  10. numba_mpi-1.1.5/tests/api/test_query_thread.py +8 -0
  11. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/.github/numba_mpi_logo.png +0 -0
  12. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/.github/numba_mpi_logo.svg +0 -0
  13. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/.github/workflows/readme_snippets.yml +0 -0
  14. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/.github/workflows/stale.yml +0 -0
  15. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/.gitignore +0 -0
  16. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/.pre-commit-config.yaml +0 -0
  17. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/.vscode/settings.json +0 -0
  18. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/CITATION.cff +0 -0
  19. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/CODE_OF_CONDUCT.md +0 -0
  20. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/LICENSE +0 -0
  21. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/README.md +0 -0
  22. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/api/__init__.py +0 -0
  23. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/api/allreduce.py +0 -0
  24. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/api/barrier.py +0 -0
  25. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/api/bcast.py +0 -0
  26. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/api/initialized.py +0 -0
  27. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/api/irecv.py +0 -0
  28. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/api/isend.py +0 -0
  29. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/api/operator.py +0 -0
  30. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/api/rank.py +0 -0
  31. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/api/recv.py +0 -0
  32. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/api/reduce.py +0 -0
  33. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/api/requests.py +0 -0
  34. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/api/scatter_gather.py +0 -0
  35. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/api/send.py +0 -0
  36. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/api/size.py +0 -0
  37. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/api/wtime.py +0 -0
  38. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi/utils.py +0 -0
  39. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi.egg-info/dependency_links.txt +0 -0
  40. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi.egg-info/requires.txt +0 -0
  41. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/numba_mpi.egg-info/top_level.txt +0 -0
  42. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/setup.cfg +0 -0
  43. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/setup.py +0 -0
  44. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/__init__.py +0 -0
  45. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/api/test_allreduce.py +0 -0
  46. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/api/test_barrier.py +0 -0
  47. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/api/test_init.py +0 -0
  48. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/api/test_isend_irecv.py +0 -0
  49. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/api/test_rank.py +0 -0
  50. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/api/test_reduce.py +0 -0
  51. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/api/test_scatter_gather.py +0 -0
  52. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/api/test_send_recv.py +0 -0
  53. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/api/test_size.py +0 -0
  54. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/api/test_wtime.py +0 -0
  55. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/common.py +0 -0
  56. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/paper_listings/exchange.py +0 -0
  57. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/paper_listings/hello.py +0 -0
  58. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/paper_listings/mpi4py_with_error.py +0 -0
  59. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/paper_listings/numba_mpi.py +0 -0
  60. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/paper_listings/py-pde.py +0 -0
  61. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/paper_listings/test.py +0 -0
  62. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/paper_listings/timing.py +0 -0
  63. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/test_paper_listings.py +0 -0
  64. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/test_version.py +0 -0
  65. {numba_mpi-1.1.3 → numba_mpi-1.1.5}/tests/utils.py +0 -0
@@ -93,7 +93,7 @@ jobs:
93
93
  - ubuntu-latest
94
94
  - windows-latest
95
95
  - macos-13 # arch: Intel
96
- # - macos-14 # arch: arm64 # TODO: #164
96
+ - macos-15 # arch: arm64
97
97
  python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
98
98
  mpi: [ 'mpich', 'openmpi', 'msmpi', 'intelmpi']
99
99
  exclude:
@@ -103,10 +103,12 @@ jobs:
103
103
  mpi: intelmpi
104
104
  - platform: macos-13 # TODO: # 163
105
105
  mpi: openmpi
106
- # - platform: macos-14
107
- # mpi: msmpi
108
- # - platform: macos-14
109
- # mpi: intelmpi
106
+ - platform: macos-15
107
+ mpi: msmpi
108
+ - platform: macos-15
109
+ mpi: intelmpi
110
+ - platform: macos-15
111
+ mpi: openmpi
110
112
  - platform: ubuntu-latest
111
113
  mpi: msmpi
112
114
  - platform: ubuntu-latest # TODO: #162
@@ -132,6 +134,8 @@ jobs:
132
134
  - uses: mpi4py/setup-mpi@v1
133
135
  with:
134
136
  mpi: ${{ matrix.mpi }}
137
+ - if: ${{ matrix.platform == 'macos-15' }}
138
+ run: echo DYLD_FALLBACK_LIBRARY_PATH="/opt/homebrew/lib:/usr/lib:$DYLD_FALLBACK_LIBRARY_PATH" >> $GITHUB_ENV
135
139
  - if: matrix.mpi == 'intelmpi'
136
140
  run: |
137
141
  # checking if multiple MPI libs are OK
@@ -172,13 +176,22 @@ jobs:
172
176
  cd /tmp # make sure local files are not picked up
173
177
  python -We -c "import numba_mpi"
174
178
 
175
- - if: github.event_name == 'push' && github.ref == 'refs/heads/main'
179
+ - if: |-
180
+ ${{
181
+ github.repository == 'numba-mpi/numba-mpi' &&
182
+ github.event_name == 'push' &&
183
+ github.ref == 'refs/heads/main'
184
+ }}
176
185
  uses: pypa/gh-action-pypi-publish@release/v1.12
177
186
  with:
178
187
  attestations: false
179
188
  repository_url: https://test.pypi.org/legacy/
180
189
 
181
- - if: startsWith(github.ref, 'refs/tags')
190
+ - if: |-
191
+ ${{
192
+ github.repository == 'numba-mpi/numba-mpi' &&
193
+ startsWith(github.ref, 'refs/tags')
194
+ }}
182
195
  uses: pypa/gh-action-pypi-publish@release/v1.12
183
196
  with:
184
197
  attestations: false
@@ -3,7 +3,7 @@
3
3
  "description": "Numba @jittable wrappers for MPI C API tested on Linux, macOS and Windows",
4
4
  "creators": [
5
5
  {
6
- "affiliation": "Jagiellonian University, Kraków, Poland",
6
+ "affiliation": "Jagiellonian University, Kraków, Poland (-2023); AGH University of Krakow, Poland (2023-)",
7
7
  "name": "Arabas, Sylwester",
8
8
  "orcid": "0000-0003-2361-0082"
9
9
  },
@@ -21,6 +21,10 @@
21
21
  "name": "Manna, Maciej",
22
22
  "orcid": "0000-0002-7482-4913"
23
23
  },
24
+ {
25
+ "affiliation": "AGH University of Krakow, Poland",
26
+ "name": "Michał Wroński"
27
+ },
24
28
  {
25
29
  "affiliation": "Max Planck Institute for Dynamics and Self-Organization, Göttingen, Germany",
26
30
  "name": "Zwicker, David",
@@ -33,4 +37,4 @@
33
37
  ],
34
38
  "license": "GPL-3.0-only",
35
39
  "upload_type": "software"
36
- }
40
+ }
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: numba-mpi
3
- Version: 1.1.3
3
+ Version: 1.1.5
4
4
  Summary: Numba @jittable MPI wrappers tested on Linux, macOS and Windows
5
5
  Home-page: https://github.com/numba-mpi/numba-mpi
6
6
  Author: https://github.com/numba-mpi/numba-mpi/graphs/contributors
@@ -23,6 +23,7 @@ Dynamic: description
23
23
  Dynamic: description-content-type
24
24
  Dynamic: home-page
25
25
  Dynamic: license
26
+ Dynamic: license-file
26
27
  Dynamic: project-url
27
28
  Dynamic: provides-extra
28
29
  Dynamic: requires-dist
@@ -11,6 +11,7 @@ from .api.initialized import initialized
11
11
  from .api.irecv import irecv
12
12
  from .api.isend import isend
13
13
  from .api.operator import Operator
14
+ from .api.query_thread import query_thread
14
15
  from .api.rank import rank
15
16
  from .api.recv import recv
16
17
  from .api.reduce import reduce
@@ -0,0 +1,20 @@
1
+ """file contains MPI_Query_thread() implementation"""
2
+
3
+ import ctypes
4
+
5
+ import numba
6
+ import numpy as np
7
+
8
+ from numba_mpi.common import libmpi
9
+
10
+ _MPI_Query_thread = libmpi.MPI_Query_thread
11
+ _MPI_Query_thread.restype = ctypes.c_int
12
+ _MPI_Query_thread.argtypes = [ctypes.c_void_p]
13
+
14
+
15
+ @numba.njit()
16
+ def query_thread():
17
+ """wrapper for MPI_Query_thread()"""
18
+ provided = np.empty(1, dtype=np.intc)
19
+ _ = _MPI_Query_thread(provided.ctypes.data)
20
+ return provided[0]
@@ -2,6 +2,7 @@
2
2
 
3
3
  import ctypes
4
4
  import os
5
+ import sys
5
6
  from ctypes.util import find_library
6
7
  from pathlib import Path
7
8
 
@@ -72,6 +73,12 @@ else:
72
73
  break
73
74
 
74
75
  if LIB is None:
76
+ if sys.platform == "darwin":
77
+ raise RuntimeError(
78
+ """MPI library not found, if MPI was installed with Homebrew, export the following:
79
+ DYLD_FALLBACK_LIBRARY_PATH="/opt/homebrew/lib:/usr/lib:$DYLD_FALLBACK_LIBRARY_PATH
80
+ """
81
+ )
75
82
  raise RuntimeError("no MPI library found")
76
83
 
77
84
  libmpi = ctypes.CDLL(LIB)
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: numba-mpi
3
- Version: 1.1.3
3
+ Version: 1.1.5
4
4
  Summary: Numba @jittable MPI wrappers tested on Linux, macOS and Windows
5
5
  Home-page: https://github.com/numba-mpi/numba-mpi
6
6
  Author: https://github.com/numba-mpi/numba-mpi/graphs/contributors
@@ -23,6 +23,7 @@ Dynamic: description
23
23
  Dynamic: description-content-type
24
24
  Dynamic: home-page
25
25
  Dynamic: license
26
+ Dynamic: license-file
26
27
  Dynamic: project-url
27
28
  Dynamic: provides-extra
28
29
  Dynamic: requires-dist
@@ -28,6 +28,7 @@ numba_mpi/api/initialized.py
28
28
  numba_mpi/api/irecv.py
29
29
  numba_mpi/api/isend.py
30
30
  numba_mpi/api/operator.py
31
+ numba_mpi/api/query_thread.py
31
32
  numba_mpi/api/rank.py
32
33
  numba_mpi/api/recv.py
33
34
  numba_mpi/api/reduce.py
@@ -46,6 +47,7 @@ tests/api/test_barrier.py
46
47
  tests/api/test_bcast.py
47
48
  tests/api/test_init.py
48
49
  tests/api/test_isend_irecv.py
50
+ tests/api/test_query_thread.py
49
51
  tests/api/test_rank.py
50
52
  tests/api/test_reduce.py
51
53
  tests/api/test_scatter_gather.py
@@ -15,8 +15,8 @@ def jit_bcast(data, root):
15
15
 
16
16
  @pytest.mark.parametrize("bcast", (jit_bcast.py_func, jit_bcast))
17
17
  @pytest.mark.parametrize("data_type", data_types)
18
- def test_bcast_np_array(data_type, bcast):
19
- root = 0
18
+ @pytest.mark.parametrize("root", range(mpi.size()))
19
+ def test_bcast_np_array(data_type, bcast, root):
20
20
  data = np.empty(5, data_type).astype(dtype=data_type)
21
21
  datatobcast = get_random_array(5, data_type).astype(dtype=data_type)
22
22
 
@@ -34,8 +34,8 @@ def test_bcast_np_array(data_type, bcast):
34
34
  "stringtobcast",
35
35
  ("test bcast", pytest.param("żółć", marks=pytest.mark.xfail(strict=True))),
36
36
  )
37
- def test_bcast_string(stringtobcast):
38
- root = 0
37
+ @pytest.mark.parametrize("root", range(mpi.size()))
38
+ def test_bcast_string(stringtobcast, root):
39
39
  datatobcast = np.array(stringtobcast, "c")
40
40
  data = np.empty_like(datatobcast)
41
41
 
@@ -0,0 +1,8 @@
1
+ # pylint: disable=missing-function-docstring,missing-module-docstring
2
+ from mpi4py import MPI
3
+
4
+ import numba_mpi as mpi
5
+
6
+
7
+ def test_query_thread():
8
+ assert MPI.Query_thread() == mpi.query_thread()
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