|
Article ID: 717
Last updated: 17 Feb, 2026
Cray Message Passing Toolkit (CMPT) is a collection of high-performance software libraries within the Cray Programming Environment (CPE) that enables parallel applications to communicate and exchange data efficiently across nodes in a Cray system with Slingshot interconnect, such as Athena which uses Slingshot 11. CMPT includes MPICH, PMI, OpenSHMEMX, DSMML, and MPIxlate. CPE version 25.09 includes MPICH 8.1.33 and 9.0.1, PMI 6.1.16, OpenSHEMEMX 11.8.0, DSMML 0.3.1, and MPIxlate 1.0.9. Note: MPICH 8.1.33 implements the MPI-3.1 standard. MPICH 9.0.1 includes support for MPI 4.0 standard features. MPICH 8.1.33 is the current default on Athena. As the name suggests, Cray MPICH is based on MPICH. If your existing executable was built with a dynamically linked MPI library that is Application Binary Interface (ABI)-compatible with the Cray MPICH library, it might be able run on Athena without recompiling and linking with the Cray MPICH library. For example, Intel MPI is also based on MPICH, and is ABI-compatible with the Cray MPICH library. On the other hand, OpenMPI and HPE/SGI MPT library are not ABI-compatible with MPICH. This article provides brief information about using the CMPT modules cray‑mpich, cray‑mpich-abi and cray‑mpixlate to build or prepare an MPI executable, together with the cray‑pals module from the Cray Parallel Application Launch Service (PALS) to manage job startup and process launch on Athena. Building Applications with the cray-mpich ModuleThere are three methods of using cray-mpich to build an application. Method 1: Explicitly Invoking the Compiler and Linking to the Cray MPICH LibraryTo explicitly build an executable using the cray-mpich module and a compiler from either PrgEnv‑cray, PrgEnv‑intel, PrgEnv‑aocc or PrgEnv‑gnu:
The name of the compiler driver varies as follows:
The ${MPICH_DIR} can be replaced with ${CRAY_MPICH_PREFIX} or ${CRAY_MPICH_DIR}, since all three of them are defined in cray-mpich and they point to the same directory. Depending on which PrgEnv is used {-cray, intel, aocc, gnu} and whether cray-mpich/8.1.33 or cray-mpich/9.0.1 are loaded, the actual path of ${MPICH_DIR} varies. For example, if using PrgEnv‑cray and cray‑mpich/8.1.33, then ${MPICH_DIR} is /opt/cray/pe/mpich/8.1.33/ofi/cray/20.0. Note: Athena is an HPE Slingshot 11 system that only supports libfabric — a low-level communication library also known as the OpenFabrics Interfaces (OFI). The Unified Communication X (UCX) framework for communication is supported in Slignshot 10 systems, but not Slingshot 11 systems with Cray MPICH. Method 2: Using the Cray MPICH Wrapper ScriptsCray MPICH also provides standard MPI wrappers (mpicc, mpicxx, mpic++, mpifort, mpif77, mpif90) for invoking compiler and linking the proper Cray MPICH library in accordance with the compiler that is used (cray, intel, aocc, gnu). Note: mpic++ is a soft link to mpicxx. mpif77 and mpif90 are soft links to mpifort. Usage:
If other non-MPI libraries are needed for building the application, they need to be explicitly added to the mpifort, mpicc, mpicxx command line as shown in Method 1. When using the MPI wrappers, the variables MPICH_FC, MPICH_CC and MPICH_CXX can be used to change the choice of compilers. For example, with PrgEnv-intel, mpifort, mpicc, and mpicxx default to using ifx, icx and icpx regardless of which of intel, intel‑classic, intel‑oneapi you have loaded. If you want mpifort, mpicc, and mpicxx to use ifort, icc, icpc, do the following before invoking mpifort, mpicc or mpicxx: With csh:
With bash:
Method 3: Using Cray's Compiler/Link Wrapper ScriptsWhen a cray-mpich module is loaded together with a compiler provided under either PrgEnv-cray, PrgEnv-intel, PrgEnv-aocc, or PrgEnv-gnu, the Cray wrappers ftn, cc, CC will automatically link the Cray MPICH library (‑lmpich or simply ‑lmpi for C/C++ and ‑lmpi ‑lmpifort for Fortran) and other Cray libraries (for example, Cray Scientific Library) to ensure compatibility and optimized performance. The actual -lmpi and -lmpifort linked in depend on the compiler used. For example, if a Cray compiler (crayftn, craycc, crayCC) is used, then ‑lmpi_cray and ‑lmpifort_cray are linked in. Usage:
If your application needs other libraries not included in the Cray Programming Environment, you must explicitly add them to the ftn, cc, CC command line as shown in Method 1. Here are a few useful Cray MPICH and LIBFABRIC environment variables to consider:
For more information, read man intro_mpi and the libfabric man fabric and man fi_cxi. Running Applications with the cray-pals ModuleLoading a cray-mpich module provides access to scripts such as mpifort, mpif77, mpif90, mpicc, mpicxx, mpic++ as well as various libmpi* for building MPI applications. However, cray-mpich does not provide mpiexec for use during runtime. A cray-pals module is needed during runtime to access the mpiexec executable in the parallel application launch service (PALS). Note: Make sure cray-pals is loaded before launching your application with mpiexec. Usage:
Here are some useful mpiexec options to consider:
Running Applications Built with Intel MPI Without Rebuilding the ExecutableAn existing executable built with the Intel MPI library might be able to run on Athena without having to rebuild it with the Cray MPICH library. To try this, use the cray-mpich-abi module. For example:
Note: If the existing executable was built with an Intel MPI version older than version 5.0 (released around 2014), use cray-mpich-abi-pre-intel-5.0 instead of cray-mpich-abi. For example:
WARNING: Your existing executable may not be able to achieve the best performance that the Athena cluster can offer. For example, an executable built with Intel compiler on other NAS systems and/or linked with the Intel MKL library likely does not support the AVX512 capability of the AMD Turin processor. For best performance, consider rebuilding your application and linking with library such as the Cray Scientific Library or the AMD Optimizing CPU Libraries (AOCL) instead of the Intel MKL library.
Translating Executables Built with OpenMPI or HPE/SGI MPT to Cray MPICHMPIxlate, which stands for MPI Translate, enables C and C++ applications compiled using an MPI library that is not binary compatible with Cray MPICH to be run without recompilation on supported HPE Cray systems. WARNING: MPIxlate does not provide support for Fortran applications.
MPIxlate transparently translates OpenMPI ABI and HPE/SGI MPT ABI to MPICH ABI at runtime. Usage:
For example, to translate an application built with OpenMPI with an ABI major number 40 (libmpi.so.40) to Cray MPICH with an ABI major number 12 (libmpi_cray.so.12), do:
To translate an application built with HPE/SGI MPT 2.25 to Cray MPICH with an ABI major number 12, do:
Note: With MPIxlate 1.0.9, only ompi.40 and sgi.225 are supported. If your C/C++ executable was built with HPE/SGI MPT 2.30, try -s sgi.225. For more information about MPIxlate and its limitations, see man mpixlate. |