-
shared libraries
Just downloaded and installed OPEN-MPI.
I am having some problem in linking the shared library file libmpi.so.0
Code:
# whereis libmpi
libmpi: /usr/local/lib/libmpi.la /usr/local/lib/libmpi.so
# mpicc sample2.c -L//usr/local/lib -lmpi
# mpirun -np 2 a.out
a.out : error while loading shared libraries : libmpi.so.0 :cannot open shared object file: No such file or directory
What is wrong here?
-
Possibly libmpi.la is corrupted?
-
try this:
Code:
cd /usr/local/lib/
ln -s libmpi.so{,.0}
-
Be sure /usr/local/lib is in the /etc/ld.so.conf file. Perspecitve is on the right track. It looks as if your install procedure left loose ends....
It did complete with no errors?
-
@CornedBee : I have downloaded the latest stable release.I dont think thats the case.
@Perspective : yeah, i tried that. it says the file already exists.
@ jim : yeah, it didnt give any errors. But that file doesnot contain /usr/local/lib. I added it manually. But, still i got the same when i tried running my program.
PS: Sorry for the delay
EDIT: what's even more confusing is that, the same verison is working well in SUSE 10.0. But, I get this error in CENTOS.
-
Post the contents of the .la. It's a text file (shell script actually).