-
Notifications
You must be signed in to change notification settings - Fork 27
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
Update check for load user modulefiles to allow exact match #482
Update check for load user modulefiles to allow exact match #482
Conversation
Hello @jo-basevi! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2024-08-13 23:31:54 UTC |
This is to fix bug payu-org#481 where module avail for `openmpi/4.1.5` includes `openmpi/4.1.5` and `openmpi/4.1.5-debug` Added tests for parsing module avail output
392ff77
to
b69a0db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments ... but happy to merge if they're ignorable.
That was an implementation bug. We've removed the |
Thanks for the review!
Yes, that does help thanks. Ok so don't have to worry about using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Allow checks for "modules: load:" modulefiles to allow when there's an exact match in available modules. This is to fix bug #481 where module avail for
openmpi/4.1.5
includesopenmpi/4.1.5
andopenmpi/4.1.5-debug
.I've also added tests for parsing module avail output.
Closes #481.
@aidanheerdegen last week there was an issue with multiple modules found in
/g/data/vk83/modules
and/g/data/vk83/modules/access-models
, even though they were the same modulefile. I noticed in the modules docs there's amodule paths
command that lists paths of available modulefiles matching a pattern so for the above, it would still evaluate to the same path. There's a couple of differences tomodule avail
:module paths
usingmodulecmd
($MODULESHOME//bin/modulecmd
) generates a bunch of code. So forbash
, it generates a bunch of echo statements, rather than output going tostderr
which is the case formodule avail
. So to get what values are printed, have to run the generated code, and then capture the output.openmpi/
with a/
just matches the default module version (I think), so only one path is returned.If it's unlikely to have a case where
module/version
can be accessed from two different modulepaths and are different, e.g.The check could be changed from
modules_avail.count(modulefile) != 1
tomodulefile not in modules_avail
in this PR. Maybe this be moved to separate to avoid blocking this PR?