PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

pgi compiler with other libraries

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
bofang



Joined: 06 Dec 2012
Posts: 6

PostPosted: Wed Dec 12, 2012 7:10 pm    Post subject: pgi compiler with other libraries Reply with quote

Hi,

This might be a naive question. I installed the pgi compiler with open acc and it works with some simple examples ( gpu started well, no errors). Now I want to compile one of my programs that use boost and intel IPP, the compiler reports several errors saying that some buill-in boost functions are undefined. Do I need to recompile all my libraries (boost, ipp) with pgi compiler?

If the kernel code that I have calls boost and interl ipp, is the pgi compiler able to generate kernel code?

Thank you
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Dec 13, 2012 10:23 am    Post subject: Reply with quote

Hi bofang,

C++ is difficult since most compilers are not interoperable. Hence, if your C++ libraries are built with one compiler, it most likely wont link with another (due to name mangling, STL versions, and exception handling). In our up coming PGI version 13.0 C++ Linux compiler we are adding g++ compatibility, but I don't if this will help with Intel C++ compiled code.

My advice would be to write your OpenACC code in C or Fortran and then call these routines from your main C++ program. C doesn't have the interoperability issues that C++ has. See Chapter 13 of the PGI User's Guide for help on inter-language calling.

Also, you'll need to add the PGI runtime libraries to your link. Though the exact library names are going to change in 13.0. To get the current libraries that we pass to the linker, run the command "pgcc -acc -dryrun x.o".

Hope this helps,
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
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