PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

APM PGI 10.5 - !$acc do kernel copyin, copyout

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



Joined: 11 Jun 2009
Posts: 233

PostPosted: Sat May 15, 2010 10:22 pm    Post subject: APM PGI 10.5 - !$acc do kernel copyin, copyout Reply with quote

Here is the issue that I have: if I use an array in both copyin and copyout clauses, then only copyout is generated

Example:
Code:
!$acc region do kernel copyin(ca_jsr(1:n)), copyout(ca_jsr(1:n))

The compiling output just say
Quote:
Generating copyout(ca_jsr(:))


Thanks,
Tuan
Back to top
View user's profile
mkcolg



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

PostPosted: Mon May 17, 2010 3:35 pm    Post subject: Reply with quote

Hi Tuan,

Yes, the compiler will ignore the copyin. You should use the "copy" clause here.

Code:

...
!$acc region copyin(Cs), copyout(Cs), copyout(Ds)
...
% pgf90 -ta=nvidia -Minfo=accel test.f90 -V10.5
test:
      9, copyin(cs) followed by copyout(cs); copyin attribute ignored
         Generating copyout(cs(:,:))
         Generating copyout(ds(:,:))




- Mat
Back to top
View user's profile
Tuan



Joined: 11 Jun 2009
Posts: 233

PostPosted: Tue May 18, 2010 8:42 am    Post subject: Reply with quote

Thanks, Mat.
I know we can use copy, yet I want to test if there is any difference between using copy explicitly and using the two other clauses.

Tuan
Back to top
View user's profile
mkcolg



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

PostPosted: Wed May 19, 2010 9:46 am    Post subject: Reply with quote

Hi Tuan,

Unfortunately, the PGI Accelerator Model's spec has a restriction that you can't use the same variable in multiple copy clauses. If allowed, it would cause difficulties if the user used different extends for the copyin and copyout clauses.

Note that using copy is the same as using both copyin and copyout. There should be no difference. Are you seeing a difference?

Note that you could use the update clauses to get finer grain control of the copies. Something like:
Code:
!$acc data region local(Cs)
...
!$acc updatein(Cs)
...
!$acc region copyout(Ds)
...
!$acc end region
...
!$acc updateout(Cs)
...
!$acc end data region

Hope this helps,
Mat
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