Skip to content

Commit 513b2ce

Browse files
authored
Merge pull request #40 from Juke34/reditools2
Reditools2
2 parents 0024d53 + 8b27918 commit 513b2ce

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

config/resources/hpc.config

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
process {
22
cpus = 1
33
time = '1h'
4-
maxForks = 12
5-
shell = ['/bin/bash', '-euo', 'pipefail']
6-
stageOutMode = 'rsync'
7-
8-
// Enable retries globally for certain exit codes
9-
errorStrategy = { task.attempt <= 3 ? 'retry' : 'finish' }
10-
114

125
withName: 'fastqc' {
136
cpus = 2

nextflow.config

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,16 @@ profiles {
2222

2323
itrop {
2424
process {
25-
executor = 'slurm'
26-
queue = 'normal'
27-
scratch = '/scratch-ib'
28-
clusterOptions = "--constraint=infiniband"
25+
executor = 'slurm' // Tells Nextflow to submit jobs using the SLURM workload manager
26+
maxForks = 12 // Limits the maximum number of jobs that can be submitted concurrently for that process
27+
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
28+
queue = 'normal' // Submits jobs to the SLURM partition (also called “queue”) named normal.
29+
scratch = false // Use shared file system, not local node /tmp
30+
stageOutMode = 'move' // Move is safe on shared FS and faster than copy
31+
publishDirMode = 'rsync' // For final outputs, copy to results folder
32+
errorStrategy = 'retry' // Retry failing jobs automatically
33+
maxRetries = 3 // Retry up to 3 times
34+
clusterOptions = "--constraint=infiniband" // extra parameters provided to the scheduler
2935
}
3036

3137
singularity.enabled = true

singularity/reditools2/reditools2.def

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ From: condaforge/miniforge3:24.7.1-2
2626
ln -s /opt/reditools2/src/cineca/reditools.py /usr/local/bin/reditools.py
2727
ln -s /opt/reditools2/src/cineca/parallel_reditools.py /usr/local/bin/parallel_reditools.py
2828

29+
# Patch hostname retrieval in Reditools2
30+
sed -i.bak '849c\
31+
addresses = netifaces.ifaddresses(interface)\
32+
if netifaces.AF_INET in addresses:\
33+
ip_address = addresses[netifaces.AF_INET][0]["addr"]\
34+
hostname = socket.gethostbyaddr(ip_address)[0]\
35+
else:\
36+
hostname = socket.gethostname()' /opt/reditools2/src/cineca/reditools.py
37+
2938
%environment
3039
export PATH=/usr/local/bin:$PATH
3140
export CONDA_DEFAULT_ENV=myenv

0 commit comments

Comments
 (0)