You are located in service: RWTH High Performance Computing (Linux)

Best Practices

Best Practices


  • Running multiple similar jobs which only differ in terms of the input often is required in the context of parameter study / sensitivity analysis. Array jobs are recommended for this scenario.
  • Long computations should be divided into shorter steps, creating a chain job.
  • In order to avoid pitfalls and finding errors after waiting hours for a job to start, the following procedure for setting up batch jobs has been judged as useful:
    • Avoid loading modules in your .zshrc or .bashrc.
    • Test your application whether it starts as expected on a login node.
    • Put all commands necessary for the program to start into a script file.
      • Don't forget the module commands and the shebang (#!) at the first line of the script: #!/usr/bin/zsh

      • Use relative paths and ensure that you know the directory in which the job starts.
    • Make the script executable (chmod 775, run it (./ and make sure that everything works as expected.
      • Ensure that you have configured your program's memory / stack limits when neccessary.
    • Put all job requests in the script file using the #SBATCH directive.
      • Pay attention to the limiting factors such as: memory, number of slots and job run time.
    • Submit your script with a run time of 5 minutes so that it has greater chance of failing early. If everything starts as expected,
    • Submit your final script.

last changed on 02/23/2024

How did this content help you?

Creative Commons Lizenzvertrag
This work is licensed under a Creative Commons Attribution - Share Alike 3.0 Germany License