Intel® C++ Compiler for Linux* - Error while loading shared libraries: [shared lib]: cannot open shared object

If this error message references an Intel shared runtime library, such as libsvml.so, then this implies that the Linux* loader was not able to locate the library. First check that you have the Intel lib directory in your LD_LIBRARY_PATHenvironment variable. However, this can still be a problem when running a program where a new shell is created to run the program (such as MPICH). To fix this problem, link the Intel provided libraries statically with the -static-libcxa (for 10.x compiler and earlier versions only) or -static-intel flags or add the -rpathlinker option so the executables can find the libraries at runtime, for example:

icpc test.cpp -Xlinker -rpath -Xlinker <path to Intel libraries>

Path to Intel libraries depends on where you install the Intel compiler. The default paths to Intel libraries look like
9.1 compiler for IA-32: /opt/intel/cc/9.1/lib
9.1 compiler for Intel 64: /opt/intel/cce/9.1/lib
10.1.017 compiler for IA-32: /opt/intel/cc/10.1.017/lib
10.1.017 compiler for Intel 64: /opt/intel/cce/10.1.017/lib
11.0.069 compiler for IA-32: /opt/intel/Compiler/11.0/069/lib/ia32
11.0.069 compiler for Intel 64: /opt/intel/Compiler/11.0/069/lib/intel64

Note that anyone using a binary compiled with the -rpath option will need those libs to exist in that directory path as well, so you may have to redistribute the Intel provided libraries with your application.

 
Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.