SLURM / Sbatch creates many small output files
Asked Answered
C

1

6

I am running a pipeline on a SLURM-cluster, and for some reason a lot of smaller files (between 500 and 2000 bytes in size) named along the lines of slurm-XXXXXX.out (where XXXXXX is a number). I've tried to find out what these files are on the SLURM website, but I can't find any mention of them. I assume they are some sort of in-progress files that the system uses while parsing my pipeline?

If it matters, the pipeline I'm running is using snakemake. I know I've seen these types of files before though, without snakemake, but I they weren't a big problem back then. I'm afraid that clearing the working directory of these files after each step of the workflow will interrupt in-progress steps, so I'm not doing anything with them at the moment.

What are these files, and how can I suppress their output or, alternatively, delete them after their corresponding job is finished? Did I mess up my workflow somehow, and that's why they are created?

Carbaugh answered 24/10, 2017 at 10:32 Comment(1)
I guess that your snakemake workflow submits a lot of jobs to the cluster, each one generating one of these files.Codon
N
14

You might want to take a look at the sbatch documentation. The files that you are referring to are essentially SLURM logs as explained there:

By default both standard output and standard error are directed to a file of the name "slurm-%j.out", where the "%j" is replaced with the job allocation number.

You can change the filename with the --error=<filename pattern> and --output=<filename pattern> command line options. The filename_pattern can have one or more symbols that will be replaced as explained in the documentation. According to the FAQs, you should be able to suppress standard output and standard error by using the following command line options:

sbatch --output=/dev/null --error=/dev/null [...]

Noranorah answered 24/10, 2017 at 17:16 Comment(1)
Oh, that's great! I don't know how I missed that... Thanks for the help :-)Carbaugh

© 2022 - 2024 — McMap. All rights reserved.