| View previous topic :: View next topic |
| Author |
Message |
appleluo
Joined: 21 Nov 2012 Posts: 19
|
Posted: Fri Feb 22, 2013 2:45 pm Post subject: how to make an array private with the private clause? |
|
|
I tried to make an array private using the private clause but always got compilation error. Does the private clause work with arrays? The OpenACC standard doesn't say it only works for scalars.
Thank,
Ping |
|
| Back to top |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Fri Feb 22, 2013 2:51 pm Post subject: |
|
|
No, it works with arrays. What's the error? What type are the arrays and how are your privatizing them?
- Mat |
|
| Back to top |
|
 |
appleluo
Joined: 21 Nov 2012 Posts: 19
|
Posted: Fri Feb 22, 2013 3:39 pm Post subject: |
|
|
Mat,
The error message is very generic:
PGF90-S-0533- (tsolve_sweep_y.f90: 17)
0 inform, 0 warnings, 1 severes, 0 fatal for tsolve_sweep_y
line 17 is OpenACC directives look as follow:
!$acc kernels present(atp, ate, ats, atn, atw, bt, t) private(a, b)
a is a two dimensional array and b is a one dimensional array. Both are double precision.
The compiler I used is 12.8. My code cannot work with the newer compiler, a problem I haven't investigate yet.
Thanks,
Ping |
|
| Back to top |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Fri Feb 22, 2013 3:51 pm Post subject: |
|
|
Hi Ping,
The "private" clause can only be applied to a "loop" or "parallel" directive. Note that the syntax error has been improved in the 2013 compilers.
| Quote: | | PGF90-S-0533-Clause 'PRIVATE' not allowed in 'ACC KERNELS' directive |
Hope this helps,
Mat |
|
| Back to top |
|
 |
appleluo
Joined: 21 Nov 2012 Posts: 19
|
Posted: Fri Feb 22, 2013 4:17 pm Post subject: |
|
|
Yes. You are right. But why the kernels doesn't allow private in the standard.
Ping |
|
| Back to top |
|
 |
|