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
110 changes: 56 additions & 54 deletions conf/utd_juno.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,29 @@ params {
config_profile_contact_github = '@eternal-flame-ad'
config_profile_contact_email = 'anne.fu@utdallas.edu'
config_profile_url = 'https://hpc.utdallas.edu/systems-resources/juno/'

warning_message = {
System.out.println("WARNING: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
System.out.println("WARNING:")
System.out.println("WARNING: THIS CONFIG IS NO LONGER MAINTAINED.")
System.out.println("WARNING:")
System.out.println("WARNING: THIS CONFIG IS SOON TO BE DEPRECATED DUE TO AN UPCOMING VERSION NEXTFLOW THAT WILL NOT BE BACKWARDS COMPATIBLE.")
System.out.println("WARNING:")
System.out.println("WARNING: PLEASE GET IN CONTACT WITH THE NF-CORE COMMUNITY (https://nf-co.re/join) ASAP")
System.out.println("WARNING: TO ALLOW CONTINUED USE OF YOUR CONFIG WITH NF-CORE PIPELINES")
System.out.println("WARNING:")
System.out.println("WARNING: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
}.call()
}

env {
SINGULARITY_CACHEDIR="/home/$USER/scratch/singularity"
SINGULARITY_CACHEDIR="/home/${System.getenv('USER')}/scratch/singularity"
}


def select_queue_and_flags = { cpus, memory, time, accelerator ->
var accelerator_count = 0;
var accelerator_ty = null;
if (accelerator != null) {
if (accelerator instanceof Number) {
accelerator_count = accelerator;
} else if (accelerator instanceof Map) {
accelerator_ty = accelerator.type;
accelerator_count = accelerator.limit;
} else {
throw new IllegalArgumentException("Invalid `accelerator` directive value: $accelerator [${accelerator.getClass().getName()}]")
}
}

if (accelerator_count > 0) {
if (["h100", "nvidia_h100", "nvidia-h100", "nvidia_h100_80gb_hbm3"].contains(accelerator_ty)) {
// if this is a long task with a single accelarator, probably need the whole GPU
if (accelerator_count == 1 && time >= 2.h) {
return ['queue': 'h100', 'flags': "--gres=nvidia_h100_80gb_hbm3=${accelerator_count}"];
} else {
return ['queue': 'h100-2.40gb', 'flags': "--gres=nvidia_h100_80gb_hbm3=${accelerator_count}"];
}
}

if (["a30", "nvidia_a30", "nvidia-a30", "nvidia_a30_2g", "nvidia_a30_4g"].contains(accelerator_ty)) {
if (accelerator_count >= 4) {
return ['queue': 'a30-4.6gb', 'flags': "--gres=nvidia_a30=${accelerator_count}"];
} else if (accelerator_count >= 2) {
return ['queue': 'a30-2.12gb', 'flags': "--gres=nvidia_a30_2g=${accelerator_count}"];
} else if (accelerator_count >= 1) {
return ['queue': 'a30', 'flags': "--gres=nvidia_a30_1g=${accelerator_count}"];
}
}
}

if (memory >= 384.GB && memory <= 512.GB) {
return ['queue': 'h100', 'flags': ""];
}

if (memory >= 512.GB) {
return ['queue': 'a30', 'flags': ""];
}

return ['queue': 'normal', 'flags': ''];
singularity {
enabled = true
autoMounts = true
cacheDir = "/home/${System.getenv('USER')}/scratch/singularity"
}

executor {
Expand All @@ -64,19 +36,49 @@ executor {
jobName = { "${task.process.split(':').last()}" }
}

singularity {
enabled = true
autoMounts = true
cacheDir = "/home/$USER/scratch/singularity"
}

process {
executor = 'slurm'
queue = {
select_queue_and_flags(task.cpus, task.memory, task.time, task.get('accelerator')).queue
if (task.get('accelerator')?.type in ['h100', 'nvidia_h100', 'nvidia-h100', 'nvidia_h100_80gb_hbm3']) {
if (task.get('accelerator')?.limit == 1 && task.time >= 2.h) {
return 'h100'
}
return 'h100-2.40gb'
}
if (task.get('accelerator')?.type in ['a30', 'nvidia_a30', 'nvidia-a30', 'nvidia_a30_2g', 'nvidia_a30_4g']) {
if (task.get('accelerator')?.limit >= 4) {
return 'a30-4.6gb'
}
if (task.get('accelerator')?.limit >= 2) {
return 'a30-2.12gb'
}
return 'a30'
}
if (task.memory >= 384.GB && task.memory <= 512.GB) {
return 'h100'
}
if (task.memory >= 512.GB) {
return 'a30'
}
return 'normal'
}
clusterOptions = {
select_queue_and_flags(task.cpus, task.memory, task.time, task.get('accelerator')).flags
if (task.get('accelerator')?.type in ['h100', 'nvidia_h100', 'nvidia-h100', 'nvidia_h100_80gb_hbm3']) {
if (task.get('accelerator')?.limit == 1 && task.time >= 2.h) {
return "--gres=nvidia_h100_80gb_hbm3=${task.get('accelerator')?.limit}"
}
return "--gres=nvidia_h100_80gb_hbm3=${task.get('accelerator')?.limit}"
}
if (task.get('accelerator')?.type in ['a30', 'nvidia_a30', 'nvidia-a30', 'nvidia_a30_2g', 'nvidia_a30_4g']) {
if (task.get('accelerator')?.limit >= 4) {
return "--gres=nvidia_a30=${task.get('accelerator')?.limit}"
}
if (task.get('accelerator')?.limit >= 2) {
return "--gres=nvidia_a30_2g=${task.get('accelerator')?.limit}"
}
return "--gres=nvidia_a30_1g=${task.get('accelerator')?.limit}"
}
return ''
}
withLabel: gpu {
containerOptions = '--nv'
Expand Down
Loading