Adding shared libraries environment path / common runtime errors

Compile example:

gcc -o foo foo.c -I/opt/intel/mkl/
-L/opt/intel/mkl/ -lmkl_intel ... <other MKL libs>
Results in runtime error when loading shared libraries during execution:

./foo: error while loading shared libraries cannot open shared object file

No such file or directory

Before using the Intel® MKL shared libraries, update the system variable LD_LIBRARY_PATH to include the libraries location. For example, if the Intel MKL libraries are in the /opt/intel/mkl/ directory then the following command line can be used (assuming a bash shell):

export LD_LIBRARY_PATH=/opt/intel/mkl/$LD_LIBRARY_PATH
For more complete information about compiler optimizations, see our Optimization Notice.