In the following section, you will learn how to submit jobs to the job queue, cancel submitted jobs, inspect job output, monitor the queue to see whether your job is already running and monitor running jobs to see if they use resources efficiently.

Submitting jobs, deleting jobs and job output

Submitting a job

To submit the job described in my_job.sh, use

sbatch my_job.sh

Upon submission, the system will report the job ID that has been assigned to the job.

Deleting a job

If you want to cancel a job in the queue, use

scancel [jobid]

You can do this when the job is still in the queue, but also when the job is already running, e.g. in case you found an error in your job-script or code and you don't want to waste your budget for computations (see accounting pages for Snellius here).

Job output

In an interactive session, the terminal shows two types of output streams: the standard output and standard error streams. Regular output (e.g. the result of a calculation) that a program wants to show in the terminal is generally written to the standard output stream, while error output (e.g. your program reports it is missing an argument) is commonly written to the standard error stream.

In the batch system, this output is written to a text file: slurm-[jobid].out records the standard output stream and standard error stream (where jobid is the jobid assigned upon the submission of the job script). Make sure to check this file after your job has finished to see if it ran correctly. In particular, when you noticed your job did not run as expected, check to see if any warning or error messages were reported.

  • No labels