While I submit jobs with --immediate-submit
and --dependency=afterok:{dependencies}
, the temp files are getting deleted even before the rules that depend on temp files are started. It's working perfectly when running in normal way. Does any other came across this issue?
Snakemake script
rule all:
input: 'file2', 'file3'
rule one:
input: 'file1'
output: temp('file2')
shell: "touch {output}"
rule two:
input: 'file2'
output: 'file3'
shell: "touch {output}"
Submission command
snakemake -s sample.snake --cluster '../mybatch.py {dependencies}' -j 4 --immediate-submit
Snakemake output message
Provided cluster nodes: 4
Job counts:
count jobs
1 all
1 one
1 two
3
rule one:
input: file1
output: file2
jobid: 1
rule two:
input: file2
output: file3
jobid: 2
localrule all:
input: file2, file3
jobid: 0
Removing temporary output file file2.
Finished job 0.
1 of 3 steps (33%) done
Removing temporary output file file2.
Finished job 1.
2 of 3 steps (67%) done
localrule all:
input: file2, file3
jobid: 0
Removing temporary output file file2.
Finished job 0.
3 of 3 steps (100%) done
Error in job two while creating output file file3.
ClusterJobException in line 9 of /faststorage/home/veera/pipelines/ipsych-GATK/test/sample.snake:
Error executing rule two on cluster (jobid: 2, jobscript: /faststorage/home/veera/pipelines/ipsych-GATK/test/.snakemake/tmp.cmvmr3lz/snakejob.two.2.sh). For
detailed error see the cluster log.
Will exit after finishing currently running jobs.
Error message
Missing files after 5 seconds:
file2
/faststorage/home/veera/pipelines/ipsych-GATK/test/.snakemake/tmp.jqh2qz0n
touch: cannot touch `/faststorage/home/veera/pipelines/ipsych-GATK/test/.snakemake/tmp.jqh2qz0n/1.jobfailed': No such file or directory
Missing files after 5 seconds:
file2
The jobs are being submitted with proper dependency. The ../mybatch.py is custom wrapper script for sbatch. Is this a bug or error in my code? Thanks for the help in advance.