[lammps-users] runtime error

hi everybody. i installed lammps on my fc9 x86_64 bit machine. executable named lmp_opempi is generated but while i was trying to run it by ./lmp_openmpi<input.txt it is saying error while loading shared libraries:libmpi_cxx_so.0:cant open shared object file:no such file or directory. i have installed openmpi also. can anybody help me out?

Hi,

You have to export LD_LIBRARY_PATH properly, i.e., the output of
'echo $LD_LIBRARY_PATH'
should include your <openmpi>/lib path.

Hope it helps,
Ferdinand

One alternative is to use a linker flag to build a static executable
that doesn't do the shared-library load at run-time. This will
force you to link against the openmpi lib and verify that your
Makefile.foo can find it.

Steve

One alternative is to use a linker flag to build a static executable
that doesn't do the shared-library load at run-time. This will
force you to link against the openmpi lib and verify that your
Makefile.foo can find it.

this error should not happen, if openmpi is installed correctly.
on fedora, you have to install 3(!) packages (via yum or its gui):
openmpi, openmpi-libs, and openmpi-devel.

if you install all of them and their dependencies
(as well as fftw2-devel) and then compile lammps with:

make openmpi

it should magically work. it does for me on a number of
fedora machines from fedora 6 to fedora 10.

fully static linkage on linux with recent c-libraries is a
bad idea and only should be avoided if possible.

cheers,
   axel.

thank you for the reply ferdinand your suggestion actually worked out.what i did was this at the terminal export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib but i have to do this every time i open the terminal. i believe there is way where i have to do this again and again but i dont know how to do it. somebody can suggest this.
My simulation is running and giving some output though i am sure of the validity of the output. at this stage i believe it is correct but at the end of the simulation it is giving some error message and saying segmentation fault but my simulation is completed. shall i ignore the error? what should i do like?

Do the following:

  1. Login as root.

  2. Either a file or a directory will exist with the name ld.so.conf in /etc
    Add the line “/usr/local/lib”
    to (i) /etc/ld.so.conf if it is a file
    (ii) /etc/ld.so.conf/somename.conf, if /etc/ld.so.conf is a directory.

  3. type in /sbin/ldconfig -v (if you dont want to reboot your machine).

From the next boot onwards it should work automagically.

Manoj

2009/7/9 udayagiri sai babu <udayagiri3@…1125…>

Hi,

given that you don't have root access and installed openmpi in you home
(see post of Manoj), you can automatically execute the export command
upon login, e.g., by adding it to your ~/.bashrc .

Ferdinand