PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

correct subarray in data regions

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
jockel



Joined: 15 Dec 2010
Posts: 5

PostPosted: Mon Dec 17, 2012 12:50 pm    Post subject: correct subarray in data regions Reply with quote

Hello,

we wonder, which is the correct / safe / fast method do declare the subarray in a data region with OpenACC.

Lets assume an array allocated as

Code:
AA(0:Imax+1,0:Jmax+1,0:Kmax+1,Maxblocks)


This variable is used as shown here:

Code:
DO iBlock = 1, Maxblocks

!here, the complete subarray for Block iBlock should be copied
!$acc data
!$acc& copy(AA(xxxxx))

...

...some code...

 DO K=1,Kmax
  DO J=1,Jmax
   DO I=1,Imax

   ...some code...

   ENDDO
  ENDDO
 ENDDO

   ...some code...

...

!$acc end data

END DO


How should the contiguous subarray (for the actual block iBlock) of AA be declared in the data-region (create, copy, update,...) and what are the differences in the following methods:

1. AA(:,:,:,iBlock)

2. AA(:,:,:,iBlock:iBlock)

3. AA(0:Imax+1,0:Jmax+1,0:Kmax+1,iBlock)

4. AA(0:Imax+1,0:Jmax+1,0:Kmax+1,iBlock:iBlock)

(we also copy the halos / dummy cells in order to have a contiguous data transfer)

Many thanks in advance!
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group