Skip to content

Initial OpenACC port of mpas_atm_update_bdy_tend #1301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

abishekg7
Copy link
Collaborator

Initial OpenACC port of mpas_atm_update_bdy_tend.

This port is required to keep state and tend variables from LBCs eventually resident on GPUs.

@mgduda mgduda requested review from mgduda and gdicker1 May 6, 2025 23:43
@mgduda mgduda added Atmosphere OpenACC Work related to OpenACC acceleration of code labels May 6, 2025
Copy link
Collaborator

@gdicker1 gdicker1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes make sense and GPU runs of this PR and a reference before these changes match.

I'll hold off on full approval for any changes Michael requests or for any changes to the commit history that may come.

@abishekg7
Copy link
Collaborator Author

Thanks for the review! I'll address the comments, but just wanted to note that this PR may not be a priority for merging to develop with host-device memory transfers consolidated around every call to dynamics. But it will be needed eventually.

@abishekg7 abishekg7 force-pushed the atmosphere/port_mpas_atm_update_bdy_tend branch from 8bc1e96 to 057ee7e Compare May 16, 2025 19:21
@abishekg7
Copy link
Collaborator Author

Addressed the review comments. I did have to rebase with the latest develop to get bit identical results (with the latest develop). Also noticing the same for #1315 that I'm working on. Checking if commits from earlier this week are causing some of these differences.

@mgduda mgduda self-requested a review May 16, 2025 20:40
@mgduda mgduda self-requested a review May 19, 2025 22:05
Copy link
Contributor

@mgduda mgduda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks! Once you've had a chance to rework the commit history, I'll go ahead and merge this.

This commit enables the GPU execution of the mpas_atm_update_bdy_tend routine
using OpenACC directives for data movement and loops. A new timer has been
added to time the host-device data transfers in this subroutine, with the label
'mpas_atm_update_bdy_tend [ACC_data_xfer]'

This commit also introduces some integers for loop bounds, so as to dereference
scalar integer pointers which the OpenACC parallel regions do not correctly
copy to device memory.
@abishekg7 abishekg7 force-pushed the atmosphere/port_mpas_atm_update_bdy_tend branch from dfaee24 to fe2e528 Compare May 20, 2025 02:08
@abishekg7
Copy link
Collaborator Author

Looks good, thanks! Once you've had a chance to rework the commit history, I'll go ahead and merge this.

Done. And thanks for the review!

Copy link
Collaborator

@gdicker1 gdicker1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mgduda mgduda merged commit 29f931b into MPAS-Dev:develop May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Atmosphere OpenACC Work related to OpenACC acceleration of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants