How to use modules in batch scriptsΒΆ

The module environment is only available if the according module command was defined for the current shell. If you are using different shell as login shell and for job batch scripts (e.g. tcsh as login shell and your job scripts start with #!/bin/bash), you need to source one of the following files in your script before any invocation of the module command:

# in bash or ksh script
source /etc/profile.d/mistral.sh

# in tcsh or csh script
source /etc/profile.d/mistral.csh