Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

Install OpenMPI from repository with GCC instead of Intel

Writer Emily Wong

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 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 xenial/universe amd64 Packages 100 /var/lib/dpkg/status
2

1 Answer

  • As it seems, the Intel mpicc.openmpi overwrote the official one from repository or one of its linked libraries.

    Here is my output of a official install from repository:

     ~$ dpkg -S /usr/bin/mpicc.openmpi libopenmpi-dev: /usr/bin/mpicc.openmpi ~$ ldd /usr/bin/mpicc.openmpi linux-vdso.so.1 => (0x00007ffd785f4000) libopen-pal.so.13 => /usr/lib/libopen-pal.so.13 (0x00007ff1d848d000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff1d8270000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff1d7ea6000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff1d7ca2000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff1d7a9a000) libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007ff1d7896000) libhwloc.so.5 => /usr/lib/x86_64-linux-gnu/libhwloc.so.5 (0x00007ff1d765c000) /lib64/ld-linux-x86-64.so.2 (0x000056499326f000) libnuma.so.1 => /usr/lib/x86_64-linux-gnu/libnuma.so.1 (0x00007ff1d7450000) libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007ff1d7246000)

    It does not relay on those missing libraries.

  • To fix it you can reinstall libopenmpi:

     sudo apt-get install --reinstall openmpi-bin libopenmpi-dev
  • Also notice /usr/local/lib/libopen-pal.so.13. It's in /usr/local/lib/ folder so it has higher priority then official one in /usr/lib/, compatibility may be broken.

    Check for all sub-versions using

     ls -l /usr/local/lib/libopen-pal.so.13*

    then rename them, example

     sudo mv /usr/local/lib/libopen-pal.so.13 /usr/local/lib/libopen-pal.so.13.backup
6

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy