PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Pre-compile MPICH in PGI 10.1 can't find libmpich.so?

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Licenses and Installation
View previous topic :: View next topic  
Author Message
danishyo



Joined: 12 Mar 2007
Posts: 12

PostPosted: Thu Feb 04, 2010 12:00 am    Post subject: Pre-compile MPICH in PGI 10.1 can't find libmpich.so? Reply with quote

Hi,

I upgrade PGI from 8.0 to latest version(10.1) on CentOS 5.4 64bit.
8.0 works fine include Pre-compile MPICH on this machine.
10.1 also works fine except pre-compile MPICH.
I copy examples in /opt/pgi/linux86/2010/mpi/mpich and compile by makefile without any error messages.
However, when I try to mpirun, the error message shows like:

/home/danish/examples/cpi: error while loading shared libraries: libmpich.so: cannot open shared object file: No such file or directory

libmpich.so is in /opt/pgi/linux86/2010/mpi/mpich/lib and I also check path in mpirun script, the path is OK.

If I try to build with static binding by -Bstatic, mpirun goes well.

Any ideas how to fix this?
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Feb 04, 2010 10:14 am    Post subject: Reply with quote

Hi danishyo,

You need to set your LD_LIBRARY_PATH environment variable to include the MPICH lib directory. For remote nodes, this may mean that you need to set it your default environment (i.e. in your .cshrc or .bashrc file), or create a wrapper script which first sets the environment before calling your applications and then use mpirun to run the script.

However, if you're building and running on the same cluster and don't need to use shared libraries, it would be easier to just compile statically and not have to worry about your environment.

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



Joined: 06 Jul 2009
Posts: 317
Location: Greenbelt, MD

PostPosted: Fri Feb 05, 2010 8:18 am    Post subject: Reply with quote

Just an FYI, but I recently hit this problem and it confused the heck out of me. I had LD_LIBRARY_PATH in my .tcshrc file and I even re-enabled it in the csh script that was failing.

I solved it by adding an LD_LIBRARY_PATH to .bashrc as, I believe, though I'm probably wrong, the PGI mpirun script is a /bin/sh script. Thus, when mpirun was called, it didn't look at my .tcshrc or import the current environment.

Though, there could be an mpirun flag that passes environment?
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Licenses and Installation 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