I have been trying to follow the advice for linking with MKL given on http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/. The tool indicates a single library search path (there referenced as $MKLPATH). However, in the installation I use, certain support libraries (notably libiomp5.so) are not in the same location as the MKL shared libraries, so GCC doesn't find them.
Can someone please confirm what the right way is to link with multi-threaded MKL libs on GNU/Linux (GCC). Specifically, I'm trying to figure out whether I need to carry around two distinct library search paths for MKL, or whether a single path (with different subdirs for support libs and MKL libs) would be enough.
Yes, it's normal to add both the MKL library directory and the one where libiomp5 is located to the search path. If you use -fopenmp in the gcc, you must put the libiomp5 search path ahead of the libgomp path.