-
Notifications
You must be signed in to change notification settings - Fork 331
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 exection of atm_advance_acoustic_step via OpenACC #1251
Open
gdicker1
wants to merge
5
commits into
MPAS-Dev:develop
Choose a base branch
from
gdicker1:atmosphere/acc_advance_acoustic_step
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Enable GPU exection of atm_advance_acoustic_step via OpenACC #1251
gdicker1
wants to merge
5
commits into
MPAS-Dev:develop
from
gdicker1:atmosphere/acc_advance_acoustic_step
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These changes are mostly cosmetic and to remove unnecessary characters. In one case, these modifcations make the specZoneMaskCell if condition more apparent. The improved readability will help the porting steps that follow.
This includes grouping together some variable assignments to reduce if conditions, making array assignments explicit to ensure the operations are parallelizable, and fusing some loops that have the same bounds to reduce iterations.
Use OpenACC parallel and loop directives so this work routine can be executed on a GPU. More changes will be needed to improve performance.
NOTE: This PR is paused. I am sorting out the merge conflicts and a run-time error. I will notify again when this PR is ready for review. |
gdicker1
force-pushed
the
atmosphere/acc_advance_acoustic_step
branch
from
January 7, 2025 20:52
58ba84a
to
0730fa2
Compare
Ensures the fields which don't change while the model is running are present on the device from model startup until model shutdown. It builds on the changes in PR MPAS-Dev#1176 to copyin invariant fields during mpas_atm_dynamics_init and delete them from the device during mpas_atm_dynamics_finalize.
Ensure that the other, non-invariant fields are available for this routine. Variables that are overwritten during this routine are only created while others are copied in. Any variables overwritten by this routine are copied out at the end. Timing for these transfers are reported in the output log file in the new timer: 'atm_advance_acoustic_step [ACC_data_xfer]'.
gdicker1
force-pushed
the
atmosphere/acc_advance_acoustic_step
branch
from
January 10, 2025 19:35
0730fa2
to
09e60a5
Compare
Force-push 0730fa2 to 09e60a5 to consistently add new invariant fields at the end of sections in @mgduda and @abishekg7 this should be ready for review! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes small code modifications and adds OpenACC directives so the
atm_advance_acoustic_step_work
routine can execute on GPU(s).Timing information for the OpenACC data transfers in this routine is captured in the log file by a new timer:
atm_advance_acoustic_step [ACC_data_xfer]
.Invariant fields used in this routine are also copied to the device within
mpas_atm_dynamics_init
and are deleted inmpas_atm_dynamics_finalize
.