diff --git a/config/resources/hpc.config b/config/resources/hpc.config index 9a4c01a..8bd3a57 100644 --- a/config/resources/hpc.config +++ b/config/resources/hpc.config @@ -1,13 +1,6 @@ process { cpus = 1 time = '1h' - maxForks = 12 - shell = ['/bin/bash', '-euo', 'pipefail'] - stageOutMode = 'rsync' - - // Enable retries globally for certain exit codes - errorStrategy = { task.attempt <= 3 ? 'retry' : 'finish' } - withName: 'fastqc' { cpus = 2 diff --git a/nextflow.config b/nextflow.config index 31dcdd9..5a112b9 100644 --- a/nextflow.config +++ b/nextflow.config @@ -22,10 +22,16 @@ profiles { itrop { process { - executor = 'slurm' - queue = 'normal' - scratch = '/scratch-ib' - clusterOptions = "--constraint=infiniband" + executor = 'slurm' // Tells Nextflow to submit jobs using the SLURM workload manager + maxForks = 12 // Limits the maximum number of jobs that can be submitted concurrently for that process + shell = ['/bin/bash', '-euo', 'pipefail'] // Shell options: -e: Exit immediately on error (non-zero exit status); -u: Treat unset variables as an error; -o pipefail: The pipeline fails if any command in the pipeline fails + queue = 'normal' // Submits jobs to the SLURM partition (also called “queue”) named normal. + scratch = false // Use shared file system, not local node /tmp + stageOutMode = 'move' // Move is safe on shared FS and faster than copy + publishDirMode = 'rsync' // For final outputs, copy to results folder + errorStrategy = 'retry' // Retry failing jobs automatically + maxRetries = 3 // Retry up to 3 times + clusterOptions = "--constraint=infiniband" // extra parameters provided to the scheduler } singularity.enabled = true diff --git a/singularity/reditools2/reditools2.def b/singularity/reditools2/reditools2.def index 95bc809..332cbad 100644 --- a/singularity/reditools2/reditools2.def +++ b/singularity/reditools2/reditools2.def @@ -26,6 +26,15 @@ From: condaforge/miniforge3:24.7.1-2 ln -s /opt/reditools2/src/cineca/reditools.py /usr/local/bin/reditools.py ln -s /opt/reditools2/src/cineca/parallel_reditools.py /usr/local/bin/parallel_reditools.py + # Patch hostname retrieval in Reditools2 + sed -i.bak '849c\ + addresses = netifaces.ifaddresses(interface)\ + if netifaces.AF_INET in addresses:\ + ip_address = addresses[netifaces.AF_INET][0]["addr"]\ + hostname = socket.gethostbyaddr(ip_address)[0]\ + else:\ + hostname = socket.gethostname()' /opt/reditools2/src/cineca/reditools.py + %environment export PATH=/usr/local/bin:$PATH export CONDA_DEFAULT_ENV=myenv