// Define the Scratch directory def scratch_dir = System.getenv("USER_SCRATCH") ?: "/tmp" params { config_profile_name = 'cheaha' config_profile_description = 'University of Alabama at Birmingham Cheaha HPC' config_profile_contact = 'Lara Ianov (lianov@uab.edu) or Austyn Trull (atrull@uab.edu)' config_profile_url = 'https://www.uab.edu/cores/ircp/bds' } env { TMPDIR="$scratch_dir" SINGULARITY_TMPDIR="$scratch_dir" } singularity { enabled = true autoMounts = true runOptions = "--contain --workdir $scratch_dir" } process { executor = 'slurm' queue = { task.memory <= 50.GB ? (task.time <= 2.h ? 'express' : task.time <= 12.h ? 'short' : task.time <= 50.h ? 'medium' : 'long') : (task.time <= 50.h ? 'largemem' : 'largemem-long')} maxRetries = 3 beforeScript = 'module load Singularity' } params { max_memory = 750.GB max_cpus = 128 max_time = 150.h }