Skip to content

Initial OpenACC port of atm_bdy_adjust_dynamics_relaxzone_tend #1269

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

Conversation

abishekg7
Copy link
Collaborator

@abishekg7 abishekg7 commented Jan 17, 2025

This PR enables the GPU execution of atm_bdy_adjust_dynamics_relaxzone_tend using OpenACC directives. Any scalar pointers used within the acc parallel regions are first dereferenced so that they are correctly copied onto the
device.

Timing information for the temporary OpenACC data transfers in this routine is logged using the timer: atm_bdy_adjust_dynamics_relaxzone_tend [ACC_data_xfer].

Data movements for time-invariant fields are performed in mpas_atm_dynamics_init and mpas_atm_dynamics_finalize

@mgduda mgduda requested review from mgduda, gdicker1 and jim-p-w January 17, 2025 22:33
@mgduda mgduda added Atmosphere OpenACC Work related to OpenACC acceleration of code labels Jan 17, 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.

Besides a more formal commit message, here's some things I've noticed so far.

@abishekg7 abishekg7 force-pushed the atmosphere/port_atm_bdy_adjust_dynamics_relaxzone_tend branch from 2e993c5 to 5c7d198 Compare January 31, 2025 22:54
@gdicker1
Copy link
Collaborator

gdicker1 commented Feb 3, 2025

This looks good to me now. Just waiting for any changes from Michael's review and the final commit(s)

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 to me.

@abishekg7 I'll merge this after you've reworked the commit history.

This commit enables the GPU execution of atm_bdy_adjust_dynamics_relaxzone_tend
using OpenACC directives. Any scalar pointers used within the acc parallel
regions are first dereferenced so that they are correctly copied onto the
device.

Timing information for the temporary OpenACC data transfers in this routine is
logged using the timer: atm_bdy_adjust_dynamics_relaxzone_tend [ACC_data_xfer].

Time-invariant fields, meshScalingRegionalCell and meshScalingRegionalEdge, are
copied onto the device in mpas_atm_dynamics_init and deleted from the device in
mpas_atm_dynamics_finalize.
@abishekg7 abishekg7 force-pushed the atmosphere/port_atm_bdy_adjust_dynamics_relaxzone_tend branch from af2b0a0 to f7adde0 Compare April 29, 2025 20:09
@abishekg7
Copy link
Collaborator Author

Looks good to me.

@abishekg7 I'll merge this after you've reworked the commit history.

Thanks! I've rebased and cleaned up the commit history. And results are still bit identical with develop.

@mgduda mgduda merged commit 8faa834 into MPAS-Dev:develop May 2, 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.

4 participants