Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,24 @@ jobs:
matrix:
include:
- os: ubuntu-latest
python: "3.9"
python: "3.10"
arch: Linux-x86_64
- os: ubuntu-latest
python: "3.11"
python: "3.12"
arch: Linux-x86_64
- os: ubuntu-latest
python: "3.13"
python: "3.14"
arch: Linux-x86_64
- os: macos-latest
- os: macos-15-intel
python: "3.10"
arch: MacOSX-x86_64
- os: macos-latest
- os: macos-15-intel
python: "3.13"
arch: MacOSX-x86_64
- os: macos-latest
python: "3.10"
- os: macos-15
python: "3.11"
arch: MacOSX-arm64
- os: macos-latest
- os: macos-15
python: "3.13"
arch: MacOSX-arm64
steps:
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ readme = "README.md"
maintainers = [
{ name = "Theodore Kisner", email = "tskisner.public@gmail.com" },
]
requires-python = ">=3.9"
requires-python = ">=3.10"
dependencies = [
"numpy",
]
classifiers = [
"Development Status :: 4 - Beta",
"Development Status :: 5 - Stable",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development :: Libraries",
]

Expand Down
39 changes: 39 additions & 0 deletions src/pshmem/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,45 @@ def test_world(self):
print("Testing MPIShared with world communicator...", flush=True)
self.context_write_read(self.comm)

def test_large(self):
"""Test use of buffers larger than 2^31 elements."""

if "PSHMEM_TEST_LARGE" not in os.environ:
print("Skipping large (> 2^31 elements) array test.", flush=True)
return
rank = 0
nproc = 1
if self.comm is not None:
rank = self.comm.rank
nproc = self.comm.size

# Dimensions / type of our shared memory array
n_elem = np.iinfo(np.int32).max + 10
datadims = (n_elem,)
datatype = np.dtype(np.uint8)

# Create local data on one process
if rank == 0:
local = np.ones(datadims, dtype=datatype)
else:
local = None

with MPIShared(datadims, datatype, self.comm) as shm:
shm.set(local, fromrank=0)
del local

# Check results on all processes. Take turns since this is a
# large memory buffer.
for proc in range(nproc):
if proc == rank:
check = np.zeros(datadims, dtype=datatype)
check[:] = shm[:]
count = np.count_nonzero(check)
self.assertTrue(count == n_elem)
del check
if self.comm is not None:
self.comm.barrier()

def test_separated(self):
if self.comm is None:
print("Testing separated create/close without MPI...", flush=True)
Expand Down