3

I installed mpich-3.0.4 not in a default location. I installed it based on the mpich installer's guidance.

However when I try to run:

mpiexec -n 4 -f machinefile ./mpich-3.0.4/examples/cpi

It gives me an error, which is:

./mpitrial/official_examples/cpi: error while loading shared libraries: libmpich.so.3: cannot open shared object file: No such file or directory

I had set PATH and LD_LIBRARY_PATH. But is still gives me that error.

Finally I just typed:

sudo apt-get install mpich2

Afterwards, I can run the mpiexec without error.

Why did this happen?

Timo
  • 6,202
  • 1
  • 26
  • 28
Santosa Sandy
  • 195
  • 1
  • 2
  • 8

1 Answers1

4

Assuming you are installing mpich 3 from source, you need to provide --enable-shared option while configuring in order to create an so, which is shared library. See section 2.6 of the guide you linked. An example from my config.log:

./configure --prefix=/home/kcm92/mpich3-install --enable-shared
make && make install
Ketan Maheshwari
  • 9,054
  • 6
  • 40
  • 53