PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

second underscore

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



Joined: 16 Apr 2005
Posts: 11

PostPosted: Tue Sep 27, 2005 7:06 am    Post subject: second underscore Reply with quote

Hello all,

is there a way to append a second underscore to some (not all) subroutine names (linked
from an external library) ? I know IBM's xlf allows for this possibility.

My problem is that our vendor compiled mpich with the pg compilers and then went
on to compile some math libraries with the pg compilers and some with the gnu compilers.

Peter
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Sep 27, 2005 11:02 am    Post subject: Reply with quote

Hi Peter,

The "-Msecond_underscore" will universally add a second underscore but I don't think this is what you want. I'm assuming that the calls are mixed in your source code so there is no easy way of doing this.

My first thought is to manually append an underscore to those functions which need the second underscore. You could also use the preprocessor to do this where you add a "#include mydefs.h" to all your source files. "mydefs.h" would then be just a #defines like "#define myfunc myfunc_". You need to use the "-Mpreprocess" flag of change your file extension to ".F" or ".F90" to envoke the preprocessor.

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 -> 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