Closed AcerP-py closed 2 months ago
Thanks for the bug report! I was able to reproduce this issue and fix it for me. Please test the Lmod branch "IS713-tmod-hidden" to see if it works for you.
This bug has been around for a long time. Probably since Lmod 7 was introduced. The fix here is to let the routine l_find_highest_by_key() in src/MName.src to search all possible choices rather than just the first directory that has the module_name that is searching for. Thanks again for the bug report!
It works for me too. Thanks!
This fix is now live in Lmod 8.7.45. Closing this issue.
Describe the bug LMOD_TMOD_FIND_FIRST makes Lmod error when hidden module of the same name is in a higher path. Take for example the following module layout.
To Reproduce Steps to reproduce the behavior: Given the above setup run a
module load B
However a
module load B/9.8.7
works as expected.Expected behavior We would expect Lmod to transverse the MODULEPATH until it finds a module that it can load without having to specify version when LMOD_TMOD_FIND_FIRST is set.
Debug Info: Attached is the debug output which should cover all the needed info. out.txt
Additional context The problem seems to be that Lmod sees the hidden module in the top directory and then chooses to ignore all other directories before it has validated that the module in the first directory is actually loadable.