[mpich-discuss] Need help with "Error while loading shared libraries"when starting MPIRUN

Anthony Chan chan at mcs.anl.gov
Fri Sep 12 10:01:23 CDT 2008


----- "Alex Loh" <alexloh80 at gmail.com> wrote:

> I am using MPICH 1.2.7p1 so neither of these parameters are available.
> I am quite certain that LD_LIBRARY_PATH is the problem so how was this
> set properly in MPICH1?
> 

in mpich1's install doc/, there should be a document called mpichman-chp4.pdf.
The document should tell you how LD_LIBRARY_PATH is handled by mpich1.
You could write a MPI program to print each process's LD_LIBRARY_PATH
using getenv() to confirm if LD_LIBRARY_PATH is passed correctly to each process.
If that does not work, try link your application with -rpath to hardwire
the shared library path.

In MPICH2, you don't need to write any program to check if LD_LIBRARY_PATH
is passed correct, you can simply do "mpiexec -n 2 env | grep LD_LIBRARY_PATH".
Another reason you should upgrade to MPICH2.

A.Chan
> 
> All of my software have been tested running (for many years) on
> version 1 before I recently took over so I am very reluctant to
> upgrade to MPICH2.
> My mpichversion returns:
> MPICH Version: 1.2.7p1
> MPICH Release date: $Date: 2005/11/04 11:54:51$
> MPICH Patches applied: none
> MPICH configure: -prefix=/u/alexloh/mpich127 MPICH Device: ch_p4
> 
> I am on a Linux machine, Ubuntu (ver 6 i think).
> 
> 
> 
> 
> Thanks,
> Alex Loh.
> 
> 
> 
> 
> On Fri, Sep 12, 2008 at 1:39AM, ddkrause < ddkrause at uni-bonn.de >
> wrote:
> 
> 
> 
> 
> 
> Alex Loh wrote:
> > Hi all,
> >
> > I have an MPI program which runs well with -np 1, but when I try to
> > run it in parallel (-np 2), it crashes with the message:
> >
> > "error while loading shared libraries: libcode_unified.so.2: cannot
> > open shared object file: No such file or directory
> > p0_26145: p4_error: Child process exited while making connection to
> > remote process on <hostname>: 0
> > p0_26145: (2.105343) net_send: could not write to fd=4, errno = 32"
> >
> > libcode_unified.so.2 is a library that my program needs in order to
> run.
> >
> > I read that this is related to the LD_LIBRARY_PATH, but I am sure
> that
> > my environment is set correctly. I have it exported in .bash_profile
> > which I believe works for non-interactive logins. I have also wrote
> > small test programs to echo the value of LD_LIBRARY_PATH and these
> > display the correct path to find the library file. My small test
> > programs (that don't use libraries) also run well in parallel.
> >
> > Does anyone have any ideas?
> >
> >
> > Thanks,
> > Alex Loh.
> Did you try to pass LD_LIBRARY_PATH to the program by means of the
> -genv
> or -genvlist switches?
> 
> Regards,
> Dorian Krause




More information about the mpich-discuss mailing list