Skip to content

Commit

Permalink
Fix nthreads in situations where cpu is less than 1 (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
gvelchuru authored and jacobtomlinson committed Jan 21, 2020
1 parent f917f05 commit 9a7e3d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dask_cloudprovider/providers/aws/ecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def __init__(self, scheduler: str, cpu: int, mem: int, gpu: int, **kwargs):
"--name",
str(self.name),
"--nthreads",
"{}".format(int(self._cpu / 1024)),
"{}".format(max(int(self._cpu / 1024), 1)),
"--memory-limit",
"{}GB".format(int(self._mem / 1024)),
"--death-timeout",
Expand Down Expand Up @@ -1033,7 +1033,7 @@ async def _create_worker_task_definition_arn(self):
"command": [
"dask-cuda-worker" if self._worker_gpu else "dask-worker",
"--nthreads",
"{}".format(int(self._worker_cpu / 1024)),
"{}".format(max(int(self._worker_cpu / 1024), 1)),
"--memory-limit",
"{}MB".format(int(self._worker_mem)),
"--death-timeout",
Expand Down

0 comments on commit 9a7e3d0

Please sign in to comment.