Skip to content

Commit

Permalink
docker mpi
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchengtkc committed Jan 23, 2024
1 parent 6fbf345 commit 1c9eec7
Show file tree
Hide file tree
Showing 27 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ FROM dolfinx/dolfinx:v0.6.0
LABEL org.opencontainers.image.source https://github.com/equinor/warmth
WORKDIR /home/warmth

ENTRYPOINT pip install . pytest==7.4.2 pytest-cov==4.1.0 && pytest --cov-report=term-missing --cov=warmth tests | tee pytest-coverage.txt
ENTRYPOINT pip install . pytest==7.4.2 pytest-cov==4.1.0 pytest-mpi==0.6 && mpirun -n 2 python3 -m pytest --with-mpi --cov-report=term-missing --cov=warmth tests | tee pytest-coverage.txt
Binary file modified tests/benchmark/hypothetical/0.gri
Binary file not shown.
Binary file modified tests/benchmark/hypothetical/30.gri
Binary file not shown.
Binary file modified tests/benchmark/hypothetical/50.gri
Binary file not shown.
Binary file modified tests/benchmark/hypothetical/60.gri
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 3 additions & 1 deletion tests/warmth3d/test_3d.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import pytest
import warmth
from pathlib import Path
from warmth.mesh_model import run_3d
Expand All @@ -7,6 +8,7 @@
import pickle
import time

@pytest.mark.mpi
def test_3d_compare():
comm = MPI.COMM_WORLD
inc = 1000
Expand Down Expand Up @@ -52,7 +54,7 @@ def test_3d_compare():
model.parameters.bflux = False
model.parameters.tetha = 0
model.parameters.alphav = 0

print(f"Using MPI? {comm.size>1}")
model.simulator.run(save=True, purge=True, parallel=True, use_mpi=(comm.size>1))

runtime_1D_sim = time.time() - st
Expand Down

0 comments on commit 1c9eec7

Please sign in to comment.