Skip to content

Add OpenACC SSPRK33/43 explicit time integrators and NSCylinderssprk33/43 test cases#76

Draft
Copilot wants to merge 2 commits into
developfrom
copilot/keep-openacc-implementation
Draft

Add OpenACC SSPRK33/43 explicit time integrators and NSCylinderssprk33/43 test cases#76
Copilot wants to merge 2 commits into
developfrom
copilot/keep-openacc-implementation

Conversation

Copilot AI commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Cherry-pick of the SSPRK33/SSPRK43 OpenACC work from PR #58, excluding the positivity limiter, solver template, and mesh/discretization changes.

Time integrator changes

  • ExplicitMethods.f90: Replaces !$omp parallel do loops in TakeSSPRK33Step and TakeSSPRK43Step with !$acc parallel loop gang / !$acc loop vector collapse(3) for GPU offloading. Expands array assignments into explicit index loops to be ACC-compatible.
  • TimeIntegrator.f90: Replaces a hardcoded TakeRK3Step call with a select case on RKStep_key, dispatching to Euler, RK3, RK5, SSPRK33, SSPRK43, and EulerRK3.

Test cases

  • Solver/test/NavierStokes/Cylinderssprk33/ — control file + ProblemFile.f90
  • Solver/test/NavierStokes/Cylinderssprk43/ — control file + ProblemFile.f90

CI

NSCylinderssprk33 and NSCylinderssprk43 build+run steps added to:

  • CI_parallel_NS.yml (cases 46 & 47)
  • CI_parallel_GPU.yml (SLURM, 2-GPU parallel)
  • CI_serial_GPU.yml (SLURM, 1-GPU serial)

Copilot AI requested a review from loganoz June 24, 2026 06:24
@loganoz loganoz changed the base branch from main to develop June 24, 2026 06:30
@loganoz loganoz requested review from Rodrigoansf and Copilot June 24, 2026 06:58
@loganoz loganoz marked this pull request as ready for review June 24, 2026 06:58
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds OpenACC-enabled SSPRK33/SSPRK43 explicit time integrators and introduces corresponding Navier–Stokes cylinder regression test cases, wiring them into CPU-parallel and GPU (serial/parallel) CI workflows.

Changes:

  • Updated explicit time stepping to dispatch via RKStep_key (Euler/RK3/RK5/SSPRK33/SSPRK43/EulerRK3) instead of a hardcoded RK3 call.
  • Added OpenACC GPU-offload loops for SSPRK33/SSPRK43 (plus an OpenACC rewrite of the stage limiter path).
  • Added Cylinderssprk33 / Cylinderssprk43 test cases and included them in CI runs for NS CPU-parallel and GPU pipelines.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
Solver/src/libs/timeintegrator/TimeIntegrator.f90 Dispatch explicit stepping by RKStep_key (now supports SSPRK33/43).
Solver/src/libs/timeintegrator/ExplicitMethods.f90 OpenACC implementations for SSPRK33/43 loops and updated limiter implementation.
Solver/test/NavierStokes/Cylinderssprk33/SETUP/ProblemFile.f90 New SSPRK33 cylinder regression assertions (residual/probe/forces).
Solver/test/NavierStokes/Cylinderssprk33/Cylinderssprk33.control New cylinder control file selecting SSPRK33 explicit method.
Solver/test/NavierStokes/Cylinderssprk43/SETUP/ProblemFile.f90 New SSPRK43 cylinder regression assertions (residual/probe/forces).
Solver/test/NavierStokes/Cylinderssprk43/Cylinderssprk43.control New cylinder control file selecting SSPRK43 explicit method.
.github/workflows/CI_parallel_NS.yml Adds CPU-parallel build+run steps for the new SSPRK33/43 cylinder cases.
.github/workflows/CI_parallel_GPU.yml Adds SLURM 2-GPU MPI build+run steps for the new SSPRK33/43 cylinder cases.
.github/workflows/CI_serial_GPU.yml Adds SLURM 1-GPU serial build+run steps for the new SSPRK33/43 cylinder cases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +670 to +683
select case (self % RKStep_key)
case (EULER_KEY)
CALL TakeExplicitEulerStep(sem % mesh, sem % particles, t, dt, ComputeTimeDerivative)
case (RK3_KEY)
CALL TakeRK3Step(sem % mesh, sem % particles, t, dt, ComputeTimeDerivative)
case (RK5_KEY)
CALL TakeRK5Step(sem % mesh, sem % particles, t, dt, ComputeTimeDerivative)
case (SSPRK33_KEY)
CALL TakeSSPRK33Step(sem % mesh, sem % particles, t, dt, ComputeTimeDerivative)
case (SSPRK43_KEY)
CALL TakeSSPRK43Step(sem % mesh, sem % particles, t, dt, ComputeTimeDerivative)
case (EULER_RK3_KEY)
CALL TakeEulerRK3Step(sem % mesh, sem % particles, t, dt, ComputeTimeDerivative, iter=k)
end select
Comment on lines +1109 to +1113
wJ = NodalStorage(Nx) % w(i) * &
NodalStorage(Ny) % w(j) * &
NodalStorage(Nz) % w(k) * &
e % geom % jacobian(i,j,k)
q1sum = q1sum + Q(1,i,j,k) * wJ
! Local variables
! ---------------
!
CHARACTER(LEN=29) :: testName = "Cylinder ChandrasekarRoe"
Comment on lines +591 to +593
WRITE(6,*) testName, " ... Passed"
WRITE(6,*) "This test case has no expected solution yet, only checks the residual after 100 iterations."
ELSE
! Local variables
! ---------------
!
CHARACTER(LEN=29) :: testName = "Cylinder ChandrasekarRoe"
Comment on lines +591 to +593
WRITE(6,*) testName, " ... Passed"
WRITE(6,*) "This test case has no expected solution yet, only checks the residual after 100 iterations."
ELSE
@Rodrigoansf Rodrigoansf marked this pull request as draft June 24, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants