How does snakemake know files created though a slurm job are incomplete when job is canceled?

Viewed 76

for example, if running a job that sumbits to slurm and canceling slurm job via scancel -u username and canceling snakemake with ctrl-c, on next run snakemake will say:

The files below seem to be incomplete. If you are sure that certain files are not incomplete, mark them as complete with

How does it know this? Does it make its own "touch file" internally?

1 Answers

I don't have a conclusive answer but maybe this puts you in the right direction: snakemake writes a hidden directory, named .snakemake, in the working directory (you need ls -a to see it).

Inside .snakemake there are various subdirectories and the answer to your question maybe there. In particular, there is a metadata directory with cryptic filenames which appear to be json files with information about each job. An entry of these jsons is "incomplete": true/false.

As an aside, it's good to know that .snakemake/log contains the logs of each job.

Related