Skip to content

Commit

Permalink
Run MPI tests on circleci, fix tests (#5)
Browse files Browse the repository at this point in the history
When fv3util was split into a separate repo, the MPI tests were disabled. This PR re-enables them and fixes the test code to reflect internal API changes.
  • Loading branch information
Jeremy McGibbon authored Jul 28, 2020
1 parent b5c61d8 commit bb3eff6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:

steps:
- checkout
- run:
name: install MPI
command: |
sudo apt-get update
sudo apt-get install libopenmpi3
# Download and cache dependencies
- restore_cache:
Expand All @@ -31,6 +36,7 @@ jobs:
python3 -m venv venv
. venv/bin/activate
pip3 install -r requirements.txt
pip3 install mpi4py==3.0.3
- save_cache:
paths:
- ./venv
Expand All @@ -39,8 +45,8 @@ jobs:
name: run tests
command: |
. venv/bin/activate
pip3 install -e .
pytest tests
pip3 install .
make test test_mpi
workflows:
version: 2
Expand Down
4 changes: 2 additions & 2 deletions tests/mpi/test_mpi_halo_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def test_zeros_halo_update(
communicator.halo_update(quantity, n_points_update)
boundaries = boundary_dict[communicator.rank % ranks_per_tile]
for boundary in boundaries:
boundary_slice = fv3util.boundary._get_boundary_slice(
boundary_slice = fv3util._boundary_utils.get_boundary_slice(
quantity.dims,
quantity.origin,
quantity.extent,
Expand Down Expand Up @@ -366,7 +366,7 @@ def test_zeros_vector_halo_update(
communicator.vector_halo_update(y_quantity, x_quantity, n_points_update)
boundaries = boundary_dict[communicator.rank % ranks_per_tile]
for boundary in boundaries:
boundary_slice = fv3util.boundary._get_boundary_slice(
boundary_slice = fv3util._boundary_utils.get_boundary_slice(
x_quantity.dims,
x_quantity.origin,
x_quantity.extent,
Expand Down

0 comments on commit bb3eff6

Please sign in to comment.