Configuring Your Development Environment 41. If the tool-chain/compiler integr<strong>at</strong>ion supports include p<strong>at</strong>h options, go to theIncludes tab of the C/C++ General > P<strong>at</strong>hs <strong>and</strong> Symbols property page <strong>and</strong> setthe <strong>Intel</strong> MKL include p<strong>at</strong>h, for example, the default value is/opt/intel/mkl/10.0.xxx/include, where xxx is the <strong>Intel</strong> MKL package number,such as "039".2. If the tool-chain/compiler integr<strong>at</strong>ion supports library p<strong>at</strong>h options, go to the LibraryP<strong>at</strong>hs tab of the C/C++ General > P<strong>at</strong>hs <strong>and</strong> Symbols property page <strong>and</strong> set ap<strong>at</strong>h to the <strong>Intel</strong> MKL libraries, depending upon the target architecture, for example,with the default install<strong>at</strong>ion, /opt/intel/mkl/10.0.xxx/lib/em64t3. For a particular build, go to the Tool Settings tab of the C/C++ Build > Settingsproperty page <strong>and</strong> specify names of the <strong>Intel</strong> MKL libraries to link with yourapplic<strong>at</strong>ion, for example, mkl_solver_lp64 <strong>and</strong> mkl_core (As compilers typicallyrequire library names r<strong>at</strong>her than library file names, the "lib" prefix <strong>and</strong> "a"extension are omitted). See section “Selecting Libraries to Link” in chapter 5 on thechoice of the libraries. The name of the particular setting where libraries are specifieddepends upon the compiler integr<strong>at</strong>ion.Note th<strong>at</strong> the compiler/linker will autom<strong>at</strong>ically pick up the include <strong>and</strong> library p<strong>at</strong>hssettings only in case the autom<strong>at</strong>ic makefile gener<strong>at</strong>ion is turned on, otherwise, you willhave to specify the include <strong>and</strong> library p<strong>at</strong>hs directly in the makefile to be used.Configuring Eclipse CDT 3.xTo configure Eclipse CDT 3.x to link with <strong>Intel</strong> MKL, follow the instructions below:• For St<strong>and</strong>ard Make projects,1. Go to C/C++ Include P<strong>at</strong>hs <strong>and</strong> Symbols property page <strong>and</strong> set the <strong>Intel</strong> MKLinclude p<strong>at</strong>h, for example, the default value is/opt/intel/mkl/10.0.xxx/includewhere xxx is the <strong>Intel</strong> MKL package number, for instance, "039".2. Go to the Libraries tab of the C/C++ Project P<strong>at</strong>hs property page <strong>and</strong> set the<strong>Intel</strong> MKL libraries to link with your applic<strong>at</strong>ions, for example,/opt/intel/mkl/10.0.xxx/lib/em64t/libmkl_lapack.a <strong>and</strong>/opt/intel/mkl/10.0.xxx/lib/em64t/libmkl_core.a. See section“Selecting Libraries to Link” in chapter 5 on the choice of the libraries.Note th<strong>at</strong> with the St<strong>and</strong>ard Make, the above settings are needed for the CDT internalfunctionality only. The compiler/linker will not autom<strong>at</strong>ically pick up these settings <strong>and</strong>you will still have to specify them directly in the makefile.• For Managed Make projects, you can specify settings for a particular build. To do this,4-3
4 <strong>Intel</strong>® M<strong>at</strong>h Kernel Library User’s Guide1. Go to the Tool Settings tab of the C/C++ Build property page. All the settingsyou need to specify are on this page. Names of the particular settings dependupon the compiler integr<strong>at</strong>ion <strong>and</strong> therefore are not given below.2. If the compiler integr<strong>at</strong>ion supports include p<strong>at</strong>h options, set the <strong>Intel</strong> MKL includep<strong>at</strong>h, for example, the default value is /opt/intel/mkl/10.0.xxx/include.3. If the compiler integr<strong>at</strong>ion supports library p<strong>at</strong>h options, set a p<strong>at</strong>h to the <strong>Intel</strong>MKL libraries, depending upon the target architecture, for example, with thedefault install<strong>at</strong>ion, /opt/intel/mkl/10.0.xxx/lib/em64t.4. Specify names of the <strong>Intel</strong> MKL libraries to link with your applic<strong>at</strong>ion, for example,mkl_lapack <strong>and</strong> mkl_ia32 (As compilers typically require library names r<strong>at</strong>herthan library file names, the “lib” prefix <strong>and</strong> “a” extension are omitted). Seesection “Selecting Libraries to Link” in chapter 5 on the choice of the libraries.Customizing the Library Using the Configur<strong>at</strong>ion File<strong>Intel</strong> MKL configur<strong>at</strong>ion file provides the possibility to redefine names of dynamic libraries.You may cre<strong>at</strong>e a configur<strong>at</strong>ion file with the mkl.cfg name to assign values to a number ofvariables. Below is an example of the configur<strong>at</strong>ion file containing all possible variableswith their default values:Example 4-1 <strong>Intel</strong>® MKL configur<strong>at</strong>ion file//// Default values for mkl.cfg file//// SO names for IA-32 architectureMKL_X87so = mkl_def.soMKL_SSE2so = mkl_p4.soMKL_SSE3so = mkl_p4p.soMKL_VML_X87so = mkl_vml_def.soMKL_VML_SSE2so = mkl_vml_p4.soMKL_VML_SSE3so = mkl_vml_p4p.so// SO names for <strong>Intel</strong>(R) 64 architectureMKL_EM64TDEFso = mkl_def.soMKL_EM64TSSE3so = mkl_p4n.soMKL_VML_EM64TDEFso = mkl_vml_def.soMKL_VML_EM64TSSE3so = mkl_vml_p4n.so4-4