Skip to content

Commit

Permalink
Add array jobs to CRG executor
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
  • Loading branch information
bentsherman committed Sep 15, 2023
1 parent 68ea23f commit 28dbe47
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand Down

0 comments on commit 28dbe47

Please sign in to comment.