diff --git a/packaging/linux/common/khiops_env/khiops_env.in b/packaging/linux/common/khiops_env/khiops_env.in index cb5629c21..a04a7777d 100644 --- a/packaging/linux/common/khiops_env/khiops_env.in +++ b/packaging/linux/common/khiops_env/khiops_env.in @@ -84,8 +84,15 @@ if command -v mpiexec &>/dev/null; then KHIOPS_MPI_ERROR="" KHIOPS_MPI_COMMAND="$(type -P mpiexec) $MPI_EXTRA_FLAGS @KHIOPS_MPI_EXTRA_FLAG@ @MPIEXEC_NUMPROC_FLAG@ $KHIOPS_PROC_NUMBER" else - KHIOPS_MPI_ERROR="We didn't find mpiexec in the regular path. Parallel computation is unavailable: Khiops is launched in serial" - KHIOPS_MPI_COMMAND="" + _MPIEXEC=$(dirname $KHIOPS_PATH)/mpiexec + if command -v $_MPIEXEC &>/dev/null; then + KHIOPS_MPI_ERROR="" + KHIOPS_MPI_COMMAND="$_MPIEXEC $MPI_EXTRA_FLAGS @KHIOPS_MPI_EXTRA_FLAG@ @MPIEXEC_NUMPROC_FLAG@ $KHIOPS_PROC_NUMBER" + unset _MPIEXEC + else + KHIOPS_MPI_ERROR="We didn't find mpiexec in the regular path. Parallel computation is unavailable: Khiops is launched in serial" + KHIOPS_MPI_COMMAND="" + fi fi # without more than 2 procs, we use the serial khiops