I would like to install openmpi from repository and need to use it with GCC. The problem is I have installed intel libraries too and it causes problems like this:
mpicc.openmpi --version
mpicc.openmpi: error while loading shared libraries: libimf.so: cannot open shared object file: No such file or directory
Version of my GCC is:
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609
I'm trying to install openmpi with following command:
sudo aptitude install openmpi-bin libopenmpi-dev
So, how can I install OpenMPI from repositories in the way which would ignore intel libraries and use only GCC?
EDIT
which mpicc.openmpi
/usr/bin/mpicc.openmpi
ldd $(which mpicc.openmpi)
linux-vdso.so.1 => (0x00007fffd6fc0000)
libopen-pal.so.13 => /usr/local/lib/libopen-pal.so.13 (0x00007f9b0c8d0000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9b0c6b3000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9b0c2e9000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9b0bfe0000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9b0bddc000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f9b0bbd3000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f9b0b9d0000)
libimf.so => not found
libsvml.so => not found
libirng.so => not found
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9b0b7b9000)
/lib64/ld-linux-x86-64.so.2 (0x000056030ed59000)
libintlc.so.5 => not found
I've installed intel package Intel® Parallel Studio XE | Intel® Software manually (i.e., ./install_gui.sh).
EDIT 2
I tried to reinstall OpenMPI with
sudo apt-get install --reinstall openmpi-bin libopenmpi-dev
and with
sudo apt-get purge openmpi-bin libopenmpi-dev
sudo apt-get install openmpi-bin libopenmpi-dev
but none of them had the desired effect, library still links against intel libraries.
Intel libraries are located in /opt/intel.
EDIT 3
ls -l /usr/bin/mpicc.openmpi /usr/bin/opal_wrapper; apt-cache policy openmpi-bin libopenmpi-dev
lrwxrwxrwx 1 root root 12 Feb 25 2016 /usr/bin/mpicc.openmpi -> opal_wrapper
-rwxr-xr-x 1 root root 18928 Feb 25 2016 /usr/bin/opal_wrapper
apt-cache policy openmpi-bin libopenmpi-dev
openmpi-bin:
Installed: 1.10.2-8ubuntu1
Candidate: 1.10.2-8ubuntu1
Version table:
*** 1.10.2-8ubuntu1 500
500 http://at.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
100 /var/lib/dpkg/status
libopenmpi-dev:
Installed: 1.10.2-8ubuntu1
Candidate: 1.10.2-8ubuntu1
Version table:
*** 1.10.2-8ubuntu1 500
500 http://at.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
100 /var/lib/dpkg/status