Skip to content

Commit 2554615

Browse files
committed
nworkers
1 parent b647789 commit 2554615

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ipsframework/services.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,13 +2124,14 @@ def submit_dask_tasks(self, block=True, dask_nodes=1, dask_ppn=None, use_shifter
21242124
dask_nodes = 1
21252125

21262126
nthreads = dask_ppn if dask_ppn else services.get_config_param("PROCS_PER_NODE")
2127+
nworkers = "--nworkers" if self.distributed.__version__ >= "2022.10" else "--nprocs"
21272128
if use_shifter:
21282129
self.dask_workers_tid = services.launch_task(dask_nodes, os.getcwd(),
21292130
self.shifter,
21302131
"dask-worker",
21312132
"--scheduler-file",
21322133
self.dask_file_name,
2133-
"--nprocs", 1,
2134+
nworkers, 1,
21342135
"--nthreads", nthreads,
21352136
"--no-dashboard",
21362137
task_ppn=1)
@@ -2139,7 +2140,7 @@ def submit_dask_tasks(self, block=True, dask_nodes=1, dask_ppn=None, use_shifter
21392140
self.dask_worker,
21402141
"--scheduler-file",
21412142
self.dask_file_name,
2142-
"--nprocs", 1,
2143+
nworkers, 1,
21432144
"--nthreads", nthreads,
21442145
"--no-dashboard",
21452146
task_ppn=1)

tests/new/test_dask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def test_dask_fake_shifter(tmpdir, monkeypatch):
231231
assert lines[0].startswith('Running dask-scheduler --no-dashboard --scheduler-file')
232232
assert lines[0].endswith('--port 0 in shifter\n')
233233
assert lines[1].startswith('Running dask-worker --scheduler-file')
234-
assert lines[1].endswith('--nprocs 1 --nthreads 0 --no-dashboard in shifter\n')
234+
assert lines[1].endswith('1 --nthreads 0 --no-dashboard in shifter\n')
235235

236236

237237
def test_dask_timeout(tmpdir):

0 commit comments

Comments
 (0)