Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 37 additions & 32 deletions conf/cheaha.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
// Prevent schemas warnings for profile parameters
validation {
ignoreParams = [
'cheaha_scratch_dir'
]
}

// Define the Scratch directory
def scratch_dir = System.getenv("USER_SCRATCH") ?: "/tmp"
params.cheaha_scratch_dir = env('USER_SCRATCH') ?: '/tmp'

params {
config_profile_name = 'cheaha'
Expand All @@ -9,40 +16,14 @@ params {
}

env {
TMPDIR="$scratch_dir"
SINGULARITY_TMPDIR="$scratch_dir"
TMPDIR=params.cheaha_scratch_dir
SINGULARITY_TMPDIR=params.cheaha_scratch_dir
}

singularity {
enabled = true
autoMounts = true
runOptions = "--contain --workdir $scratch_dir -B /scratch"
}

def getQueues = { time, memory ->
def queue_list = ["long"]

if (time <= 2.h) {
queue_list.add("express")
}

if (time <= 12.h) {
queue_list.add("short")
}

if (time <= 50.h) {
queue_list.add("medium")
}

if (memory >= 300.GB) {
queue_list.add("largemem-long")

if (time <= 50.h) {
queue_list.add("largemem")
}
}

return queue_list.join(",")
runOptions = "--contain --workdir ${params.cheaha_scratch_dir} -B /scratch"
}

process {
Expand All @@ -54,5 +35,29 @@ process {
executor = 'slurm'
maxRetries = 3
beforeScript = 'module load Singularity/3.5.2-GCC-5.4.0-2.26'
queue = { getQueues( task.time, task.memory ) }
}
queue = {
def queue_list = ["long"]

if (task.time <= 2.h) {
queue_list.add("express")
}

if (task.time <= 12.h) {
queue_list.add("short")
}

if (task.time <= 50.h) {
queue_list.add("medium")
}

if (task.memory >= 300.GB) {
queue_list.add("largemem-long")

if (task.time <= 50.h) {
queue_list.add("largemem")
}
}

return queue_list.join(",")
}
}
Loading