Skip to content

Conversation

@atb1995
Copy link
Collaborator

@atb1995 atb1995 commented May 12, 2025

Time parallel SDC and RIDC implementations. Splits SDC code into deferred_correction and parallel_dc. All should inherit from one overall DC class (Parallel_RIDC from RIDC and Parallel_SDC from SDC).

Parallel SDC uses the diagonal preconditioners to compute solutions separately on each node, meaning we have M + 1 communicators.

Parallel RIDC pipelines the corrections, by having the number of nodes (M+1) being much greater than the number of corrections. It uses equispaced nodes on coarse intervals. Each correction (and the initial low order solution) are computed in parallel, meaning we have K + 1 communicators.

Serial RIDC has the reduced stencil and full stencil implementations, only the reduced stencil is used for Parallel RIDC.

The Firedrake Ensemble communicator is used for time parallelisation.

@atb1995 atb1995 self-assigned this May 12, 2025
@atb1995 atb1995 added the enhancement Involves adding a new capability label May 12, 2025
@atb1995 atb1995 requested review from connorjward and jshipton May 14, 2025 14:50
@atb1995 atb1995 marked this pull request as ready for review May 14, 2025 14:56
@atb1995 atb1995 added the parallel Relates to parallel capability label May 14, 2025
tommbendall
tommbendall previously approved these changes Aug 20, 2025
Copy link
Contributor

@tommbendall tommbendall left a comment

Choose a reason for hiding this comment

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

I haven't checked line-by-line if the implementation matches the maths, but have worked through the tests and comments and am happy that this looks thorough!

I think we're planning on waiting to merge but I'm happy to approve it

Co-authored-by: Thomas Bendall <thomas.bendall@metoffice.gov.uk>
pass to the underlying nonlinear solver. Defaults to None.
limiter (:class:`Limiter` object, optional): a limiter to apply to
the evolving field to enforce monotonicity. Defaults to None.
options (:class:`AdvectionOptions`, optional): an object containing
Copy link
Contributor

Choose a reason for hiding this comment

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

containing what?

limiter (:class:`Limiter` object, optional): a limiter to apply to
the evolving field to enforce monotonicity. Defaults to None.
options (:class:`AdvectionOptions`, optional): an object containing
reduced (bool, optional): whether to use reduced or full stencils for RIDC.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
reduced (bool, optional): whether to use reduced or full stencils for RIDC.
reduced (bool, optional): whether to use reduced stencils for RIDC. Defaults to True.

pass to the underlying nonlinear solver. Defaults to None.
limiter (:class:`Limiter` object, optional): a limiter to apply to
the evolving field to enforce monotonicity. Defaults to None.
options (:class:`AdvectionOptions`, optional): an object containing
Copy link
Contributor

Choose a reason for hiding this comment

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

containing what?

self.comm.send(self.source_Uk[m+1], dest=self.kval+1, tag=self.TAG_EXCHANGE_SOURCE + self.step)
else:
for m in range(1, self.kval + 1):
# Recieve and evaluate the stencil of guesses we need to correct
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Recieve and evaluate the stencil of guesses we need to correct
# Receive and evaluate the stencil of guesses we need to correct

self.comm.send(self.source_Ukp1[m+1], dest=self.kval+1, tag=self.TAG_EXCHANGE_SOURCE + self.step)

for m in range(self.kval, self.M):
# Recieve the guess we need to correct and evaluate the rhs
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Recieve the guess we need to correct and evaluate the rhs
# Receive the guess we need to correct and evaluate the rhs

BE, LU, TRAP, EXACT, PIC, OPT, WEIRD, MIN-SR-NS, MIN-SR-S
qdelta_exp (str): Explicit Qdelta matrix to be used. Options are
FE, EXACT, PIC
formulation (str, optional): Whether to use node-to-node or zero-to-node
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't see this option in the interface!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Involves adding a new capability parallel Relates to parallel capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants