From b45f7c48ab1a04553cf7d3cf0ef921bd7e6a60ec Mon Sep 17 00:00:00 2001 From: Paolo Di Tommaso Date: Mon, 1 Jul 2024 22:36:58 +0200 Subject: [PATCH] Add support for HyperQueue 0.17.0 or later [BREAKING] [ci fast] Signed-off-by: Paolo Di Tommaso --- docs/executor.md | 3 +++ .../main/groovy/nextflow/executor/HyperQueueExecutor.groovy | 2 +- .../groovy/nextflow/executor/HyperQueueExecutorTest.groovy | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/executor.md b/docs/executor.md index f9bc2273ed..ab1febff8a 100644 --- a/docs/executor.md +++ b/docs/executor.md @@ -223,6 +223,9 @@ Resource requests and other job characteristics can be controlled via the follow - {ref}`process-memory` - {ref}`process-time` +:::{note} As of Nextflow version 24.06.0-edge, HyperQueue version 0.17.0 or later is required. +::: + (k8s-executor)= ## Kubernetes diff --git a/modules/nextflow/src/main/groovy/nextflow/executor/HyperQueueExecutor.groovy b/modules/nextflow/src/main/groovy/nextflow/executor/HyperQueueExecutor.groovy index ddc43a7bf9..b3e6c9ca16 100644 --- a/modules/nextflow/src/main/groovy/nextflow/executor/HyperQueueExecutor.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/executor/HyperQueueExecutor.groovy @@ -64,7 +64,7 @@ class HyperQueueExecutor extends AbstractGridExecutor { // No enforcement, Hq just makes sure that the allocated value is below the limit if( task.config.getMemory() ) - result << '--resource' << "mem=${task.config.getMemory().toBytes()}".toString() + result << '--resource' << "mem=${task.config.getMemory().toMega()}".toString() if( task.config.hasCpus() ) result << '--cpus'<< task.config.getCpus().toString() if( task.config.getTime() ) diff --git a/modules/nextflow/src/test/groovy/nextflow/executor/HyperQueueExecutorTest.groovy b/modules/nextflow/src/test/groovy/nextflow/executor/HyperQueueExecutorTest.groovy index 51059260cb..76bfbfd300 100644 --- a/modules/nextflow/src/test/groovy/nextflow/executor/HyperQueueExecutorTest.groovy +++ b/modules/nextflow/src/test/groovy/nextflow/executor/HyperQueueExecutorTest.groovy @@ -133,7 +133,7 @@ class HyperQueueExecutorTest extends Specification { #HQ --name nf-task-1 #HQ --log /work/dir/.command.log #HQ --cwd /work/dir - #HQ --resource mem=8589934592 + #HQ --resource mem=8192 #HQ --cpus 4 #HQ --time-limit 60sec #HQ --resource gpus=2