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.
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 greatestmpi/*)
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.
Sorry for the late response. but Iāve not been able to link my openmpi installation correctly using PATH. To be clear, the problem is whenever I do a āsudo make installā on a program (hdf5-mpi in my case). The sudo will not looking in my PATH variable, even if I use -E.
I also tried module load mpi/openmpi before but it doesnāt work either. What should be the solution, as redefining every call to mpicc in the installation script looks like a wrong solution?
First, Iād avoid the āsudoā altogether. Give the āconfigureā/ācmakeā/whatever a prefix that your regular account can write to. For example, the ~/.local Then you donāt need sudo at all.
Second, I guess that you (or build instructions) shortcut the
./configure
make
make install
into
./configure
make install
Yes, the āinstallā target probably requires the build step to be complete, i.e. it both builds and then installs (copies files) in one go. Convenient, but ā¦
The sudo make is same as user root logs in, changes to pwd, and runs make. It will not do module load mpi nor inherit shell environment from your session. Hence a different PATH.
Do you really need that application. Doesnāt EPEL have something like that?
Iāve added a new directory called installation_folder in my .local environment. But I prefer to use my own compiled version of hdf5 as it is easier to control HDF5 itself.
However, Iāve had an annoying bug where, by installing texlive, dnf decided to install its version of hdf5 and to overwrite all of my environment variable.
Needless to say, this broke all my previously installed program and now I got to try to reinstall all my program. I assume it is a bug since Openmpi was carefully installed to make sure nothing was overwritten.
Really? The EPELās hdf5 packages do install to āsystem locationsā (/usr/{lib64,bin,include}) but do not add anything into /etc/profile.d/. I.e. they should not define any environment variables for shell sessions. Even if they would, packages should not overwrite anything within usersā homes.
Thanks for the quick reply. Iāve tried to understand what has been happening and I think Iāve got misguided by some installation problem in the program Iāve been using.
Iāve installed hdf5-mpi and my program suite.
I have, by mistake installed hdf5 using dnf.
My program wasnāt able to run anymore.
I tried to reinstall my program by precising the path of my hdf5 mpi installation. (Didnāt work)
I uninstalled dnf hdf5.
I tried to reinstall my program once again (Didnāt work)
At this point, I assumed was due to the environment being somehow different before and after installing hdf5.
However, there seem to be a difference if I let the program chose the installation path/flags or if I give the same variable manually (As I had the installation log of the installation which worked). The only fix I was able to do was to uninstall dnf hdf5 and let the program run the configure script by itself.
I still donāt understand the exact cause, but your quick reply helped me into understanding what to look into and that my assumption about the issue was wrong.