Skip to content

Commit

Permalink
Fall back to looking for the MPI command in the putative Conda binary…
Browse files Browse the repository at this point in the history
… directory

If `$CONDA_PREFIX/bin` is not in the `PATH`, then the putative Conda binary
directory is the same as the directory the Khiops `MODL[_openmpi|mpich]` binary
is situated in.

closes #476
  • Loading branch information
popescu-v committed Dec 4, 2024
1 parent 18fa792 commit 3e9f3ba
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packaging/linux/common/khiops_env/khiops_env.in
Original file line number Diff line number Diff line change
Expand Up @@ -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=@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"
else
KHIOPS_MPI_ERROR="We didn't find mpiexec in the expected paths. Parallel computation is unavailable: Khiops is launched in serial"
KHIOPS_MPI_COMMAND=""
fi
unset _MPIEXEC
fi

# without more than 2 procs, we use the serial khiops
Expand Down

0 comments on commit 3e9f3ba

Please sign in to comment.