PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

LAM/MPI and GNU Libtool
Goto page Previous  1, 2
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
Jeff Squyres (old)



Joined: 01 Mar 2005
Posts: 4

PostPosted: Fri Mar 04, 2005 9:04 am    Post subject: Reply with quote

Quote:
For pgCC version 5.2-4 and before:

For each source file in the library, compile it:
Code:
pgCC -c --one_instantiation_per_object $(YOUR_FLAGS) file.cc

You must now do an extra pre-link step to instantiate all the templates used in this library, putting all the library .o's on this line, and no -c flag.
Code:
pgCC --one_instantiation_per_object --prelink_objects $(YOUR_FLAGS) file1.o file2.o etc.


Achive or build the shared library as before, except you must include the new hidden templates in the Template.dir directory:
Code:
ar qv lib_mylib.a Template.dir/*.o file1.o file2.o etc.


Yoinks. Ok.

Quote:
I looked through our TRS mail and talked with Dave, but as of noon today we have not recieved your example so I've been unable to confirm that this does indeed solve your issue. However, I see nothing in the log that would lead me to believe that it wouldn't.


I just re-sent it.

Quote:
Does libtool have a way to invoke different build methods for different versions of the compiler?


Libtool is just a bunch of shell code -- it can be made to do whatever is necessary.

So -- some followup questions for you:

- How does one reliably tell the difference between versions of pgcc (and friends)? A quick-n-easy shell test would be preferred.

- Just so that we're absolutely 100% clear, is none of the above procedure necessary for pg* 6.x -- just a normal compile and link (per what libtool was already doing) will work fine?
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Mar 07, 2005 10:01 am    Post subject: Reply with quote

Quote:
- How does one reliably tell the difference between versions of pgcc (and friends)? A quick-n-easy shell test would be preferred.


Code:
pgCC -V | awk  ' /pgCC/  { print $2 }' | cut -d. -f1


Quote:
- Just so that we're absolutely 100% clear, is none of the above procedure necessary for pg* 6.x -- just a normal compile and link (per what libtool was already doing) will work fine?


After receiving your test program I was able confirm that release 6.0 "just works".

Thanks,
Mat
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
Goto page Previous  1, 2
Page 2 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