Page tree
Skip to end of metadata
Go to start of metadata

It is critical that jobscripts are self contained, and do not utilise environment variables inherited from external sources such as ~/.profile, or the environment from which the job was launched.  The reasons for this are that:

  • Pawsey staff are able to reproduce your job if you require assistance,
  • you can share jobscripts with colleagues and they will get the same results, and
  • you can move your workflow to another system and expect it to work the same.


The below code in a jobscript will ensure that a SLURM job starts with a clean environment, and no environment variables are inherited from your interactive shell.

#SBATCH --export=NONE


Do not put "module use" or "module load" in Shell Initialisation Scripts (~/.login, ~/.profile, ~/.cshrc, ~/.bashrc etc).  Altering a job's environment in this manner is difficult and slow to debug, and you cannot grant access to colleagues without reducing the security of your login account.