Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] Dynamic libraries in OpenMPI
From: Prentice Bisbal (prentice_at_[hidden])
Date: 2010-05-07 13:47:52


Miguel Ángel Vázquez wrote:
> Dear all,
>
> I am trying to run a C++ program which uses dynamic libraries under mpi.
>
> The compilation command looks like:
>
> mpiCC `pkg-config --cflags itpp` -o montecarlo montecarlo.cpp
> `pkg-config --libs itpp`
>
> And it works if I executed it in one machine:
>
> mpirun -np 2 -H localhost montecarlo
>
> I tested this both in the "master node" and in the "compute nodes" and
> it works. However, when I try to run it with two different machines:
>
> mpirun -np 2 -H localhost,hpcnode1 montecarlo
>
> The program claims that it can't find the shared libraries:
>
> montecarlo: error while loading shared libraries: libitpp.so.6: cannot
> open shared object file: No such file or directory
>
> The LD_LIBRARY_PATH is set properly at every machine, any idea where the
> problem is? I attached you the config.log and the result of the omp-info
> --all
>
> Thank you in advance,
>
> Miguel

Miguel,

Shells behave differently depending on whether it is an interactive
login shell or a non-interactive shell. For example, the bash shell uses
.bash_profile in case, but .bashrc in the other. Check the documentation
for your shell and see what files it uses in each case, and make sure
the non-login config file has the necessary settings for your MPI jobs.
 It sounds like your login shell environment is okay, but your non-login
environment isn't setup correctly. This is a common problem.

I use bash, and to keep it simple, my .bash_profile is just a symbolic
link to .bashrc. That way, both shell types have the same environment.
This isn't always a good idea, but in my case it's fine.

-- 
Prentice