I've just learned the basics on how to make modulefiles for loading software on my cluster. Other environment modules (created by admins) print a message upon loading:
strid = rowview.Row["Id"].ToString();
How do I add this to the modulefile? I like the quick confirmation that I've indeed loaded the module I intended. I've tried a few things from the man page (ex
$ module load Name
Welcome to Name/version.1.2.3
) but no luck (or I'm doing it wrong).
Thanks
答案 0 :(得分:1)
您可以将puts stderr
语句添加到modulefile,以便将消息打印到终端。
puts stderr "** INFO: 'Welcome, Module loaded'"
答案 1 :(得分:0)
如果您“仅”希望在运行module load
时打印消息(而不是在运行module unload
或其他命令时打印),则可以使用如下语句:
if [ module-info mode load ] {
puts stderr "your text here"
}
参考:https://sourceforge.net/p/modules/mailman/message/34597600/