-
Notifications
You must be signed in to change notification settings - Fork 42
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
Offloading discontiguous host data #248
Conversation
sbrdar
commented
Dec 4, 2024
- offloading discontiguous data via WrappedDataStorage
- Field can wrap discontiguous array and copy it to a contiguous memory on the device
do l=1,5 | ||
fview(i,j,l) = 1000*i+100*j+10*1+l | ||
enddo | ||
!$acc parallel loop deviceptr(fview) |
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'm afraid that this deviceptr(fview)
with fview having the POINTER
attribute is non-standard OpenACC and will not compile with Cray compiler. We need to create a separate subroutine just for kernels with deviceptr 😞, where the deviceptr is passed as argument without POINTER
attribute.
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 was missing. Thank you for pointing it out. I have added kernel subroutines to call ACC pragmas. See 5dc24af.
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.
Very good! I like how little code it was to add based on pluto
implementation.
I made some very minor suggestions in code.
…dDataSore::contiguous_
…ll with dummy call -> Fortran standard for ACC
@wdeconinck Thank you for the comments! |
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.
Thank you for addressing all the changes! Good to go!