diff --git a/conf/vsc_kul_uhasselt.config b/conf/vsc_kul_uhasselt.config index 91d629f3..c20d450f 100644 --- a/conf/vsc_kul_uhasselt.config +++ b/conf/vsc_kul_uhasselt.config @@ -95,13 +95,17 @@ def limitTaskTime(time, maxTime) { * @return Queue name based on task requirements */ def determineGeniusQueue = { task -> - if (task.memory >= MEMORY_THRESHOLD_GENIUS) { - if (task.time >= TIME_THRESHOLD) { - return AVAILABLE_QUEUES.contains('dedicated_big_bigmem') ? 'dedicated_big_bigmem' : 'bigmem_long' - } - return 'bigmem' + def isHighMemory = task.memory >= MEMORY_THRESHOLD_GENIUS + def isLongRunning = task.time >= TIME_THRESHOLD + def hasDedicatedBigmem = AVAILABLE_QUEUES.contains('dedicated_big_bigmem') + + if (isHighMemory) { + return isLongRunning ? + (hasDedicatedBigmem ? 'dedicated_big_bigmem' : 'bigmem_long') : + 'bigmem' } - return task.time >= TIME_THRESHOLD ? 'batch_long' : 'batch' + + return isLongRunning ? 'batch_long' : 'batch' } /* @@ -111,14 +115,22 @@ def determineGeniusQueue = { task -> * @return GPU queue name based on task requirements */ def determineGeniusGpuQueue = { task -> - if (task.memory >= MEMORY_THRESHOLD_GENIUS) { - return task.time >= TIME_THRESHOLD ? 'gpu_v100_long' : 'gpu_v100' + def isHighMemory = task.memory >= MEMORY_THRESHOLD_GENIUS + def isLongRunning = task.time >= TIME_THRESHOLD + def hasDedicatedGpu = AVAILABLE_QUEUES.contains('dedicated_rega_gpu') + def hasAmdGpu = AVAILABLE_QUEUES.contains('amd') + + if (isHighMemory) { + return isLongRunning ? 'gpu_v100_long' : 'gpu_v100' } - if (task.time >= TIME_THRESHOLD) { - return AVAILABLE_QUEUES.contains('dedicated_rega_gpu') ? 'dedicated_rega_gpu' : - AVAILABLE_QUEUES.contains('amd') ? 'amd_long' : 'gpu_p100_long' + + if (isLongRunning) { + if (hasDedicatedGpu) return 'dedicated_rega_gpu' + if (hasAmdGpu) return 'amd_long' + return 'gpu_p100_long' } - return AVAILABLE_QUEUES.contains('amd') ? 'amd' : 'gpu_p100' + + return hasAmdGpu ? 'amd' : 'gpu_p100' } /* @@ -128,16 +140,19 @@ def determineGeniusGpuQueue = { task -> * @return Queue name based on task requirements and availability */ def determineWiceQueue = { task -> - if (task.memory >= MEMORY_THRESHOLD_WICE) { - if (AVAILABLE_QUEUES.contains('dedicated_big_bigmem')) { + def isHighMemory = task.memory >= MEMORY_THRESHOLD_WICE + def isLongRunning = task.time >= TIME_THRESHOLD + def hasDedicatedQueue = AVAILABLE_QUEUES.contains('dedicated_big_bigmem') + + if (isHighMemory) { + if (isLongRunning && hasDedicatedQueue) { return 'dedicated_big_bigmem' - } else { - task.time = limitTaskTime(task.time, TIME_THRESHOLD) - return 'bigmem,hugemem' } + task.time = limitTaskTime(task.time, TIME_THRESHOLD) + return 'bigmem,hugemem' } - return task.time >= TIME_THRESHOLD ? + return isLongRunning ? 'batch_long,batch_icelake_long,batch_sapphirerapids_long' : 'batch,batch_sapphirerapids,batch_icelake' } @@ -150,19 +165,20 @@ def determineWiceQueue = { task -> */ def determineWiceGpuQueue = { task -> def isHighMemory = task.memory >= MEMORY_THRESHOLD_WICE - def isDedicatedQueue = isHighMemory ? + def isLongRunning = task.time >= TIME_THRESHOLD + def hasDedicatedQueue = isHighMemory ? AVAILABLE_QUEUES.contains('dedicated_big_gpu_h100') : AVAILABLE_QUEUES.contains('dedicated_big_gpu') - if (task.time >= TIME_THRESHOLD && !isDedicatedQueue) { + if (isLongRunning && !hasDedicatedQueue) { task.time = limitTaskTime(task.time, TIME_THRESHOLD) } if (isHighMemory) { - return isDedicatedQueue ? 'dedicated_big_gpu_h100' : 'gpu_h100' - } else { - return isDedicatedQueue ? 'dedicated_big_gpu' : 'gpu_a100,gpu' + return (isLongRunning && hasDedicatedQueue) ? 'dedicated_big_gpu_h100' : 'gpu_h100' } + + return (isLongRunning && hasDedicatedQueue) ? 'dedicated_big_gpu' : 'gpu_a100,gpu' } /*