Skip to content

Time parallel RIDC and SDC #634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
GUSTO_PARALLEL_LOG: CONSOLE
PYOP2_CFLAGS: -O0
# Make sure that tests with >4 processes are not silently skipped
PYTEST_MPI_MAX_NPROCS: 4
PYTEST_MPI_MAX_NPROCS: 6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't sufficient. You also need to add extra - name: Run tests (nprocs = ???) steps below.

EXTRA_PYTEST_ARGS: --durations=100 --timeout=3600 --timeout-method=thread -o faulthandler_timeout=3660 --show-capture=no --verbose gusto-repo/unit-tests gusto-repo/integration-tests gusto-repo/examples
steps:
- name: Fix HOME
Expand Down Expand Up @@ -118,6 +118,13 @@ jobs:
firedrake-run-split-tests 4 3 "$EXTRA_PYTEST_ARGS" "--log-file=gusto4_{#}.log"
timeout-minutes: 10

- name: Run tests (nprocs = 6)
if: success() || steps.install-two.conclusion == 'success'
run: |
. venv-gusto/bin/activate
firedrake-run-split-tests 6 2 "$EXTRA_PYTEST_ARGS" "--log-file=gusto6_{#}.log"
timeout-minutes: 30

- name: Upload pytest log files
uses: actions/upload-artifact@v4
if: success() || steps.install-two.conclusion == 'success'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
# The docker container to use.
container:
image: firedrakeproject/firedrake-docdeps:latest
image: firedrakeproject/firedrake-vanilla-default:latest

steps:
- uses: actions/checkout@v4
Expand Down
8 changes: 4 additions & 4 deletions gusto/core/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def pick_up_mesh(output, mesh_name, comm=COMM_WORLD):
else:
dumpdir = path.join("results", output.dirname)
chkfile = path.join(dumpdir, "chkpt.h5")
with CheckpointFile(chkfile, 'r', comm=comm) as chk:
with CheckpointFile(chkfile, 'r', comm) as chk:
mesh = chk.load_mesh(mesh_name)

if dumpdir:
Expand Down Expand Up @@ -635,7 +635,7 @@ def pick_up_from_checkpoint(self, state_fields, comm=COMM_WORLD):
step = chk.read_attribute("/", "step")

else:
with CheckpointFile(chkfile, 'r', comm) as chk:
with CheckpointFile(chkfile, 'r', self.domain.mesh.comm) as chk:
mesh = self.domain.mesh
# Recover compulsory fields from the checkpoint
for field_name in self.to_pick_up:
Expand Down Expand Up @@ -739,7 +739,7 @@ def dump(self, state_fields, time_data):
if last_ref_update_time is not None:
self.chkpt.write_attribute("/", "last_ref_update_time", last_ref_update_time)
else:
with CheckpointFile(self.chkpt_path, 'w') as chk:
with CheckpointFile(self.chkpt_path, 'w', self.mesh.comm) as chk:
chk.save_mesh(self.domain.mesh)
for field_name in self.to_pick_up:
chk.save_function(state_fields(field_name), name=field_name)
Expand Down Expand Up @@ -943,7 +943,7 @@ def make_nc_dataset(filename, access, comm):

"""
try:
nc_field_file = Dataset(filename, access, parallel=True)
nc_field_file = Dataset(filename, access, parallel=True, comm=comm)
nc_supports_parallel = True
except ValueError:
# parallel netCDF not available, use the serial version instead
Expand Down
3 changes: 2 additions & 1 deletion gusto/time_discretisation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
from gusto.time_discretisation.imex_runge_kutta import * # noqa
from gusto.time_discretisation.multi_level_schemes import * # noqa
from gusto.time_discretisation.wrappers import * # noqa
from gusto.time_discretisation.sdc import * # noqa
from gusto.time_discretisation.deferred_correction import * # noqa
from gusto.time_discretisation.parallel_dc import * # noqa
Loading
Loading