Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 reason reasons for this is 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.


This 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.

...

Do not put "module use" or "module load" in your 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.