The package Environment Modules defines the module-info mode
command. The man page for modulefile lists the possible modes as:
load, remove, display, help, whatis, switch, switch1, switch2, or switch3.
What are the multiple switch statements?
The package Environment Modules defines the module-info mode
command. The man page for modulefile lists the possible modes as:
load, remove, display, help, whatis, switch, switch1, switch2, or switch3.
What are the multiple switch statements?
Couldn't find this documented anywhere, so I figured it out and want to share with you. Here's my explanation. Consider the following:
module load a
module swap a b
Here's what's executed under the hood by environment modules for each statement:
module load a
[ module-info mode ] == "load" for modulefile a
module swap a b
[module-info mode] == "switch1"
for modulefile a. This should unset prereqs and is similar to remove[module-info mode] == "switch2"
for modulefile b. This should add any dependencies. Simliar to "load"[module-info mode] == "switch3"
for modulefile a. Not sure why you'd need this.