Closed andreichalapco closed 10 months ago
I do not run fish so you will need to help debug this. I looked at the init/profile.fish.in, which becomes profile.fish when installing. Inside init/profile.fish.in it has:
set -xg MODULEPATH (@PKGV@/libexec/addto --append MODULEPATH $MODULEPATH_ROOT/$LMOD_sys $MODULEPATH_ROOT/Core)
set -xg MODULEPATH (@PKGV@/libexec/addto --append MODULEPATH @PKGV@/modulefiles/Core)
This should just append
/usr/share/modulefiles/Linux /usr/share/modulefiles/Core /usr/share/lmod/lmod/modulefiles/Core
to the current value of MODULEPATH
Here are some ideas why you are not getting the correct value of MODULEPATH:
I suspect that the last idea is the problem. Lmod has standard locations where it looks for modulefiles. Namely the ones that you see. So you can either modify the /etc/profile.fish file to match your location of /usr/share/modulefiles or create a file /etc/lmod/.modulepath:
/usr/share/modulefiles
What happens if I just change the script to:
set -xg MODULEPATH (@PKGV@/libexec/addto --append MODULEPATH $MODULEPATH_ROOT $MODULEPATH_ROOT/$LMOD_sys $MODULEPATH_ROOT/Core)
This will basically just add the MODULEPATH_ROOT to the module paths ... where the search needs to be conducted
What I also noticed ... that in the /etc/profile.d/ there is the 00-modulepath.sh ... which exports /usr/share/modulefiles. This I think won't be runned when fish shell is sourced
Yes, as far as I know, /etc/profile.d/00-modulepath.sh is NOT sourced by fish. It is not written in fish. As for changing profile.fish.in I think that you can set it like this:
set -xg MODULEPATH (@PKGV@/libexec/addto --append MODULEPATH /usr/share/modulepath)
O.K. to close this issue?
To give a bit of a context. When installing lmod with dnf package manager on fedora and start using the bash shell echoing $MODULEPATH yields
(which is the right path for finding some modules).
After ln -s of .../profile.fish in the fish config file... I only get for echo $MODULEPATH:
(Can't find my modules just with this ... )
Desktop (please complete the following information):