PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

firstprivate clause in OpenACC

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
ivanlinux



Joined: 02 Jul 2012
Posts: 2

PostPosted: Mon Jul 02, 2012 1:57 am    Post subject: firstprivate clause in OpenACC Reply with quote

Hello,

I can not use firstprivate with a parallel clause.
This is the code:

Code:

for (i=0; i < size; i++){
   j = i;
   #pragma acc parallel loop copy(a[0:size*size]) firstprivate (j)
   for (j=i; j < size; j++){
      a[i] =a[j*size+i];
   }
}


An the output from PGI (12.5) compiler:

Code:

[ivan@garoe testcase]$ make
pgcc -fast -Minline -Minfo:all -Mcuda -acc -ta:nvidia lud_acc.c -o lud
PGC-S-0036-Syntax error: Recovery attempted by inserting before identifier firstprivate (lud_acc.c: 20)


I have tried with this syntax too:

Code:

for (i=0; i < size; i++){
   #pragma acc parallel copy(a[0:size*size]) firstprivate (j)
   #pragma acc loop independent
   for (j=i; j < size; j++){
      a[i] =a[j*size+i];
   }
}


But I get some problems as well:

Code:

PGC-S-0035-Syntax error: Recovery attempted by replacing identifier firstprivate by accparallel (lud_acc.c: 20)


Does anyone has any idea about how to use firstprivate?

Thanks in advance for your time and assintance.

Iván

==

accULL developer.
Back to top
View user's profile
toepfer



Joined: 04 Dec 2007
Posts: 50

PostPosted: Mon Jul 02, 2012 9:49 am    Post subject: Reply with quote

Support for the firstprivate clause will not be available until the 12.6 release.
Back to top
View user's profile
ivanlinux



Joined: 02 Jul 2012
Posts: 2

PostPosted: Tue Jul 03, 2012 6:28 am    Post subject: Reply with quote

Thank you for your reply!

I will be waiting for the next version ;-)
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling 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