You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some modules have wrapper modules or aliases. E.g. Java/11 is not a real modules but implemented via a .modulerc.lua as module_version("Java/11.0.6-ppc64le", "11")
Similar thing exists for aliases: module_alias(...)
When EasyBuild checks for an existing module it runs module show <modname> and checks the output with a regexp ^\s*\S*/<modname>.*(\.lua)?:\s*$
This isn't exactly reliable. E.g. one might have a module Java/site-default-11 or so. Additionally not all possible modulerc locations are considered and aliases are completely unsupported. See https://lmod.readthedocs.io/en/latest/093_modulerc.html
The obvious solution would be to start parsing the modulerc files correctly.
But: Of course it isn't as this is what the modules tool can do way better.
Hence the better solution would be to check for _mlstatus = False and if that is found the module isn't available. Getting the filename isn't required for the correct return value of <ModulesTool>.exist so this can be greatly simplified.
Edit: This doesn't seem to work reliably for some reason. Sometimes lmod seems to return only _mlstatus = True even though the module isn't found. But only in EB, can't reproduce in shell. Seems to be that LMOD_QUIET=1 also suppresses the error code
In case we need the filename sometime later we should split the stdout/stderr and parse only stderr for a filename (LMod, not sure about EnvironmentModules)
The text was updated successfully, but these errors were encountered:
Some modules have wrapper modules or aliases. E.g.
Java/11
is not a real modules but implemented via a.modulerc.lua
asmodule_version("Java/11.0.6-ppc64le", "11")
Similar thing exists for aliases:
module_alias(...)
When EasyBuild checks for an existing module it runs
module show <modname>
and checks the output with a regexp^\s*\S*/<modname>.*(\.lua)?:\s*$
This isn't exactly reliable. E.g. one might have a module
Java/site-default-11
or so. Additionally not all possible modulerc locations are considered and aliases are completely unsupported. See https://lmod.readthedocs.io/en/latest/093_modulerc.htmlThe obvious solution would be to start parsing the modulerc files correctly.
But: Of course it isn't as this is what the modules tool can do way better.
Hence the better solution would be to check for
_mlstatus = False
and if that is found the module isn't available. Getting the filename isn't required for the correct return value of<ModulesTool>.exist
so this can be greatly simplified.Edit: This doesn't seem to work reliably for some reason. Sometimes lmod seems to return only
_mlstatus = True
even though the module isn't found. But only in EB, can't reproduce in shell. Seems to be thatLMOD_QUIET=1
also suppresses the error codeIn case we need the filename sometime later we should split the stdout/stderr and parse only stderr for a filename (LMod, not sure about EnvironmentModules)
The text was updated successfully, but these errors were encountered: