PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

CUDA Fortran: how to use CUDA Fortran in Fortran90 projects
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
mkcolg



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

PostPosted: Mon Oct 15, 2012 11:04 am    Post subject: Reply with quote

Quote:
Pgfrotran appends underscores to all global names when compiling, right? Would you please explain to me the 'underscore' mechanism?
Correct, we add an underscore at the end of symbol names in order to help with C name space conflicts. Other Fortran compilers will also add one or two underscores.

Quote:
Since I use it to compile all codes, there should be no dis-match about underscores. So, I don't understand why this happens.
It could be that they are C symbols and hence don't get the underscore already added, or that the object that contains the definitions for these symbols wasn't added to the link.

You need to determine the source where these symbols are defined, how this source is compiled, and then how the symbols are being decorated (i.e. 'nm foo.o | grep fsys_array_str'), and if the object is being added to the link.

- Mat
Back to top
View user's profile
Chinacxt



Joined: 19 Sep 2012
Posts: 9

PostPosted: Tue Oct 16, 2012 12:13 am    Post subject: thanks Reply with quote

Thanks very much for your comprehensive advice.
I found out that I miss some linking options. I have now fixed it and it runs well now.
Thanks very much~
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