Closed fgeorgatos closed 7 years ago
this could well be caused by Tcl modules, as opposed to Lmod, since we're dual stacked; this really looks as module language incompatibility, which hints at need for different markup for hidden bits
This error is coming from Tmod not Lmod. You'll have to wrap the hide-version command to hide it from Tmod. You should try something like this in your \~/.modulerc file:
#%Module
global env
if { [info exists env(LMOD_VERSION_MAJOR)]} {
hide-version CUDA/8.8.8
}
It is clear that the error messages came from Tmod as it said it came from cmdModule.c(613): ... You'll never see an error like that from Lmod.
Lmod defines LMOD_VERSION_MAJOR during its execution and nowhere else you can use it to know that Lmod is processing a TCL file.
I have added to http://lmod.readthedocs.io/en/latest/040_FAQ.html to report the same information on how to have Lmod only code in a TCL file that might be read by Tmod.
@rtmclay : this was helpful, thanks!
Since I am conditional-clauses-averse I'd like to query, out of curiosity, if there could exist any alternative mechanism which is simply ignored by Tmod but understood by Lmod. fi. it could be a parameter while loading a variable or something of the sort.
Not asking for any implementation, just checking for future needs! ;-)
OK, false alarm on this one: this occured via the headnode which had no Lmod RPM, so it fall back to Tmod, as it should. Closing issue,
[root@zxyz-xyz-zxln01 ~]# echo hostname|su - fgeorgatos -c 'module load sge;module --version 2>&1|head -2'
Modules based on Lua: Version 7.4.9 2017-05-02 10:07 -05:00
[root@zxyz-xyz-zxln01 ~]# logout
Connection to ukch-dev-brln01 closed.
[root@zxyz-xyz-zxhn01 ~]# echo hostname|su - fgeorgatos -c 'module load sge;module --version 2>&1|head -2'
cmdModule.c(613):ERROR:102: Tcl command execution failed: hide-version CUDA/8.8.8
locate_module.c(1083):WARN:71: Error sourcing file '/home/fgeorgatos/.modulerc'
VERSION=3.2.10
DATE=2012-12-21