KhiopsML / khiops-python

The Python library of the Khiops AutoML suite
https://khiops.org
BSD 3-Clause Clear License
10 stars 1 forks source link

OpenMPI path issue with khiops 10.2.2 on Debian-like OS #209

Closed tramora closed 3 months ago

tramora commented 4 months ago

Description

When using khiops-python API, the following command line is eventually executed :

/bin/mpiexec --allow-run-as-root --quiet -n 14 /usr/bin/MODL -b -i train_predictor_XXX._kh -e khiops.log

With openmpi installed with this 10.2.2-1 version it fails :

--------------------------------------------------------------------------
A prefix was supplied to mpiexec that only contained slashes.

This is a fatal error; mpiexec will now abort.  No processes were launched.
--------------------------------------------------------------------------

Questions/Ideas

This issue is already identified on the openmpi project https://github.com/open-mpi/ompi/issues/5613.

To my understanding, the issue exists on systems (Arch, Ubuntu) where /bin/ is a symlink to /usr/bin. A kind of nasty loop occurs.

A fix on khiops-python was already committed once https://github.com/KhiopsML/khiops-python/commit/75d0bf70a621092e4db461072185ace4a9f35688 but unfortunately seems to have been reverted.

The symlink was followed and the real binary was reached.

/bin/mpiexec -> /etc/alternatives/mpiexec -> /usr/bin/mpiexec.openmpi    

I think we should put back this fix.

folmos-at-orange commented 4 months ago

Why/how the commit https://github.com/KhiopsML/khiops-python/commit/75d0bf70a621092e4db461072185ace4a9f35688 was lost?

popescu-v commented 3 months ago

Why/how the commit 75d0bf7 was lost?

It was lost on some rebasing / folding of the commits in the PR https://github.com/KhiopsML/khiops-python/pull/187 IIRC (at that time I thought that this fix was no longer necessary, as it was needed in the context of the wrong inference of the Conda binary directory when running tests with non-Conda khiops inside Conda environments - as in our unit-tests workflow).

folmos-at-orange commented 3 months ago

Ok, no prob. Just in case I restored the commit in this issue's branch.

popescu-v commented 3 months ago

Ok, no prob. Just in case I restored the commit in this issue's branch.

As, in all likelihood, this is a bug, I would have made a flash release with this fix only, without waiting for this branch to be ready to merge.

popescu-v commented 1 month ago

Actually, the issue occurs if /bin is before /usr/bin in PATH, but this does not occur in vanilla versions of any Linux that Khiops currently supports, viz Ubuntu 20.04, 22.04, 24.04 ; Rocky 8, 9 ; Debian 10, 11, 12.

Arch (mentioned in the issue) is not currently supported by Khiops.