PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

matrix reduction using cuda fortran and GPU
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
mkcolg



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

PostPosted: Mon Dec 10, 2012 4:25 pm    Post subject: Reply with quote

Quote:
does PGI compiler have openacc_lib.h ??
Yes, but it's a C header file. For Fortran, you would use the openacc lib module, i.e. "use openacc_lib".

Quote:
what do I need to do first to compile the project??
You need to add the ACC directives around the loop(s) you wish to accelerate and then compile with "-acc -Minfo=accel".

This article walks through the basic steps of porting a code using directives. http://www.pgroup.com/lit/articles/insider/v4n1a3.htm. I wrote it using the PGI Accelerator Model syntax. But since OpenACC is based in large part on the PGI Accelerator Model the process is the same.

- Mat
Back to top
View user's profile
Dolf



Joined: 22 Mar 2012
Posts: 100

PostPosted: Mon Dec 10, 2012 5:53 pm    Post subject: RE: Reply with quote

when I put "use openacc_lib" in the program, it does not compile, it says that unable to open MODULE file openacc_lib.mod

what is the required directory I need to add to my VS 2010 project "include directory" ??

Dolf
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Dec 11, 2012 8:57 am    Post subject: Reply with quote

My fault. It's "use openacc", not "use openacc_lib".

- Mat
Back to top
View user's profile
Dolf



Joined: 22 Mar 2012
Posts: 100

PostPosted: Tue Dec 11, 2012 10:17 am    Post subject: Reply with quote

still not able to open module openacc.mod

I am using visual studio 2010 with PGI compiler 12, what should I configure to make it look for openacc module??

thanks,
Dolf
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Dec 11, 2012 11:45 am    Post subject: Reply with quote

Which version are you using? OpenACC was added in the 12.6 release.

- Mat
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 Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 2 of 7

 
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