2025-05-08 13:39:28 -04:00
.. meta ::
2025-05-13 16:26:28 -04:00
:description: Instruction on how to install rocSHMEM.
:keywords: rocSHMEM, ROCm, install, build, dependencies, MPI, UCX, Open MPI
2025-05-08 13:39:28 -04:00
.. _install-rocshmem:
---------------------------
Installing rocSHMEM
---------------------------
This topic describes how to install rocSHMEM.
Requirements
---------------------------
2025-05-21 16:59:00 -04:00
* ROCm 6.4.0 or later, including the :doc: `HIP runtime <hip:index>` . For more information, see `ROCm installation for Linux <https://rocm.docs.amd.com/projects/install-on-linux/en/latest/> `_ .
2025-05-08 13:39:28 -04:00
2025-05-13 16:26:28 -04:00
* AMD GPUs
2025-05-08 13:39:28 -04:00
* MI250X
* MI300X
2025-05-13 16:26:28 -04:00
* ROCm-aware Open MPI and UCX. For more information, see :ref: `install-dependencies` .
2025-05-08 13:39:28 -04:00
2025-05-13 16:26:28 -04:00
Installing from a package manager
2025-05-08 13:39:28 -04:00
---------------------------------
2025-05-13 16:26:28 -04:00
On Ubuntu, you can install rocSHMEM by running:
2025-05-08 13:39:28 -04:00
.. code-block :: bash
apt install rocshmem-dev
.. note ::
2025-05-13 16:26:28 -04:00
This installation method requires ROCm 6.4 or later. You must manually build dependencies such as Open MPI and UCX, because the distribution packaged versions don't include full accelerator support. For more information, see :ref: `install-dependencies` .
2025-05-08 13:39:28 -04:00
.. _install-dependencies:
2025-05-13 16:26:28 -04:00
Building dependencies
2025-05-08 13:39:28 -04:00
---------------------------
2025-05-13 16:26:28 -04:00
rocSHMEM requires ROCm-Aware Open MPI and UCX. Other MPI implementations, such as MPICH, have not been fully tested.
2025-05-08 13:39:28 -04:00
2025-05-13 16:26:28 -04:00
To build and configure ROCm-Aware UCX 1.17.0 or later, run:
2025-05-08 13:39:28 -04:00
.. code-block :: bash
git clone https://github.com/ROCm/ucx.git -b v1.17.x
cd ucx
./autogen.sh
./configure --prefix= <prefix_dir> --with-rocm= <rocm_path> --enable-mt
make -j 8
make -j 8 install
2025-05-13 16:26:28 -04:00
To build Open MPI 5.0.7 or later with UCX support, run:
2025-05-08 13:39:28 -04:00
.. code-block :: bash
git clone --recursive https://github.com/open-mpi/ompi.git -b v5.0.x
cd ompi
./autogen.pl
./configure --prefix= <prefix_dir> --with-rocm= <rocm_path> --with-ucx= <ucx_path>
make -j 8
make -j 8 install
2025-05-13 16:26:28 -04:00
Alternatively, you can use a script to install dependencies:
2025-05-08 13:39:28 -04:00
.. code-block :: bash
export BUILD_DIR = /path/to/not_rocshmem_src_or_build/dependencies
/path/to/rocshmem_src/scripts/install_dependencies.sh
2025-05-13 16:26:28 -04:00
.. note ::
Configuration options vary by platform. Review the script to ensure it is compatible with your system.
For more information about OpenMPI-UCX support, see
`GPU-enabled Message Passing Interface <https://rocm.docs.amd.com/en/latest/how-to/gpu-enabled-mpi.html> `_ .
2025-05-08 13:39:28 -04:00
2025-05-21 16:59:00 -04:00
Installing from source
2025-05-08 13:39:28 -04:00
--------------------------------
2025-05-13 16:26:28 -04:00
To build and install rocSHMEM with the IPC on-node, GPU-to-GPU backend, run:
2025-05-08 13:39:28 -04:00
.. code-block :: bash
git clone git@github.com:ROCm/rocSHMEM.git
cd rocSHMEM
mkdir build
cd build
../scripts/build_configs/ipc_single
2025-05-13 16:26:28 -04:00
The build script passes configuration options to CMake to setup a canonical build.
.. note ::
Other experimental configuration scripts are available in ``./scripts/build_configs`` , but only ``ipc_single`` is currently supported.
2025-05-08 13:39:28 -04:00
2025-05-13 16:26:28 -04:00
By default, the library is installed in ``~/rocshmem`` . You can customize the installation path by running:
2025-05-08 13:39:28 -04:00
.. code-block :: bash
../scripts/build_configs/ipc_single /path/to/install