Skip to content

Add GPU port tracking TUI, @noport sentinel, and double_gyre/benchmark cases. - #83

Open
edoyango wants to merge 8 commits into
MOM6-GPU:dev/gpufrom
edoyango:gpu-port-tracking
Open

Add GPU port tracking TUI, @noport sentinel, and double_gyre/benchmark cases.#83
edoyango wants to merge 8 commits into
MOM6-GPU:dev/gpufrom
edoyango:gpu-port-tracking

Conversation

@edoyango

Copy link
Copy Markdown
Collaborator

This is a follow up to the gpu porting report PR. It's a few features that may be useful:

  • adds a TUI for CLI-only users
  • @noport sentinel - enabling singular statements form being excluded
  • includes sub-pages for double_gyre, benchmark, benchmark_ALE, total coverage (see here as an example)

I can remove any of these if they're not that useful.

edoyango added 8 commits July 28, 2026 11:24
…@gpu-ported

Sentinel regexes now match a trailing "! comment" (but not arbitrary
trailing text, reserved for future multi-word markers) instead of silently
falling through to being treated as an ordinary comment when anything
followed the keyword. noport/toport regions can no longer nest — opening a
new one while another is still open (pending loop-attachment or awaiting an
explicit !@EnD) is now a structural error, replacing the old per-type
stacks with a single open-marker slot.

Also removes the unused @gpu-ported-start/-end manual tag: no source file
uses it, and it doesn't belong as an independent nesting mechanism now that
noport/toport are intentionally non-nesting.
…EnD

The shorthand attached a marker to the immediately-following do-loop and
auto-closed it at that loop's "end do", mirroring "!$omp loop". But a
marker followed by a loop is ambiguous: it can't be told apart from a
marker meant to span several statements or loops that happens to start
with one. This caused a real false positive in MOM_barotropic.F90, where a
"!@start noport" before a loop nest silently closed at that nest's "end
do", leaving its actual "!@EnD noport" ~400 lines later orphaned.

Every existing marker in the tree already uses an explicit, matching
"!@EnD" (7/7 pairs), so the shorthand was unused. Dropping it removes the
ambiguity outright and simplifies the state machine.
shallow_span() carved nested-loop bodies out of a marked region, keeping
only the "directly named" outer loop's lines and leaving inner loops to
their own independent classification. That made sense for the old
loop-attach shorthand (a marker named exactly one following loop, so
what happened inside it was ambiguous), but noport/toport are now always
explicit, user-delimited "!@start"..."!@EnD" regions covering everything
in between, on purpose.

MOM_barotropic.F90's compact "do j=...; do i=..." style opens two loops
per line, so nearly every loop in the file counted as "nested" under the
old exclusion. A large noport region spanning many such loops (e.g. lines
6182-6578) ended up with most of its loop bodies silently falling back to
their structural "portable" classification (shown red in the HTML report)
instead of being excluded, even though they were inside the marked span.

Removed the now-dead all_loop_records/parent_start bookkeeping along with
shallow_span; a marked span is just the full [start, end] line range.
A full clone of MOM6-gpu/MOM6-examples pulled down every case's input
and restart NetCDF files just to run benchmark_ALE. Use a blobless
partial clone plus git archive to fetch and check out only that one
directory, with comments explaining each git flag since these aren't
everyday commands.
@github-actions

Copy link
Copy Markdown

GPU Port Coverage

Overall: 2704 / 7755 portable executed lines ported (34.9%)
Since base branch: +661 ported lines (-1.2 pp)

No executed, GPU-portable lines in the files touched by this PR (nothing in the diff was exercised by the coverage run, or none of it is GPU-portable).

Full per-file / per-routine breakdown: see the "gpu-port-report" job summary and artifact.

Full line-by-line coverage report

@edoyango

Copy link
Copy Markdown
Collaborator Author

the ci seems to be working well! there's a page for both dev/gpu and this pr atm. https://mom6-gpu.github.io/MOM6/

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.

1 participant