Openmpi not added to the PATH during installation

Is this the place to report issues/bugs with AlmaLinux 9?

When installing openmpi, it was not added to the PATH

Adding: export PATH=/usr/lib64/openmpi/bin:$PATH to the .bashrc solves the problem but the PATH variable should be set automatically during installation. This is probably a bug.

that’s not a bug, you’d be pretty ill advised to add every bit of software to your $PATH, especially globally.

you’ll just have to call it using /usr/lib64/openmpi/bin/opal_wrapper, or manually add it to your user’s $PATH via ~/.bashrc as you say.

I didnt talk about "every bit of software" but openmpi and I dont remember another distribution not taking care of this openmpi setting so the compiler finds openmpi to compile software with an openmpi dependency.

If that`s the RHEL way, fine with me, I figured it out but absolute beginners will have problems I think.

its a packaging nuance, potentially other distro’s are symlinking or installing into /bin which would already be in your $PATH, /usr/lib64 does seem odd.

p.s. i meant that rpm/dnf cannot update your user’s $PATH as it doesn’t know about users other than root, and you wouldn’t want every package you install outside of /bin to be inserted into everyone’s $PATH.

Indeed. There could be multiple implementations and then one can’t have them all “first on path”.

For example, EL7 had 32bit openmpi, 64bit openmpi, 32bit mpich, and 64bit mpich.

A package environment-modules is installed as dependency of openmpi.

You can run module av to see list of available “modules”. There is probably mpi/openmpi-x86_64

You can run module show mpi/openmpi-x86_64 to see what the module would set.

You can run module add mpi/openmpi-x86_64 to load those settings to your bash environment. (Or module add mpi, if mpi/openmpi-x86_64 is lexicographically greatest mpi/*)

You can run module list to see what you have added, and module purge to unload them all.
In other words, the module makes it easy to modify PATH (and other vars) on-the-fly.