Skip to content

Enable GPU execution of loops in atm_srk3 involving module level variables#1314

Merged
mgduda merged 1 commit intoMPAS-Dev:developfrom
abishekg7:atmosphere/port_atm_srk3_module_vars
May 15, 2025
Merged

Enable GPU execution of loops in atm_srk3 involving module level variables#1314
mgduda merged 1 commit intoMPAS-Dev:developfrom
abishekg7:atmosphere/port_atm_srk3_module_vars

Conversation

@abishekg7
Copy link
Copy Markdown
Collaborator

@abishekg7 abishekg7 commented May 13, 2025

This PR ports some of the loops in the mpas_atm_time_integration and mpas_atm_core modules, which initialize module level variables belonging to the mpas_atm_time_integration module, to OpenACC in preparation for the consolidating all data transfers between host and device to before and after each dynamics call.

In order to do this, we also declare the allocatable module level variables in this scope using the OpenACC declare create statement, which instructs the nvhpc compiler to automatically create and delete the variable whenever it encounters an allocate or deallocate statement, respectively. This commit also removes these variables from manual data movement statements as required.

This PR 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 in the presence of a default(present) clause.

Loading
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