snakemake / snakemake-executor-plugin-slurm

A Snakemake executor plugin for submitting jobs to a SLURM cluster
MIT License
9 stars 13 forks source link

add human job name with wildcards #34

Closed sravel closed 4 months ago

sravel commented 5 months ago

if I've understood the documentation, you use the run_uuid as the job name. In snakemake 7 profiles, I use wildcars to identify jobs. I also use the rules logs so that the slurm logs are in the same directory.

    output: '{log.output}_cluster'
    error: '{log.error}_cluster'
    job-name: '{rule}.{wildcards}'

is it possible to implement these options in this plugin?

thanks in advance

cmeesters commented 5 months ago

The special job names are there for the reason to limit the number of queries necessary to the slurmctld. Which is a handy feature when many jobs are spawned by snakemake.

However, we had the request in the past and I found this also a little bit annoying. Hence, a "comment" was inserted to contain the rule name. You can inquire with commands like: sacct -o jobid,comment,nodelist,state. I was, however, not able to amend the docs accordingly and indicate shortcuts and the like. Thank you for providing this issue - I will only close it, when sufficient documentation is present.

cmeesters commented 4 months ago

done

sravel commented 4 months ago

I'm sorry, but I don't see how to add a wildcard to a job on the documentation, while you are removing a feature available on snakemake 7 ???? I want to use wildcard because if all the jobs have the same name (or comment), you won't be able to see which samples are running... I also use wildcard for job name to link slurm log to a sample. Thanks