Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] mpirun links wrong library with BLACS tester
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2010-01-29 07:55:16


Doh! Sorry about that. :-(

We took extra effort in Open MPI to try to obey serialized precedents. That is, when we're discussing some feature X, we frequently ask ourselves, "What would happen if you tried to do X with no MPI/parallelization involved?" Meaning: what would happen if you ran this in serial without Open MPI?

The "foo" vs. "./foo" is a perfect example of this. If you type an executable name on the command line, the shell searches your PATH for the first match. It depends on where "." is in your PATH as to whether it finds /bin/foo or ./foo first (for example). So we try to obey the same semantics with mpirun -- the difference between "mpirun foo" and "mpirun ./foo" is exactly the same: we obey the ordering of where "foo" is found in the PATH.

Although I'm glad you figured it out, I'm sorry this caused you extra time. :-(

On Jan 28, 2010, at 12:50 PM, Fawzi Mohamed wrote:

>
> On 28-gen-10, at 12:35, Jeff Squyres (jsquyres) wrote:
>
> > What was blacs compiled against, lam or ompi?
> >
> > What is your LD_LIBRARY_PATH set to?
> >
> > Are you ensuring to use ompi's mpirun (vs, for example, lam's mpirun)
> >
> yes everything was ok, I had tried everything I could think of, rpath,
> --prefix,... everything and was really getting mad.
> I spent an inordinate amount of time on this, and now that I realized
> what it was I just want to hit myself.
> On that machine someone just installed all the blacs and scalapack
> tests in /usr/bin.
> I was doing
> mpirun -np 8 xFbtest_MPI-LINUX-0
> instead of
> mpirun -np 8 ./xFbtest_MPI-LINUX-0
> so mpirun was using the version in /usr/bin but
> mpirun -np 1 env
> mpirun -np 1 ldd xFbtest_MPI-LINUX-0
> and so on did return correct things.
>
> As initially I tested only the blacs and scalapack things it took me a
> long time to figure out.
> Yesterday before posting I tested the ompi examples and to my surprise
> they did work.
> Probably those time that it worked I had typed ./ without really
> realizing it.
>
> Anyway sorry for the noise, a really stupid mistake that had nothing
> to do with ompi
>
> ciao
> Fawzi
> >
> > -jms
> > Sent from my PDA. No type good.
> >
> > ----- Original Message -----
> > From: users-bounces_at_[hidden] <users-bounces_at_[hidden]>
> > To: users_at_[hidden] <users_at_[hidden]>
> > Sent: Wed Jan 27 21:11:21 2010
> > Subject: [OMPI users] mpirun links wrong library with BLACS tester
> >
> > I have installed openmpi 1.4.1 locally for one user on a cluster,
> > where some other mpi were installed.
> >
> > when I try to run an executable through mpirun (I am running the BLACS
> > tester) I get
> > xFbtest_MPI-LINUX-0: error while loading shared libraries: liblam.so.
> > 0: cannot open shared object file: No such file or directory
> >
> > if I run the executable it works
> > ldd always shows the correct libraries (even when run in mpirun) and
> > no liblam
> > also the environment looks normal in both cases (both PATH and
> > LD_RUN_PATH have the installation as first path).
> > I did try to set -rpath to */lib and */lib/openmpi, and generally
> > reduce the environment to a basic one, and use that in all the shells
> > both when compiling and running, but to no avail.
> > The examples in the openmpi directory seem to work without problems.
> > I did manage to run the blacs tester, but in no reproducible way (I
> > really don't know what I did to make it work and it stopped working
> > really fast (the same binary)).
> > The same setup works in another machine (and I think BLACS flags are
> > ok)
> >
> > I am getting really crazy, any pointer at what else I could try would
> > be greatly appreciated.
> >
> > gcc (GCC) 4.1.2 20071124 (Red Hat 4.1.2-42)
> > G95 (GCC 4.0.3 (g95 0.92!) Jun 24 2009)
> >
> > thanks
> > Fawzi
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>

-- 
Jeff Squyres
jsquyres_at_[hidden]