Skip to content

Tmp dycore mem move#4

Open
abishekg7 wants to merge 18 commits into
tmp_acc_dycore_mergefrom
tmp_dycore_mem_move
Open

Tmp dycore mem move#4
abishekg7 wants to merge 18 commits into
tmp_acc_dycore_mergefrom
tmp_dycore_mem_move

Conversation

@abishekg7

Copy link
Copy Markdown
Owner

The title above should be a 1 line short summary of the pull request (i.e. what the project the PR represents is intended to do).

Enter a description of this PR. This should include why this PR was created, and what it does.

Testing and relations to other Pull Requests should be added as subsequent comments.

See the below examples for more information.
MPAS-Dev/MPAS#930
MPAS-Dev/MPAS#931

mgduda and others added 18 commits April 11, 2025 16:30
…nto develop (PR MPAS-Dev#1268)

This merge adds OpenACC directives so the atm_bdy_adjust_dynamics_speczone_tend
routine can execute on GPUs.

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

* atmosphere/acc_atm_bdy_adjust_dynamics_speczone_tend:
  Initial OpenACC port of atm_bdy_adjust_dynamics_speczone_tend
…elop (PR MPAS-Dev#1270)

This merge enables the GPU execution of the atm_bdy_reset_speczone_values
subroutine using OpenACC directives for the data movements and loops.

A new timer, 'atm_bdy_reset_speczone_values [ACC_data_xfer]', has been added for
host-device data transfers in this subroutine.

* atmosphere/port_atm_bdy_reset_speczone_values:
  Initial OpenACC port of atm_bdy_reset_speczone_values
This commit enables the GPU execution of the atm_rk_dynamics_substep_finish
subroutine using OpenACC directives for the data movements and loops. The
subroutine takes in an additional argument, nVertLevels, for the explicit loop
operations. A new timer, 'atm_rk_dynamics_substep_finish [ACC_data_xfer]', has
been added for host-device data transfers in this subroutine.
…ep_finish

This commit provides an interim fix for a potential issue in limited area runs
relating to the uninitialized garbage cells in the 1st time level of theta_m.

Similar to the issue originally discovered during the OpenACC port of the
atm_rk_integration_setup subroutine, there are discrepancies with the reference
limited area runs that arise due to tend_theta accessing uninitialized values
of theta_m, via flux_arr in the atm_compute_dyn_tend_work subroutine. Later in
the code, these specific cells are set to the correct values from LBCs in the
atm_bdy_adjust_dynamics_speczone_tend subroutine, however, rthdynten is
computed between these two blocks of code and does not benefit from the correct
LBCs. rthdynten then feeds back to certain convective schemes, and thus
altering the final results.

The longer-term fix may potentially involve moving the computation of rthdynten
to follow the call to atm_bdy_adjust_dynamics_speczone_tend. This commit provides
an interim fix by explicitly initializing the garbage cells of theta_m_1
…velop (PR MPAS-Dev#1267)

This merge enables the GPU execution of the atm_rk_dynamics_substep_finish
subroutine using OpenACC directives for the data movements and loops. The
subroutine now takes in an additional argument, nVertLevels, for the explicit
loop operations that were not present in the original code. A new timer,
'atm_rk_dynamics_substep_finish [ACC_data_xfer]', has been added for host-device
data transfers in this subroutine.

Additionally, this merge contains changes to explicitly initialize the "garbage
cell" of theta_m_1 on the device to avoid the possibility of answer differences
due to the use of uninitialized memory from theta_m in the
atm_compute_dyn_tend_work routine.

* atmosphere/port_atm_rk_dynamics_substep_finish:
  Initializing the garbage cells for theta_m_1 in atm_rk_dynamics_substep_finish
  Initial OpenACC port of atm_rk_dynamics_substep_finish
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.

2 participants