jdblischak / smk-simple-slurm

A simple Snakemake profile for Slurm without --cluster-config
Creative Commons Zero v1.0 Universal
141 stars 18 forks source link

Silent failures due to certain {wildcards} in --output #7

Closed GC3F closed 2 years ago

GC3F commented 2 years ago

Hi there @jdblischak,

Thanks for creating this. I've only used it twice, but it seems simple, easy to use, easy to understand, and appears to work, all great qualities. I'll keep using it. And thanks for the notice about "Use speed with caution", that's good advice.

One little issue I ran into. My wildcards frequently have '/' (slashes) in them (to represent file paths). Because of that, it broke the cluster command, due of the --output line: --output=logs/{rule}/{rule}-{wildcards}-%j.out The result was that those commands failed quickly but silently (no log file left behind). I've ended up changing mine to: --output=logs/slurm-%j-%x-{rule}.out Just something to look out for.

Thanks again for creating this!

jdblischak commented 2 years ago

Hi @GC3F!

Thanks for creating this. I've only used it twice, but it seems simple, easy to use, easy to understand, and appears to work, all great qualities. I'll keep using it. And thanks for the notice about "Use speed with caution", that's good advice.

Thanks for the positive feedback!

One little issue I ran into. My wildcards frequently have '/' (slashes) in them (to represent file paths). Because of that, it broke the cluster command, due of the --output line: --output=logs/{rule}/{rule}-{wildcards}-%j.out

Right. This is a known issue that I list in the Limitations:

  • Wildcards can't contain / if you want to use them in the name of the Slurm log file. This is a Slurm requirement (which makes sense, since it has to create a file on the filesystem). You'll either have to change how you manage the wildcards or remove the wildcards from the pattern passed to --output. Note that you can still submit wildcards containing / to --job-name

The result was that those commands failed quickly but silently (no log file left behind). I've ended up changing mine to: --output=logs/slurm-%j-%x-{rule}.out

That's a perfect workaround. Glad you've got it working again!