Job output¶
By default, Slurm will generate a single job output file in format
slurm-JOBID.out, containing the STDOUT and STDERR streams produced by the
job.
The naming and merging of the files can be changed using job script options,
and we highly recommend you give your Slurm jobs a name and then manually
define your job output file(s) naming scheme to match, to avoid all your output
files starting with slurm-.
You can change how output files are named using job script options. We
recommend naming your Slurm jobs and defining custom output files to avoid
the default slurm- prefix.
See the
official Slurm filename pattern documentation
for more information about the Slurm replacement symbols (percent sign %
followed by a letter) used in the examples below.
Quoting job names with spaces
Slurm supports job names with spaces providing the -J (or --job-name)
parameter is quoted (for example, -J "test job") however, we recommend
replacing spaces with underscores or hyphens if possible.
Single combined job output file¶
For a single output file (which would be named jobname.oJOBID):
#SBATCH -J jobname
#SBATCH -o %x.o%j
Example for a job called jobname with the job number 1234567:
jobname.o1234567
Separate job error and output files¶
For separate output files for STDOUT and STDERR (which would be named
jobname.oJOBID and jobname.eJOBID respectively):
#SBATCH -J jobname
#SBATCH -o %x.o%j
#SBATCH -e %x.e%j
Example for a job called jobname with the job number 1234567:
jobname.e1234567 (STDERR)
jobname.o1234567 (STDOUT)