Releases: tskisner/pshmem
Small Deployment Fix
Add new MPIBatch class
What's Changed
- Bump actions/setup-python from 5 to 6 by @dependabot[bot] in #29
- Bump actions/checkout from 4 to 5 by @dependabot[bot] in #28
- Add support for a simple batch execution system. by @tskisner in #30
- Build system improvements by @tskisner in #31
Full Changelog: 1.2.1...1.3.0
Fix registry bug at program exit
If a python program terminates, objects are deleted in a random order. If the pshmem package registry is deleted before all MPIShared objects are deleted, then gracefully ignore requests to unregister the already deleted shared memory buffers.
What's Changed
Full Changelog: 1.2.0...1.2.1
Improve cleanup on termination
What's Changed
This release includes fallback cleanup of shared memory on SIGTERM and migration to a new pyproject.toml. There are also improvements to the unit tests.
Full Changelog: 1.1.0...1.2.0
Switch to using Python SharedMemory
In order to resolve portability challenges with use of shared memory, switch to using multiprocessing.shared_memory.SharedMemory from the standard library. This fixes tests on MacOS. One workaround is still needed to manually disable resource tracking, but that monkey patch will not be needed after python-3.13.0. One possible concern with this approach is that the resource_tracker code used by this python package spawns a helper process. Historically, some MPI implementations were very unhappy with this. However, I tested this with OpenMPI on Linux and MacOS, and also with Cray MPICH, running across multiple nodes. No problems observed so far.
Fix catch of unit test failures
- Unit test failures were not triggering a non-zero return to the calling shell. Now fixed.
- Moved the pre-deletion of the shared memory segment until after all processes have wrapped the buffer in a numpy array, ensuring that the buffer is not released too early. This fixes a failure on macos.
Move to sysv_ipc
The posix_ipc module is not available on conda-forge. This release moves the codebase to using sysv_ipc, which is available.
Fix python version in deploy action
- Fix a typo
Small updates to tests and CI workflows
- Bump python versions for tests and requirements.
- Fix use of dtype
np.int_in tests. - Use concurrency in github actions rather than cancel-workflow action.
- Update versioneer for python 3.12 compatibility.
Use Numpy Arrays for Single Process per Node
Even in the MPI case, if there is only one process in the node shared communicator, then use a simple numpy array. This reduces the total number of shared memory segments, which is limited by the kernel in terms of maximum number of open files (since shared memory segments appear as files to userspace).