PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

double copyin and copy in 12.6

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
Alexey A. Romanenko



Joined: 17 Feb 2012
Posts: 31

PostPosted: Mon Jul 30, 2012 6:40 am    Post subject: double copyin and copy in 12.6 Reply with quote

Hi guys,

Here is a piece of code:
Code:
!$acc data create(AUX(1:NAUX),JS(1:NSM3))
!$accx     copyin(NTM) copy(FCLUST(1:SZ),FSEQ(1:SZ))
!      IS = 0
!$acc kernels
!$acc loop independent
      DO IS3 = 0,NSM-1
!$acc loop independent
        DO IS2 = 0,NSM-1
!$acc loop independent
          DO IS1 = 0,NSM-1
!            IS = IS + 1
            IS = IS1 + IS2*NSM + IS3*NSM*NSM
            JS(IS) = 1 + IS1 + NTM(1)*IS2 + NTM(1)*NTM(2)*IS3
          ENDDO
        ENDDO
      ENDDO
!$acc end kernels
...
!$acc end data


PGI 12.6 produces the following output
Code:
     59, Generating local(js(1:nsm3))
         Generating local(aux(1:naux))
         Generating copyin(ntm(:))
         Generating copy(fseq(:sz))
         Generating copy(fclust(:sz))
     62, Generating copyin(ntm(:))
         Generating local(js(1:nsm3))
         Generating compute capability 1.0 binary
         Generating compute capability 2.0 binary
     64, Loop is parallelizable
     66, Loop is parallelizable
     68, Loop is parallelizable
         Accelerator kernel generated
         66, !$acc loop gang ! blockidx%y
         68, !$acc loop gang, vector(128) ! blockidx%x threadidx%x
             CC 1.0 : 23 registers; 56 shared, 4 constant, 0 local memory bytes
             CC 2.0 : 22 registers; 0 shared, 72 constant, 0 local memory bytes


Why does compiler generate copyin(ntm(:)) and local(js(1:nsm3)) both for line 59 and 62? PGI 12.5 doesn't.
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6134
Location: The Portland Group Inc.

PostPosted: Mon Jul 30, 2012 9:33 am    Post subject: Reply with quote

Hi Alexey,

The second copy message isn't really a copy. It's actual a "present" which has been added at the start of a compute region in order to ensure the correct association between host and device variables is maintained. By doing this, we're now able to support a more flexible association and allow things such as pointer swapping between compute regions.

The messages are confusing though, and I have asked our compiler engineers to make them more clear.

Our apologies for the confusion.

- Mat
Back to top
View user's profile
Alexey A. Romanenko



Joined: 17 Feb 2012
Posts: 31

PostPosted: Mon Jul 30, 2012 10:14 pm    Post subject: Reply with quote

Thanks
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