Skip to content

Optimize ACC port of atm_advance_scalars_mono_work:5555#1494

Draft
abishekg7 wants to merge 5 commits into
MPAS-Dev:developfrom
abishekg7:atmosphere/opt_adv_scalars_mono_5555
Draft

Optimize ACC port of atm_advance_scalars_mono_work:5555#1494
abishekg7 wants to merge 5 commits into
MPAS-Dev:developfrom
abishekg7:atmosphere/opt_adv_scalars_mono_5555

Conversation

@abishekg7

@abishekg7 abishekg7 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

This PR introduces optimizations for the OpenACC port of atm_advance_scalars_mono_work:5555. The table below lists the timings for a real, global 30km experiment on A100 GPU with the nvhpc.

For nvhpc gpu runs, -gpu=math_uniform is introduced as a build flag to ensure optimizations are bit-identical, and the we report the numbers using NV_ACC_TIME=1. The GPU runs are on 1 Derecho GPU node, using 1 A100 via 1 MPI task.

The numbers reported for the CPU runs with gnu and intel compilers use the newly-added timers local to this region, and are averaged across three runs. The CPU runs use a single derecho CPU node each, fully subscribed to 128 MPI tasks.

Version GPU kernel time (ms)   CPU timer - gnu   CPU timer - intel25
base 6.095   0.007606   0.00773
1 - Split up into parallel regions 5.035   -   -
2 - Use vector collapse(2) 5.485   -   -
3 - Swap loop vector and seq in first parallel region 4.128   0.008813   0.008406
4 - Remove vector collapse(2) in 2nd & 3rd regions 3.684   -   -

The performance drop from base version to Opt 3 in the CPU case with GNU is 15.87% per invocation of this loop. But looking at the timings provided by atm_advance_scalars_mono, we actually see a 0.15% faster timing from base to Opt 3.

TODO: Add @Pranay-Reddy-Kommera as primary commit author

This work was completed in part at the NCAR/NLR/NOAA Open Hackathon, part of the Open Hackathons program. The authors would like to acknowledge OpenACC-Standard.org for their support.

@abishekg7 abishekg7 changed the title Atmosphere/opt adv scalars mono 5555 Optimize ACC port of atm_advance_scalars_mono_work:5555 Jul 23, 2026
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