Do you know a way to automatically generate the modulefile for Intel compilers without using the env2 script?
Asked
Active
Viewed 532 times
1 Answers
1
Using latest version of Modules (v4.6+), the module
command gets a new sub-command called sh-to-mod that translates the environment changes performed by a given script into modulefile commands.
$ module sh-to-mod sh /path/to/foo-1.2/foo-setup.sh arg1
#%Module
prepend-path PATH /path/to/foo-1.2/bin
set-alias foo {foobin -q -l}
setenv FOOENV arg1
The source-sh modulefile Tcl command is also introduced in version 4.6 of Modules to directly translate the environment changes performed by a given script as if it was the content of the modulefile currently being evaluated.
On older version of Modules, a standalone script named createmodule.py
is provided to achieve such script to modulefile translation.

Xavier Delaruelle
- 771
- 7
- 21