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

Remove all update directives #19

Closed
wants to merge 3 commits into from
Closed

Remove all update directives #19

wants to merge 3 commits into from

Conversation

supreethms1809
Copy link

Removed all update directives around the halo exchange and at the
end of each subroutine. This is done to facilitate the new halo
exchange code which is suitable for GPU communication.The update
directives were used to communicate through CPU.

This PR is dependent on PR 17 and PR18.

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

Replaced the mpas_pool_get_array_gpu function by mpas_pool_get_array
for the routines solve_diagnostics and init_coupled_diagnostics.
The _gpu calls has !$acc data copyin directives and it transfers the
variables on to gpu. The two functions solve_diagnostics and init_coupled_
diagnostics functions are also called outside the time integration. The
data copying is corrupting the GPU data later in the timestep.
This results in NaNs.
Removed the IfDef MPAS_OPENACC to make it work for GPUs.
The code inside ifDef was not executed resulting in the compilation
error. This code is necessary for assigning rank to GPU, when a single
host has multiple GPU in it. And also I have removed the commented
lines which are unnecessary.
Removed all update directives around the halo exchange and at the
end of each subroutine. This is done to facilitate the new halo
exchange code which is suitable for GPU communication.The update
directives were used to communicate through CPU.
@mgduda mgduda self-requested a review April 11, 2018 18:02
Copy link

@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.

It looks like this PR is built on top of PR #18 and as such, this PR includes changes that must be modified in PR #18. Generally, PRs should be independent (i.e., not just build one on top of the other), so that changes to an earlier PR necessitate changes to all other PRs. Can you rebase the changes in this PR on the atmosphere/gpu branch, and not on PR #18 ?

@supreethms1809
Copy link
Author

Created a new pull request PR 24 for the above changes.

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