Skip to content

Commit a997498

Browse files
author
Kevin Paul
authored
Merge pull request #33 from kmpaul/sync_fix
Attempting to sync with dask
2 parents eb74a11 + 9971f47 commit a997498

File tree

11 files changed

+121
-12
lines changed

11 files changed

+121
-12
lines changed

.circleci/config.yml

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ workflows:
88
- test-2.7-openmpi
99
- test-3.6-mpich
1010
- test-3.6-openmpi
11+
- test-3.7-mpich
12+
- test-3.7-openmpi
1113

1214
jobs:
1315

@@ -130,4 +132,66 @@ jobs:
130132
paths:
131133
- "/opt/conda/envs/${ENV_NAME}/"
132134
- "/opt/conda/pkgs"
133-
135+
136+
test-3.7-mpich:
137+
docker:
138+
- image: continuumio/miniconda:latest
139+
140+
environment:
141+
PYTHON: "3.7"
142+
ENV_NAME: "dask-mpi-dev"
143+
MPI: "mpich"
144+
145+
steps:
146+
- checkout
147+
- restore_cache:
148+
key: deps-{{ .Branch }}-3.7-mpich-{{ checksum ".circleci/env-3.7-mpich.yml" }}
149+
- run:
150+
name: Install and activate conda environment
151+
command: .circleci/install.sh
152+
- run:
153+
name: Running tests
154+
command: |
155+
source activate ${ENV_NAME}
156+
pytest --junitxml=test-reports/junit.xml --cov=./ dask_mpi/tests/ --verbose
157+
- save_cache:
158+
key: deps-{{ .Branch }}-3.7-mpich-{{ checksum ".circleci/env-3.7-mpich.yml" }}
159+
paths:
160+
- "/opt/conda/envs/${ENV_NAME}/"
161+
- "/opt/conda/pkgs"
162+
- run:
163+
name: Code Coverage
164+
command: |
165+
source activate ${ENV_NAME}
166+
167+
echo "[Uploading Coverage]"
168+
codecov
169+
170+
test-3.7-openmpi:
171+
docker:
172+
- image: continuumio/miniconda:latest
173+
174+
environment:
175+
PYTHON: "3.7"
176+
ENV_NAME: "dask-mpi-dev"
177+
MPI: "openmpi"
178+
OMPI_MCA_rmaps_base_oversubscribe: "1"
179+
ALLOW_RUN_AS_ROOT: "1"
180+
181+
steps:
182+
- checkout
183+
- restore_cache:
184+
key: deps-{{ .Branch }}-3.7-openmpi-{{ checksum ".circleci/env-3.7-openmpi.yml" }}
185+
- run:
186+
name: Install and activate conda environment
187+
command: .circleci/install.sh
188+
- run:
189+
name: Running tests
190+
command: |
191+
source activate ${ENV_NAME}
192+
pytest --junitxml=test-reports/junit.xml --cov=./ dask_mpi/tests/ --verbose
193+
- save_cache:
194+
key: deps-{{ .Branch }}-3.7-openmpi-{{ checksum ".circleci/env-3.7-openmpi.yml" }}
195+
paths:
196+
- "/opt/conda/envs/${ENV_NAME}/"
197+
- "/opt/conda/pkgs"

.circleci/env-2.7-mpich.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ channels:
55
dependencies:
66
- python=2.7
77
- dask
8-
- distributed=1.25.2
8+
- distributed
99
- mpich
1010
- mpi4py
1111
- pytest

.circleci/env-2.7-openmpi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ channels:
55
dependencies:
66
- python=2.7
77
- dask
8-
- distributed=1.25.2
8+
- distributed
99
- openmpi
1010
- mpi4py
1111
- pytest

.circleci/env-3.6-mpich.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ channels:
55
dependencies:
66
- python=3.6
77
- dask
8-
- distributed=1.25.2
8+
- distributed
99
- mpich
1010
- mpi4py
1111
- pytest

.circleci/env-3.6-openmpi.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ channels:
55
dependencies:
66
- python=3.6
77
- dask
8-
- distributed=1.25.2
8+
- distributed
99
- openmpi
1010
- mpi4py
1111
- pytest
@@ -14,4 +14,3 @@ dependencies:
1414
- coverage
1515
- requests
1616
- codecov
17-

.circleci/env-3.7-mpich.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: dask-mpi-dev
2+
channels:
3+
- conda-forge
4+
- defaults
5+
dependencies:
6+
- python=3.7
7+
- dask
8+
- distributed
9+
- mpich
10+
- mpi4py
11+
- pytest
12+
- pytest-icdiff
13+
- pytest-cov
14+
- coverage
15+
- requests
16+
- codecov
17+

.circleci/env-3.7-openmpi.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: dask-mpi-dev
2+
channels:
3+
- conda-forge
4+
- defaults
5+
dependencies:
6+
- python=3.7
7+
- dask
8+
- distributed
9+
- openmpi
10+
- mpi4py
11+
- pytest
12+
- pytest-icdiff
13+
- pytest-cov
14+
- coverage
15+
- requests
16+
- codecov

dask_mpi/cli.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
from tornado.ioloop import IOLoop
66
from distributed.cli.utils import check_python_3
77

8-
from dask_mpi.common import get_host_from_interface, create_scheduler, run_scheduler, create_and_run_worker
8+
from dask_mpi.common import (
9+
get_host_from_interface,
10+
create_scheduler,
11+
run_scheduler,
12+
create_and_run_worker
13+
)
914

1015
comm = MPI.COMM_WORLD
1116
rank = comm.Get_rank()
@@ -47,9 +52,10 @@
4752
def main(scheduler_file, interface, nthreads, local_directory, memory_limit,
4853
scheduler, bokeh, bokeh_port, bokeh_prefix, bokeh_worker_port,
4954
nanny, scheduler_port, nanny_port, worker_port):
55+
5056
host = get_host_from_interface(interface)
5157

52-
loop = IOLoop()
58+
loop = IOLoop.current()
5359

5460
if rank == 0 and scheduler:
5561
scheduler_obj = create_scheduler(loop, host=host, scheduler_file=scheduler_file,

dask_mpi/core.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@
55

66
import dask
77
from distributed import Client
8+
89
from tornado import gen
910
from tornado.ioloop import IOLoop
1011

11-
from .common import get_host_from_interface, create_scheduler, run_scheduler, create_and_run_worker
12+
from .common import (
13+
get_host_from_interface,
14+
create_scheduler,
15+
run_scheduler,
16+
create_and_run_worker
17+
)
1218

1319

1420
def initialize(interface=None, nthreads=1, local_directory='', memory_limit='auto', nanny=False,
@@ -42,12 +48,13 @@ def initialize(interface=None, nthreads=1, local_directory='', memory_limit='aut
4248
bokeh_worker_port : int
4349
Worker's Bokeh port for visual diagnostics
4450
"""
51+
4552
host = get_host_from_interface(interface)
4653

4754
from mpi4py import MPI
4855
comm = MPI.COMM_WORLD
4956
rank = comm.Get_rank()
50-
loop = IOLoop()
57+
loop = IOLoop.current()
5158

5259
if rank == 0:
5360
scheduler = create_scheduler(loop, host=host, bokeh=bokeh, bokeh_port=bokeh_port, bokeh_prefix=bokeh_prefix)

environment-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: dask-mpi-dev
22
dependencies:
33
- dask
4-
- distributed=1.25.2
4+
- distributed
55
- mpich
66
- mpi4py
77
- versioneer

0 commit comments

Comments
 (0)