diff --git a/modules/nextflow/src/main/groovy/nextflow/executor/CrgExecutor.groovy b/modules/nextflow/src/main/groovy/nextflow/executor/CrgExecutor.groovy index 0b12dd9c8a..aa5ee7171b 100644 --- a/modules/nextflow/src/main/groovy/nextflow/executor/CrgExecutor.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/executor/CrgExecutor.groovy @@ -18,6 +18,7 @@ package nextflow.executor import groovy.transform.CompileStatic import groovy.util.logging.Slf4j +import nextflow.processor.TaskArray import nextflow.processor.TaskRun /** * An executor specialised for CRG cluster @@ -41,6 +42,11 @@ class CrgExecutor extends SgeExecutor { task.config.penv = 'smp' } + if( task instanceof TaskArray ) { + final arraySize = task.getArraySize() + result << '-t' << "1-${arraySize}".toString() + } + result << '-N' << getJobNameFor(task) result << '-o' << quote(task.workDir.resolve(TaskRun.CMD_LOG)) result << '-j' << 'y'