Here is the issue that I have: if I use an array in both copyin and copyout clauses, then only copyout is generated
!$acc region do kernel copyin(ca_jsr(1:n)), copyout(ca_jsr(1:n))
The compiling output just say
Yes, the compiler will ignore the copyin. You should use the “copy” clause here.
!$acc region copyin(Cs), copyout(Cs), copyout(Ds)
% pgf90 -ta=nvidia -Minfo=accel test.f90 -V10.5
9, copyin(cs) followed by copyout(cs); copyin attribute ignored
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.
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:
!$acc data region local(Cs)
!$acc region copyout(Ds)
!$acc end region
!$acc end data region
Hope this helps,