Skip to content

Commit

Permalink
Remove mini from Flux submit command (#5229) [ci fast]
Browse files Browse the repository at this point in the history

Signed-off-by: Phil Ewels <[email protected]>
Co-authored-by: Christopher Hakkaart <[email protected]>
  • Loading branch information
ewels and christopher-hakkaart authored Sep 10, 2024
1 parent 6e866ae commit a0f6902
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/executor.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Resource requests and other job characteristics can be controlled via the follow

The `flux` executor allows you to run your pipeline script using the [Flux Framework](https://flux-framework.org).

Nextflow manages each process as a separate job that is submitted to the cluster by using the `flux mini submit` command.
Nextflow submits each process to the cluster as a separate job using the `flux submit` command.

To enable the Flux executor, set `process.executor = 'flux'` in the `nextflow.config` file.

Expand Down
4 changes: 2 additions & 2 deletions docs/flux.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Here is an example of submitting a job and getting the log for it.
First submit the job:

```console
$ flux mini submit echo "HELLO MOTO"
$ flux submit echo "HELLO MOTO"
ƒEzWqspb
```

Expand All @@ -114,7 +114,7 @@ HELLO MOTO
Try submitting a longer job:

```console
$ flux mini submit sleep 60
$ flux submit sleep 60
```

And then seeing it in the jobs listing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class FluxExecutor extends AbstractGridExecutor {
@Override
List<String> getSubmitCommandLine(TaskRun task, Path scriptFile ) {

List<String> result = ['flux', 'mini', 'submit']
List<String> result = ['flux', 'submit']
result << '--setattr=cwd=' + quote(task.workDir)
result << '--job-name="' + getJobNameFor(task) + '"'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,27 +72,27 @@ class FluxExecutorTest extends Specification {
then:
// Flux doesn't have script headers
executor.getHeaders(task) == ''
executor.getSubmitCommandLine(task, Paths.get('/some/path/job.sh')) == ['flux', 'mini', 'submit', '--setattr=cwd=/work/path', '--job-name="nf-my_task"', '--output=/work/path/.command.log', '--queue=delta', '/bin/bash', 'job.sh']
executor.getSubmitCommandLine(task, Paths.get('/some/path/job.sh')) == ['flux', 'submit', '--setattr=cwd=/work/path', '--job-name="nf-my_task"', '--output=/work/path/.command.log', '--queue=delta', '/bin/bash', 'job.sh']

when:
task.config = new TaskConfig()
task.config.time = '1m'
then:
executor.getSubmitCommandLine(task, Paths.get('/some/path/job.sh')) == ['flux', 'mini', 'submit', '--setattr=cwd=/work/path', '--job-name="nf-my_task"', '--output=/work/path/.command.log', '--time-limit=01', '/bin/bash', 'job.sh']
executor.getSubmitCommandLine(task, Paths.get('/some/path/job.sh')) == ['flux', 'submit', '--setattr=cwd=/work/path', '--job-name="nf-my_task"', '--output=/work/path/.command.log', '--time-limit=01', '/bin/bash', 'job.sh']

when:
task.config = new TaskConfig()
task.config.time = '1h'
task.config.clusterOptions = '--tasks-per-node=4'
then:
executor.getSubmitCommandLine(task, Paths.get('/some/path/job.sh')) == ['flux', 'mini', 'submit', '--setattr=cwd=/work/path', '--job-name="nf-my_task"', '--output=/work/path/.command.log', '--time-limit=60', '--tasks-per-node=4', '/bin/bash', 'job.sh']
executor.getSubmitCommandLine(task, Paths.get('/some/path/job.sh')) == ['flux', 'submit', '--setattr=cwd=/work/path', '--job-name="nf-my_task"', '--output=/work/path/.command.log', '--time-limit=60', '--tasks-per-node=4', '/bin/bash', 'job.sh']

when:
task.config = new TaskConfig()
task.config.time = '1h'
task.config.clusterOptions = '--tasks-per-node=4 --cpus-per-node=4'
then:
executor.getSubmitCommandLine(task, Paths.get('/some/path/job.sh')) == ['flux', 'mini', 'submit', '--setattr=cwd=/work/path', '--job-name="nf-my_task"', '--output=/work/path/.command.log', '--time-limit=60', '--tasks-per-node=4', '--cpus-per-node=4', '/bin/bash', 'job.sh']
executor.getSubmitCommandLine(task, Paths.get('/some/path/job.sh')) == ['flux', 'submit', '--setattr=cwd=/work/path', '--job-name="nf-my_task"', '--output=/work/path/.command.log', '--time-limit=60', '--tasks-per-node=4', '--cpus-per-node=4', '/bin/bash', 'job.sh']

}

Expand All @@ -111,9 +111,9 @@ class FluxExecutorTest extends Specification {
task.name = 'my task'
task.workDir = Paths.get('/work/path')
task.config = new TaskConfig()

expect:
executor.getSubmitCommandLine(task, Paths.get('/some/path/job.sh')) == ['flux', 'mini', 'submit', '--setattr=cwd=/work/path', '--job-name="nf-my_task"', '/bin/bash', 'job.sh']
executor.getSubmitCommandLine(task, Paths.get('/some/path/job.sh')) == ['flux', 'submit', '--setattr=cwd=/work/path', '--job-name="nf-my_task"', '/bin/bash', 'job.sh']

}

Expand All @@ -135,7 +135,7 @@ class FluxExecutorTest extends Specification {
task.index = 21
task.config = new TaskConfig()
then:
executor.getSubmitCommandLine(task, Paths.get('/some/path/job.sh')) == ['flux', 'mini', 'submit', '--setattr=cwd="/work/some\\ data/path"', '--job-name="nf-my_task"', '--output="/work/some\\ data/path/.command.log"', '/bin/bash', 'job.sh']
executor.getSubmitCommandLine(task, Paths.get('/some/path/job.sh')) == ['flux', 'submit', '--setattr=cwd="/work/some\\ data/path"', '--job-name="nf-my_task"', '--output="/work/some\\ data/path/.command.log"', '/bin/bash', 'job.sh']

}

Expand All @@ -160,8 +160,8 @@ class FluxExecutorTest extends Specification {
result['ƒ6upwy2MY3'] == AbstractGridExecutor.QueueStatus.RUNNING
result['ƒ6upcbFjvf'] == AbstractGridExecutor.QueueStatus.HOLD
result['ƒ6uon2RGVV'] == AbstractGridExecutor.QueueStatus.PENDING
result['ƒ6upwy2MY4'] == AbstractGridExecutor.QueueStatus.DONE
result['ƒ6upcbFjvh'] == AbstractGridExecutor.QueueStatus.DONE
result['ƒ6upwy2MY4'] == AbstractGridExecutor.QueueStatus.DONE
result['ƒ6upcbFjvh'] == AbstractGridExecutor.QueueStatus.DONE
}

def testQueueStatusCommand() {
Expand Down

0 comments on commit a0f6902

Please sign in to comment.