Warnett, Jason wrote:
Hello

I am running on Linux, latest version of mpi built but I've run into a few issues with a program which I am trying to run. It is a widely used open source application called LIGGGHTS so I know the code works and should compile, so I obviously have a setting wrong with MPI. I saw a similar problem in a previous post (2007), but couldn't see how to resolve it as I am quite new to the terminal environment in Unix (always been windows... until now).

So the issue I am getting is the following error...

[Jay@Jay chute_wear]$ mpirun -np 1 lmp_fedora < in.chute_wear
lmp_fedora: error while loading shared libraries: libmpi_cxx.so.0: cannot open shared object file: No such file or directory

So I checked where stuff was pointing using the ldd command as in that post and found the following:
        linux-gate.so.1 =>  (0x00d10000)
        libmpi_cxx.so.0 => not found
        libmpi.so.0 => not found
        libopen-rte.so.0 => not found
        libopen-pal.so.0 => not found
        libdl.so.2 => /lib/libdl.so.2 (0x00cbe000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x007e6000)
        libutil.so.1 => /lib/libutil.so.1 (0x009fa000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x04a02000)
        libm.so.6 => /lib/libm.so.6 (0x008a4000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00110000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00550000)
        libc.so.6 => /lib/libc.so.6 (0x003b3000)
        /lib/ld-linux.so.2 (0x00bfa000)

so it is the open mpi files it isn't linking to. How can i sort this? I shouldn't need to edit code of the executable of LIGGGHTS I've compiled as I know other people are using the same thing so I guess it is to do with the way I installed openMPI. I did a system search and couldn't find a file called libmpi* anywhere... so my guess is that I've incorrectly installed. I have tried several ways, but could you tell me how to fix it/ install correctly? (embaressing if it is to do with a correct install...)

Thanks

Jay

Hi Jay

You must set the LD_LIBRARY_PATH (in your .bashrc/.cshrc file)
to include the OpenMPI 'lib' directory. Something like

(for csh)
setenv LD_LIBRARY_PATH /path/to/openmpi/lib:$LD_LIBRARY_PATH

(for bash)
export LD_LIBRARY_PATH=/path/to/openmpi/lib:$LD_LIBRARY_PATH

Likewise, PATH should include the OpenMPI 'bin' directory.
See the OpenMPI FAQ for details:
http://www.open-mpi.org/faq/

Also, before trying more complex codes, I suggest that you test
your OpenMPI functionality with the simple example programs
that come in the OpenMPI 'examples' directory: hello_c.c, ring_c.c,
and connectivity_c.c.
It will save you many headaches.
Ex:
mpicc -o hello_c hello_c.c
then
mpirun -np 4 hello_c

How did you compile LIGGGHTS?
Did you use the OpenMPI compiler wrappers?

You say 'latest version of mpi built'.
Did you build OpenMPI from source?
Got it via yum perhaps?
Did you use the mpi compiler wrappers (mpicc,mpif90,etc)
*from OpenMPI* to build the application (LIGGGHTS)?

Is this a single machine or a cluster?

Are you sure LIGGGHTS runs in parallel mode with a single process?
You said 'mpirun -np 1 lmp_fedora < in.chute_wear'.
Wouldn't it need at least two processes, perhaps?
'mpirun -np 2 lmp_fedora < in.chute_wear'

I hope this helps,
Gus Correa

Reply via email to