Adjust gpu default block sizes in Isopycnal to account for halos and loop bounds - #87
Open
uwagura wants to merge 1 commit into
Open
Adjust gpu default block sizes in Isopycnal to account for halos and loop bounds#87uwagura wants to merge 1 commit into
uwagura wants to merge 1 commit into
Conversation
…ctually covers range iterated over in calc_isoneutral_slopes
GPU Port CoverageOverall: 2043 / 5662 portable executed lines ported (36.1%) Files touched by this PR: 0 / 78 portable executed lines ported (0.0%) Full per-file / per-routine breakdown: see the "gpu-port-report" job summary and artifact. |
edoyango
reviewed
Aug 5, 2026
| integer, dimension(2) :: EOSdom ! The i-computational domain for the equation of state | ||
| integer :: i, j, k, is, ie, js, je, nz | ||
| integer :: niblock, njblock, nkblock | ||
| integer :: isoneutral_halo |
Collaborator
There was a problem hiding this comment.
Suggested change
| integer :: isoneutral_halo | |
| integer, parameter :: isoneutral_halo = 1 |
Not sure what alistair + bob think if parameters, but imo neater and maybe helps the compiler.
edoyango
reviewed
Aug 5, 2026
| ! Local variables | ||
| real, dimension(SZI_(G),SZJ_(G),SZK_(GV)+1) :: e ! The interface heights relative to mean sea level [Z ~> m] | ||
| integer :: niblock, njblock, nkblock | ||
| integer :: isoneutral_halo |
Collaborator
There was a problem hiding this comment.
Suggested change
| integer :: isoneutral_halo | |
| integer, parameter :: isoneutral_halo = 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
My original implementation of blocking in
MOM_isopycnal_slopesdid not account for halos, or the fact that the loop bounds in this module run fromjs-1tojein the meridional direction andis-1toiein the zonal direction. Since the default block size did not cover the entire range of these loops, we were performing multiple iterations in the zonal and meridional directions on the gpu and launching extra kernels. This PR fixes the default block sizes for gpu runs to account for the halos and loop bounds, which reduces the number of kernel launches and gives a a slight speedup.