Skip to content
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

Enable GPU execution of MPAS-Atmosphere of pre-acoustic step setup calculations #1222

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

gdicker1
Copy link
Collaborator

@gdicker1 gdicker1 commented Aug 5, 2024

The GPU calculation of the vertical wind speed (w field) that is used during the acoustics steps is enabled by adding OpenACC directives to the atm_set_smlstep_pert_variables_work routine.

Timing information for the OpenACC data transfers in this routine is captured in the log file by a new timer: atm_set_smlstep_pert_variables [ACC_data_xfer].

Invariant fields used in this routine are also copied to the device within mpas_atm_dynamics_init and are deleted in mpas_atm_dynamics_finalize.

Ensures that lines of code within a loop or conditional are apparent to
the reader. This change only affects whitespace to indent code within an
if-condition.
…h OpenACC

Ensure that the invariant fields that are used in this work routine are
present on the device from model startup to model shutdown.

Fields are added to the device with copyin directives and other code
within mpas_atm_dynamics_init and fields are deleted from the device
with matching delete directives and code in mpas_atm_dynamics_finalize.
Add directives for an initial port of this routine using OpenACC.
Ensure that other, non-invariant, fields are available on the device
during this routine and that modified variables are copied out at the
end.

Timing for these transfers are reported in the output log file in the
new timer: `atm_recover_smlstep_pert_variables [ACC_data_xfer]`.

The 'default(present)' clause is added to the parallel directive so that
any missing data causes a runtime error.
@mgduda mgduda self-requested a review September 12, 2024 00:35
@mgduda mgduda added Atmosphere OpenACC Work related to OpenACC acceleration of code labels Sep 12, 2024
@mgduda mgduda changed the base branch from master to develop September 13, 2024 16:06
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.

2 participants