PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

how to make an array private with the private clause?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
appleluo



Joined: 21 Nov 2012
Posts: 19

PostPosted: Fri Feb 22, 2013 2:45 pm    Post subject: how to make an array private with the private clause? Reply with quote

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
View user's profile
mkcolg



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

PostPosted: Fri Feb 22, 2013 2:51 pm    Post subject: Reply with quote

No, it works with arrays. What's the error? What type are the arrays and how are your privatizing them?

- Mat
Back to top
View user's profile
appleluo



Joined: 21 Nov 2012
Posts: 19

PostPosted: Fri Feb 22, 2013 3:39 pm    Post subject: Reply with quote

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
View user's profile
mkcolg



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

PostPosted: Fri Feb 22, 2013 3:51 pm    Post subject: Reply with quote

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
View user's profile
appleluo



Joined: 21 Nov 2012
Posts: 19

PostPosted: Fri Feb 22, 2013 4:17 pm    Post subject: Reply with quote

Yes. You are right. But why the kernels doesn't allow private in the standard.

Ping
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
Goto page 1, 2  Next
Page 1 of 2

 
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