Build and install
To build and install Open MPI with Arm Compiler, follow these steps:
Ensure that your paths are set up appropriately for Arm Compiler for HPC, for example:
openmpi-4.0.1directory, create a new directory called
buildand change into it.
Keeping builds in separate directories is optional when building open source software, but is considered best practice. Having multiple build directories side-by-side is often useful for testing and debugging.
Run the Open MPI v4.0.1 configure script:
CC=armclang CXX=armclang++ FC=armflang ../configure --prefix=/var/tmp/openmpi_ArmCompiler --enable-mpirun-prefix-by-default --enable-mpi1-compatibility
LD_LIBRARY_PATHon both local and remote hosts, ensuring the local environment is copied to remote nodes, where applicable.
Open MPI versions 4.0.0+ remove support for features which were originally deprecated with the release of the MPI-2.0 standard, and later removed entirely from the MPI-3.0 standard. Supplying the
--enable-mpi1-compatibilityflag to configure enables support for these symbols. For more information, see Removed MPI constructs in Open MPI FAQs.
Note:The directory for installing the Open MPI build is
/var/tmp/openmpi_ArmCompiler, although you can replace this with a directory of choice.
maketo build Open MPI with
armclang++for Fortran, C, and C++, respectively.
Build speed can be improved by parallelizing using the
make. Common practice is to use 2N+1 parallel jobs, where N=number of threads (or cores) on your system. For example, if the combined total of CPUs on your system is 64 threads, passing
-j129will enable a fast build:
make -j129 V=1 all
To show the command lines passed to the compiler for each object file being compiled or linked, the optional
V=1flag is used.
Once built, install the build using:
/var/tmp/openmpi_ArmCompilerdirectory to your
This directory locates where Open MPI was installed.
mpicxxare now ready to be used for compiling Fortran, C and C++ MPI code, respectively. The
mpiexeccommand can be used to execute a compiled MPI program.
Now you are ready to test MPI programs using Arm Compiler for HPC.