PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Execution Error

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



Joined: 21 Dec 2004
Posts: 3

PostPosted: Tue Aug 23, 2005 5:23 pm    Post subject: Execution Error Reply with quote

Hello,

I'm a newbie with fortran so hopefully this is an easy problem to fix.
I'm compiling an MPI (MPICH) CFD code from NASA which compiles fine but has the following error when executed: "Error while loading shared libraries : libpgc.so : cannot open shared object file".

I am attempting to run the program on a dual opteron cluster with 16 dual processor nodes running RedHat 3.5 WS. The code is compiled using pgf/pgcc and using the following switches: -mp -fastsse -tp k8-64 -byteswapio -Ktrap=fp
Also I have set "libs = -Bstatic -L/usr/pgi/linux86-64/6.0/libso -lpgc.so" in the makefile.

Anyone seen this behavior before?

Thanks in advance!
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Aug 24, 2005 9:45 am    Post subject: Reply with quote

Hi tleighton,

The problem is the shared object 'libpgc.so' can not be found when the executable is loaded. The path the loader uses to find the shared object is either embedded in the executable (use the 'ldd <exe>' command to see these paths) or from the environment variable 'LD_LIBRARY_PATH'. With clusters, the shared object must be accessable from each node so make sure its available locally (or via NFS) on the node. If it's in a different path, then you'll need add this path to "LD_LIBRARY_PATH' variable, typically in your shell rc file (i.e. .cshrc, .shrc, .bashrc, etc.).

Also, so long as your compiling on a homogenous system, you can compile statically by setting 'libs = -Bstatic' and removing libpgc.so from the link line.

Hope this helps,
Mat
Back to top
View user's profile
tleighton



Joined: 21 Dec 2004
Posts: 3

PostPosted: Wed Aug 24, 2005 10:11 am    Post subject: Success! Reply with quote

Thanks for the help Mat!

I moved the libpgc.so file to /usr/local/libs, a place all the nodes can reach, and changed the Makefile accordingly. That did the trick and I now have a working MPI code!

Thanks again!

Todd
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