NERSCPowering Scientific Discovery Since 1974

"module: command not found" in batch jobs

January 6, 2012 by Helen He

Sympotom:

Users with csh/tcsh as default login shells will get this error when trying to use bash syntax in the batch scripts.  The following batch script will get the "module: command not found" error at run time.

#!/bin/bash
#PBS -q debug
#PBS -l mppwidth=24
#PBS -l walltime=00:10:00
cd $PBS_O_WORKDIR
module load acml

Workaround:

Use PBS keyword to specify the bash shell syntax for the batch script.  The following batch script works successfully:

#PBS -S /bin/bash
#PBS -q debug
#PBS -l mppwidth=24
#PBS -l walltime=00:10:00
cd $PBS_O_WORKDIR
module load acml