1

I am unsure where I add the --wait sbatch option when using snakemake. I tried to add it to the snakemake command itself but I get the following error:

Error submitting jobscript (exit code 1):
Submitted batch job 5389577

Any help would be appriciated.

My snakemake command is as follows:

snakemake --latency-wait 60 --rerun-incomplete --keep-going --jobs 99 --cluster-status 'python /home/lamma/faststorage/scripts/slurm-status.py' --cluster 'sbatch  -t {cluster.time} --mem={cluster.mem} --cpus-per-task={cluster.c} --error={cluster.error}  --job-name={cluster.name} --output={cluster.output} --wait' --cluster-config bacterial-hybrid-assembly-config.json --configfile yaml-config-files/test_experiment3.yaml --snakefile bacterial-hybrid-assembly.smk
Lamma
  • 895
  • 1
  • 12
  • 26
  • What are you trying to wait for? And Why? – Maarten-vd-Sande Jan 08 '20 at 13:10
  • I am calling another pipeline in a rule but snakemake tried to move onto the next rule before the pipeline in the previous rule has finished running so I get missingoutput errors. This is [my post about that issue](https://stackoverflow.com/questions/59630183/calling-another-pipeline-within-a-snakefile-result-in-mising-output-errors/59633049?noredirect=1#comment105446846_59633049) – Lamma Jan 09 '20 at 11:14

1 Answers1

0

Adding --parsable flag to sbatch command will allow --cluster-status script to properly parse job IDs. Relevant sources: 1, 2.

'sbatch  -t {cluster.time} --mem={cluster.mem} --cpus-per-task={cluster.c} --error={cluster.error}  --job-name={cluster.name} --output={cluster.output} --wait --parsable'
Manavalan Gajapathy
  • 3,900
  • 2
  • 20
  • 43