A working OpenSHMEM implementation is required. Currently, Cray OpenSHMEMX, Open Source Software Solutions (OSSS) OpenSHMEM, Open MPI OpenSHMEM, OSHMPI, and Sandia OpenSHMEM are supported. Generally speaking, shmem4py will be installed using the OpenSHMEM implementation’s oshcc wrapper found in the $PATH.

For an example setup of shmem4py using the OSHMPI/MPICH backend, see INSTALL.rst.


We encourage users to use Docker/Podman containers or follow the steps executed in the Dockerfiles. Containers based on those files are meant to show minimal configurations for building and running shmem4py with different OpenSHMEM implementations. Those images are used in GitHub Actions CI/CD and we consider them tested configurations. Currently, we test with OSSS OpenSHMEM, Open MPI OpenSHMEM, OSHMPI and Sandia OpenSHMEM on the latest releases of Fedora and Ubuntu.

Installing shmem4py

Once a working OpenSHMEM implementation is installed, shmem4py can be installed using pip:

git clone
cd shmem4py
python -m pip install .

You sure then test if everything works as expected:

make test-1
make test-2

Next steps

With the installation complete, you can now proceed to run the Usage examples. and try to base your code on them.