Main Keywords for Job Scripts

Within the job script, you must specify the resource allocation method for your desired task using appropriate keywords. The main keywords are listed below, and users can create a job script file by using only a few of them.

  • job-name ( -J, --job-name ) Specifies the name of the job; if not specified, the script file name will be used as the job name.

  • time ( -t, --time ) Specifies the estimated runtime of the job; it is advisable to set this slightly longer than the actual estimated time. If the wall time limit exceeds that of the partition, the job will not be submitted. If the job is not completed by the specified time, the SLURM scheduler will forcibly terminate it.

  • partition ( -p, --partition ) Specifies the SLURM partition to be used for the job. The partition name can be verified using the sinfo command.

  • nodes ( -N, --nodes ) Specifies the number of nodes to allocate for the job.

  • ntasks ( -n, --ntasks ) Specifies the number of processes to allocate for the job.

  • ntasks-per-node ( --ntasks-per-node ) Specifies the number of processes to allocate per node.

  • input ( -i, --input ) Specifies the standard input.

  • cpus-per-task ( -c, --cpus-per-task ) Specifies the number of CPUs required per task.

  • output ( -o, --output ) Specifies the standard output.

    • %x : Uses the “job name” specified as the file name.

    • %j : Uses the “job ID” assigned upon submission as the file name.

    • %a : Uses the “job array ID” (index) number as the file name.

    • %u : Uses the “user ID” as the file name.

  • error ( -e, --error ) Specifies the standard error.

    • %x : Uses the “job name” specified as the file name.

    • %j : Uses the “job ID” assigned upon submission as the file name.

    • %a : Uses the “job array ID” (index) number as the file name.

    • %u : Uses the “user ID” as the file name.

  • dependency ( -d, --dependency ) Sets job dependencies. The job will start after the specified job has finished.

※ Detailed manual: Refer to http://slurm.schedmd.com/

Last updated on November 11, 2024.

Last updated