1

I am currently working on a simple data synchonizer in a mixture of Fortran and C/C++ by using OpenMPI libraries. The synchonizer compiles and links correctly, as far as I can see:

f95 -o fortran_mpi_test *.o -L/usr/lib/gcc/x86_64-redhat-linux/4.1.1/ 
    -L/usr/lib64/openmpi/1.4-gcc/lib/ -lmpi -lmpi_cxx -lstdc++

But when I execute the resulting executable on the same machined I get an error stating that one of the shared libraries is not found. That is confirmed by ldd. Nevertheless the missing library libmpi_cxx.so.0 is located in one of the specified folders.

Could anyone give me a hint what I could have done wrong?

user946924
  • 65
  • 6

1 Answers1

0

Check your environment variables. If your LIBRARY_PATH, LD_LIBRARY_PATH or similar vars have gotten out of sync or set to silly values you might not be searching the same directories for static libraries as you do for dynamics.

Also check out the ld.so manpage

zmccord
  • 2,398
  • 1
  • 18
  • 14