Skip to content

Commit

Permalink
nworkers
Browse files Browse the repository at this point in the history
  • Loading branch information
rosswhitfield committed Oct 26, 2022
1 parent b647789 commit 2554615
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions ipsframework/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -2124,13 +2124,14 @@ def submit_dask_tasks(self, block=True, dask_nodes=1, dask_ppn=None, use_shifter
dask_nodes = 1

nthreads = dask_ppn if dask_ppn else services.get_config_param("PROCS_PER_NODE")
nworkers = "--nworkers" if self.distributed.__version__ >= "2022.10" else "--nprocs"
if use_shifter:
self.dask_workers_tid = services.launch_task(dask_nodes, os.getcwd(),
self.shifter,
"dask-worker",
"--scheduler-file",
self.dask_file_name,
"--nprocs", 1,
nworkers, 1,
"--nthreads", nthreads,
"--no-dashboard",
task_ppn=1)
Expand All @@ -2139,7 +2140,7 @@ def submit_dask_tasks(self, block=True, dask_nodes=1, dask_ppn=None, use_shifter
self.dask_worker,
"--scheduler-file",
self.dask_file_name,
"--nprocs", 1,
nworkers, 1,
"--nthreads", nthreads,
"--no-dashboard",
task_ppn=1)
Expand Down
2 changes: 1 addition & 1 deletion tests/new/test_dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def test_dask_fake_shifter(tmpdir, monkeypatch):
assert lines[0].startswith('Running dask-scheduler --no-dashboard --scheduler-file')
assert lines[0].endswith('--port 0 in shifter\n')
assert lines[1].startswith('Running dask-worker --scheduler-file')
assert lines[1].endswith('--nprocs 1 --nthreads 0 --no-dashboard in shifter\n')
assert lines[1].endswith('1 --nthreads 0 --no-dashboard in shifter\n')


def test_dask_timeout(tmpdir):
Expand Down

0 comments on commit 2554615

Please sign in to comment.