Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

khiops_env --env Raises Spurious Error When Environment Modules Are Installed on Non-RPM Linux Operating Systems #495

Open
popescu-v opened this issue Dec 16, 2024 · 3 comments
Labels
Priority/1 To do after P0 Size/Hours very short Type/Bug Something isn't working

Comments

@popescu-v
Copy link
Collaborator

popescu-v commented Dec 16, 2024

Description

Currently, khiops_env detects if environment module support is installed on the host Linux operating system. If so, then khiops_env attempts to unload the MPI environment module, and to load the appropriate MPI environment module.

On RPM-based Linux distributions (Rocky 8, 9), this works as expected. On vanilla Debian / Debian-based distributions, this also works as expected, because environment module support is not installed by default.

However, if, for some reason, environment module support is installed on the host Debian-like distribution (via apt-get install environment-modules), then khiops_env detects this support and assumes that the MPI environment module can be loaded, which is not true, because MPI is not packaged with environment module support on these Linux distributions.

This results in a spurious error which is propagated to stderr: ERROR: Unable to locate a modulefile for 'mpi/openmpi-x86_64'. This error has no effect on the functioning of the script, which exits with the 0 return code.

Questions/Ideas

  • A solution is to redirect MPI environment module loading attempt's outputs (stdout and stderr) to /dev/null:
    module load mpi/openmpi-x86_64 &> /dev/null

Context

  • Khiops version: 10.2.4
  • OS description (use khiops -s): Linux Debian and Ubuntu.
@popescu-v popescu-v added Type/Bug Something isn't working Priority/1 To do after P0 Size/Hours very short labels Dec 16, 2024
@popescu-v
Copy link
Collaborator Author

On the Khiops Python library side, this error can be safely ignored (see also issue KhiopsML/khiops-python#300).

@bruno-at-orange
Copy link
Contributor

Another solution is to use environment modules only on fedora-like distros. There is the variable IS_FEDORA_LIKE in cmake:

set(IS_FEDORA_LIKE false)

We could set USE_ENVIRONMENT_MODULE to empty if IS_FEDORA_LIKE is true in install.cmake.
file(READ ${TMP_DIR}/use_environment_module.sh USE_ENVIRONMENT_MODULE)

And then, the method configure_file will replace @USE_ENVIRONMENT_MODULE@ by the empty string in khiops_env

@bruno-at-orange
Copy link
Contributor

this could be done at the same time as #396

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority/1 To do after P0 Size/Hours very short Type/Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants