marbl / verkko

265 stars 27 forks source link

Passing SBATCH QOS option #257

Closed dmacguigan closed 4 weeks ago

dmacguigan commented 4 weeks ago

Hello,

I'm attempting to use verkko on a cluster with a SLURM job scheduler. We need to specify our QOS SBATCH option. I've tried to do this as follows when calling

verkko -d ${WD} \
 --hifi ${HERRO_READS} \
 --nano ${READS} \
 --hic1 ${HIC1} \
 --hic2 ${HIC2} \
 --slurm \
 --snakeopts "--default-resources slurm_partition=general-compute slurm_account=tkrabben \"slurm_extra='--qos=general-compute'\"" \
 --spl-run 1 8 24

But I encounter the following error:

[Thu Jun  6 11:36:44 2024]
checkpoint splitONT:
    input: /vscratch/grp-tkrabben/MacGuigan/rawNanoporeData/Svit_TJK-76/Dorado/Svit_TJK76.cell1.passed.fastq.gz
    output: 3-align/splitONT.finished
    log: 3-align/splitONT.err
    jobid: 16
    reason: Missing output files: 3-align/splitONT.finished
    resources: mem_mb=69755, mem_mib=66524, disk_mb=69755, disk_mib=66524, tmpdir=<TBD>, slurm_partition=general-compute, slurm_account=tkrabben, slurm_extra=--qos=general-compute, job_id=1, n_cpus=1, mem_gb=8, time_h=24
DAG of jobs will be updated after completion.

sbatch: error: Batch job submission failed: Invalid qos specification
sbatch: error: Batch job submission failed: Invalid qos specification
Error submitting jobscript (exit code 1):

Is there a way to pass QOS and other SBATCH options? Apologies if this is obvious, I'm new to Snakemake.

Thanks, Dan

skoren commented 4 weeks ago

See #209 for a couple of options to pass extra options to the submit commands used by verkko. I think you want:

--snakeopts '--cluster "./slurm-sge-submit.sh {threads} {resources.mem_gb} {resources.time_h} {rulename} {resources.job_id} --partition=general-compute --account=tkrabben --qos=general-compute"'
dmacguigan commented 4 weeks ago

That did the trick, thank you for the quick response!