Skip to content

Commit

Permalink
Add acc directives to enable executing atm_bdy_set_scalars_work on gp…
Browse files Browse the repository at this point in the history
…u's.
  • Loading branch information
jim-p-w committed Jan 16, 2025
1 parent d035210 commit a7d955d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core_atmosphere/dynamics/mpas_atm_time_integration.F
Original file line number Diff line number Diff line change
Expand Up @@ -6913,13 +6913,18 @@ subroutine atm_bdy_set_scalars_work( scalars_driving, scalars_new, &

!---

!$acc enter data copyin(scalars_driving)
!$acc enter data create(scalars_new)
!$acc parallel default(present)
!$acc loop gang
do iCell = cellSolveStart, cellSolveEnd ! threaded over cells

if ( bdyMaskCell(iCell) > nRelaxZone) then ! specified zone

! update the specified-zone values
!
!DIR$ IVDEP
!$acc loop vector collapse(2)
do k=1,nVertLevels
do iScalar = 1, num_scalars
scalars_new(iScalar,k,iCell) = scalars_driving(iScalar,k,iCell)
Expand All @@ -6929,6 +6934,9 @@ subroutine atm_bdy_set_scalars_work( scalars_driving, scalars_new, &
end if

end do ! updates now in temp storage
!$acc end parallel
!$acc exit data copyout(scalars_new)
!$acc exit data delete(scalars_new, scalars_driving)

end subroutine atm_bdy_set_scalars_work

Expand Down

0 comments on commit a7d955d

Please sign in to comment.