The following provides the information on linking Intel® Math Kernel Library with Apple* Xcode* development environment. In this article, the Intel Parallel Studio XE 2017 beta with Math Kernel Library 2017 beta and Xcode 7.3.1 will be discussed as an example.
Step 1: Create new application
Step 2: Enable using Intel C/C++ Compiler (ICC)
Step 3: Set path of Intel MKL and link with MKL
Note1: For the Intel® MKL for Mac OS* package, the Intel® MKL static and dynamic libraries are installed in the same directory / Libraries or /lib. And the static and dynmaic libraries use same name, for example, libmkl_core.dylib and libmkl_core.a . If use -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core, the standard linker used by Xcode* first chooses a dynamic library over a static library. So if you need to use static, please link to the static libraries by using the full path and library name. e.g $MKLROOT/Libraries/em64t/libmkl_core.a.
Note2: If you link dynamic library for libmkl_intel.dylib, libiomp5.dylib, you may need to set the DYLD_LIBRARY_PATH environment variable in the Xcode environment.
Step 4 (Optional): Set environment variables for MKL
* For linking with OpenMP threading library, please refer the article dyld:Library not loaded:libiomp5.dylib
Since MKL 10.x, Intel Compiler for Mac OS intergate MKL as part of product.
And refer to "Linking Your Application with Intel® MKL" section in the Getting Started document to understand which libraries required by your code.
1. How to link application against Intel MKL using XCode IDE - Manual link, please see the article: How to link application against Intel MKL using XCode IDE
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.
Notice revision #20110804