OpenMPI-5.0: PMIx Error with mpirun
on Ubuntu 23, both Single and Multiple Machines
1. Error Description
System: Ubuntu 23.10
Processer: AMD Ryzen 5 4600H with Radeon Graphics
Note: The error will not happen if using mpirun
provided by Intel OneAPI or Nvidia HPCX.
# Commandmpirun --hostfile hostfile -np 6 ./exp03-mpi/bin/Release/Linux_x86_64/hellompi# Output--------------------------------------------------------------------------PMIx was unable to find a usable compression libraryon the system. We will therefore be unable to compresslarge data streams. This may result in longer-than-normalstartup times and larger memory footprints. We willcontinue, but strongly recommend installing zlib ora comparable compression library for better user experience.You can suppress this warning by adding "pcompress_base_silence_warning=1"to your PMIx MCA default parameter file, or by adding"PMIX_MCA_pcompress_base_silence_warning=1" to your environment.--------------------------------------------------------------------------Hello, I am rank 1Hello, I am rank 5Hello, I am rank 0Hello, I am rank 4Hello, I am rank 2Hello, I am rank 3
2. How Do I Setup OpenMPI Environment
2.1. zlib
Download source code of zlib-1.3.1 from the official website [link].
tar -xf zlib-1.3.1.tar.gzcd zlib-1.3.1sudo ./configure --prefix=/usr/local/zlib-1.3.1sudo make -j $(nproc) allsudo make install
Edit /etc/bash.bashrc file with command sudo vim /etc/bash.bashrc
. Add following lines to the file:
export ZLIB_HOME=/usr/local/zlib-1.3.1export LD_LIBRARY_PATH=$ZLIB_HOME/lib:$LD_LIBRARY_PATH
Then run source /etc/bash.bashrc
to make the changes take effect.
2.2. OpenMPI
Download source code of openmpi-5.0.3 from the official website [link].
tar -xf openmpi-5.0.3.tar.bz2cd ./openmpi-5.0.3sudo ./configure --prefix=/usr/local/openmpi-5.0.3 --with-zlib=$ZLIB_HOMEsudo make -j $(nproc) allsudo make install
Edit /etc/bash.bashrc file with command sudo vim /etc/bash.bashrc
, add following lines to the end of that file:
# >>> openmpi >>>export OPENMPI_HOME="/usr/local/openmpi-5.0.3"alias OPENMPI_INIT="export PATH=$OPENMPI_HOME/bin:$PATH && export LD_LIBRARY_PATH=$OPENMPI_HOME/lib:$LD_LIBRARY_PATH"# <<< openmpi <<<
3. Source Code of "hellompi"
I think this is irrelevant to PMIx error.
#include <mpi.h>#include <iostream>int main(int argc, char** argv) { MPI_Init(&argc, &argv); int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); int size; MPI_Comm_size(MPI_COMM_WORLD, &size); std::cout << "Hello, I am rank " << rank << std::endl; MPI_Finalize(); return 0;}