Skip to content

Commit

Permalink
fixup! Add initial OpenACC port of atm_advance_acoustic_step_work
Browse files Browse the repository at this point in the history
  • Loading branch information
gdicker1 committed Jan 17, 2025
1 parent d7109c1 commit 2030ecc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core_atmosphere/dynamics/mpas_atm_time_integration.F
Original file line number Diff line number Diff line change
Expand Up @@ -2484,7 +2484,7 @@ subroutine atm_advance_acoustic_step_work(nCells, nEdges, nCellsSolve, cellStart
!MGD this loop will not be very load balanced with if-test below

!$acc parallel default(present)
!$acc loop gang
!$acc loop gang worker
do iEdge=edgeStart,edgeEnd ! MGD do we really just need edges touching owned cells?

cell1 = cellsOnEdge(1,iEdge)
Expand Down Expand Up @@ -2513,7 +2513,7 @@ subroutine atm_advance_acoustic_step_work(nCells, nEdges, nCellsSolve, cellStart
else ! this is all that us needed for ru_p update for first acoustic step in RK substep

!$acc parallel default(present)
!$acc loop gang
!$acc loop gang worker
do iEdge=edgeStart,edgeEnd ! MGD do we really just need edges touching owned cells?

cell1 = cellsOnEdge(1,iEdge)
Expand All @@ -2538,13 +2538,13 @@ subroutine atm_advance_acoustic_step_work(nCells, nEdges, nCellsSolve, cellStart

if (small_step == 1) then ! initialize here on first small timestep.
!$acc parallel default(present)
!$acc loop collapse(2)
!$acc loop gang worker vector collapse(2)
do iCell=cellStart,cellEnd
do k=1,nVertLevels
rtheta_pp_old(k,iCell) = 0.0
end do
end do
!$acc loop gang
!$acc loop gang worker
do iCell=cellSolveStart,cellSolveEnd
!$acc loop vector
do k=1,nVertLevels
Expand All @@ -2571,7 +2571,7 @@ subroutine atm_advance_acoustic_step_work(nCells, nEdges, nCellsSolve, cellStart
!$OMP BARRIER

!$acc parallel default(present)
!$acc loop gang private(ts,rs)
!$acc loop gang worker private(ts,rs)
do iCell=cellSolveStart,cellSolveEnd ! loop over all owned cells to solve

if(specZoneMaskCell(iCell) == 0.0) then ! not specified zone, compute...
Expand Down

0 comments on commit 2030ecc

Please sign in to comment.