-
Notifications
You must be signed in to change notification settings - Fork 329
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 atm_compute_moist_coefficients via OpenACC #1238
base: develop
Are you sure you want to change the base?
Enable GPU execution of atm_compute_moist_coefficients via OpenACC #1238
Conversation
|
||
|
||
!$acc parallel | ||
!$acc loop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the loop directives should be more explicit (e.g. loop gang worker
here). Just to match with other work we're doing.
do iq = moist_start, moist_end | ||
qtotal = qtotal + 0.5 * ( scalars(iq, k, cell1) + scalars(iq, k, cell2) ) | ||
end do | ||
cqu(k,iEdge) = 1.0 / (1.0 + qtotal) | ||
end do | ||
end if | ||
end do | ||
!$acc end parallel | ||
!$acc exit data copyout(cqw, cqu, qtot) delete(scalars) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This exit data
directive should be surrounded by MPAS_ACC_TIMER_{START,STOP}
calls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may need some additional work. When I compared baseline and test runs of the regional testcase, I get differences in two fields in the history file. Restart files are reported as matching.
Output from compare_netcdf.py:
Comparing files: f1 - f2
f1=../2024Dec31_MPASAPR1223_OpenACC/baseline_acc_1735844488/history.2019-09-01_00.06.00.nc
f2=test_att1735694999/history.2019-09-01_00.06.00.nc
Variable Min Max
=========================================
initial_time is not a numeric field and will not be compared
xtime is not a numeric field and will not be compared
depv_dt_fric -32.448421 33.315609
depv_dt_fric_pv -32.448421 30.517973
mminlu is not a numeric field and will not be compared
Also a couple of suggested edits.
This PR enables the GPU execution of atm_compute_moist_coefficients subroutine.
Tested with a real and idealized test cases.