Skip to content

Commit 90d869d

Browse files
committed
correctly calculate the number of resources when using dask.distributed
1 parent 205c37b commit 90d869d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

adaptive/runner.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,7 @@ def _get_ncores(ex):
495495
elif isinstance(ex, SequentialExecutor):
496496
return 1
497497
elif with_distributed and isinstance(ex, distributed.cfexecutor.ClientExecutor):
498-
# XXX: check if not sum(n for n in ex._client.ncores().values())
499-
return len(ex._client.ncores())
498+
return sum(n for n in ex._client.ncores().values())
500499
else:
501500
raise TypeError('Cannot get number of cores for {}'
502501
.format(ex.__class__))

0 commit comments

Comments
 (0)