PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

undefined 'pghpf_local_mode_' symbol

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



Joined: 22 Oct 2004
Posts: 9

PostPosted: Wed Apr 13, 2005 12:04 pm    Post subject: undefined 'pghpf_local_mode_' symbol Reply with quote

I have inherited the task of porting a rather large software package from a 32-bit machine to a (64-bit) quad Opteron. This package consists of several shared object modules (mixes of C, C++ and FORTRAN) that are loaded as needed by a Java-based user inteface/control panel.

Curiously, the linking of the code that generates the shared object completes without an error, but when Java attempts to load the same module, an undefined symbol reference to 'pghpf_local_mode_" shuts everything down.

Here's the linking for one of the shared objects :
    pgCC -O -shared -fPIC PotentDLL.o psmain.o psscg.o initim.o /sam/gorgon_pgi/lib/Potent.a /sam/gorgon_pgi/lib/cadlib.a /sam/gorgon_pgi/lib/dynalib.a /sam/gorgon_pgi/lib/dblib.a /sam/gorgon_pgi/lib/s3utils.a /sam/gorgon_pgi/lib/wintounix.a \
    -L/usr/local/pgi/linux86-64/5.2/libso -lpghpf -lpghpf_rpm -lpghpf2 -lpgftnrtl -lpgf90 -lm -lpgc -lgcc -lc -lgcc -o /sam/gorgon_pgi/bin/libPotentDLL.so


Here's an attempt by Java to load this same shared object :
    loading PotentDLL...
    Exception in thread "main" java.lang.UnsatisfiedLinkError: /sam/gorgon_pgi/bin/libPotentDLL.so: /usr/local/pgi/linux86-64/5.2/libso/libpghpf.so: undefined symbol: pghpf_local_mode_
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1511)
    at java.lang.Runtime.loadLibrary0(Runtime.java:788)
    at java.lang.System.loadLibrary(System.java:834)
    at LoadLib.main(LoadLib.java:4)

I still can't find where this 'pghpf_local_mode_' symbol is defined, after searching all the various PGI libraries. Any ideas here?

The PsychOgre
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Apr 13, 2005 1:23 pm    Post subject: Reply with quote

Hi PsychOgre,

"pghpf_local_mode_" is a global symbol that is inserted into a object compiled using pghpf. Where any of your objects compiled with pghpf? If not, you should remove "-lpghpf -lpghpf_rpm -lpghpf2".

-Mat
Back to top
View user's profile
PsychOgre



Joined: 22 Oct 2004
Posts: 9

PostPosted: Thu Apr 14, 2005 6:28 am    Post subject: Reply with quote

Thanks for the clarification where the 'pghpf_local_mode_' comes from.
After a review of the numerous makefiles, I see that none of the code was compiled with 'pghpf'. When the '-lpghpf*' libraries are removed from the link statement, the undefined symbol goes away. Yipee!
I hadn't run into this undefined symbol error when running the same code on a 32-bit machine. I guess the only other difference was the 32-bit machine had PGI v5.1, versus the Opteron has PGI v5.2.

Thanks for your help!
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