maxplanck-ie / snakepipes

Customizable workflows based on snakemake and python for the analysis of NGS data
http://snakepipes.readthedocs.io
378 stars 85 forks source link

DNA-mapping workflow gives an error related to number of CPUs per node #907

Closed re-rosales closed 1 year ago

re-rosales commented 1 year ago

Hi,

I having issues when running the DNA-mapping pipeline. I just recently installed snakePipes into my university's HPC cluster, following the documentation in RTD and I set up the corresponding configuration files: cluster.yaml, defaults.yaml with the command snakePipes config, and the organisms directory. Everything seems to work fine. However the DNA-mapping pipeline gets stuck at the Bowtie2 rule.

The error message is the following:

rule Bowtie2:
    input: FASTQ_TrimGalore/M1_Dlk1_pos_Cd34_neg_R1.fastq.gz, FASTQ_TrimGalore/M1_Dlk1_pos_Cd34_neg_R2.fastq.gz
    output: Bowtie2/M1_Dlk1_pos_Cd34_neg.Bowtie2_summary.txt, Bowtie2/M1_Dlk1_pos_Cd34_neg.sorted.bam
    log: Bowtie2/logs/M1_Dlk1_pos_Cd34_neg.sort.log
    jobid: 11
    benchmark: Bowtie2/.benchmark/Bowtie2.M1_Dlk1_pos_Cd34_neg.benchmark
    reason: Missing output files: Bowtie2/M1_Dlk1_pos_Cd34_neg.sorted.bam, Bowtie2/M1_Dlk1_pos_Cd34_neg.Bowtie2_summary.txt
    wildcards: sample=M1_Dlk1_pos_Cd34_neg
    threads: 24
    resources: mem_mb=15367, disk_mb=15367, tmpdir=<TBD>

sbatch: error: CPU count per node can not be satisfied
sbatch: error: Batch job submission failed: Requested node configuration is not available
Error submitting jobscript (exit code 1):

It seems there is a problem with the number of CPUs requested. But when I increased the number of cores -j 10 it gives the same error. I also tried several things like increasing the memory for bowtie2 to 6G in the cluster.yaml of the DNA-mapping workflow. Also modified the "general" cluster.yaml file with --ntasks-per-node 4 and the default memory to 4G.

Besides these changes it still not working. So I wonder if there are additional parameters that can be changed, like memory per CPU or the threads required for bowtie2

If useful, a couple of details about the cluster I'm using:

I would appreciate if you can provide me some help.

adRn-s commented 1 year ago

Everything seems to work fine. However the DNA-mapping pipeline gets stuck at the Bowtie2 rule.

What's "everything" ? Do you mean other snakePipes' pipelines are working?

Anyway, the Bowtie2 rule you pasted has threads: 24. Slurm is probably configured to allocate cores and not threads, check the output of scontrol show nodes. If your node has CoresPerSocket=2 (for example!), then you'd need to ask for 12 cores at least. Further details, see this

re-rosales commented 1 year ago

Thanks for the suggestion,

The CoresPerSocket=8. Anyway I tried also to set the number of cores to either 12 or 24, like this: DNA-mapping ... -j 24 and it didn't work. But I noticed other jobs with more than 2 threads give me a similar error. Therefore, it seems the maximum number of threads allowed in this cluster is 2, so I changed this value in the defaults.yaml file: max_thread: 2. And it worked for me like this.

Maybe it's a matter of how Slurm is configured, as you mentioned. I'll ask the admins to see how resources are assigned to the jobs and try to make it work efficiently.

Thanks.