| View previous topic :: View next topic |
| Author |
Message |
Tuan
Joined: 11 Jun 2009 Posts: 226
|
Posted: Sat May 15, 2010 10:22 pm Post subject: APM PGI 10.5 - !$acc do kernel copyin, copyout |
|
|
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 |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Mon May 17, 2010 3:35 pm Post subject: |
|
|
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 |
|
 |
Tuan
Joined: 11 Jun 2009 Posts: 226
|
Posted: Tue May 18, 2010 8:42 am Post subject: |
|
|
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 |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Wed May 19, 2010 9:46 am Post subject: |
|
|
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 |
|
 |
|