diff --git a/tools/toolchain/install_cp2k_toolchain.sh b/tools/toolchain/install_cp2k_toolchain.sh index c88c78b01f..e76808d86f 100755 --- a/tools/toolchain/install_cp2k_toolchain.sh +++ b/tools/toolchain/install_cp2k_toolchain.sh @@ -331,7 +331,11 @@ if (command -v mpiexec > /dev/null 2>&1); then export MPI_MODE="mpich" with_mpich="__SYSTEM__" elif (mpiexec --version 2>&1 | grep -s -q "OpenRTE"); then - echo "MPI is detected and it appears to be OpenMPI" + echo "MPI is detected and it appears to be OpenMPI 4 (or older)" + export MPI_MODE="openmpi" + with_openmpi="__SYSTEM__" + elif (mpiexec --version 2>&1 | grep -s -q "Open MPI"); then + echo "MPI is detected and it appears to be OpenMPI 5" export MPI_MODE="openmpi" with_openmpi="__SYSTEM__" elif (mpiexec --version 2>&1 | grep -s -q "Intel"); then