HPC/Applications/mkl: Difference between revisions

From CNM Wiki
Jump to navigation Jump to search
m (migrated from internal wiki)
 
mNo edit summary
Line 1: Line 1:
* [http://software.intel.com/en-us/articles/intel-math-kernel-library-documentation/ Intel Math Kernel Library - Full Documentation]
** Release notes, User guides etc.
* since v10 includes the formerly separate Cluster MKL (providing ScaLapack et al.)
* provides BLAS, Lapack, ScaLapack, FFTs (including an [http://www.intel.com/software/products/mkl/docs/fftw3xmkl_notes.htm FFTW interface])
* [http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ '''Link line advisor''']
** [http://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-for-linux-linking-applications-with-intel-mkl-version-100/ alternate (static text)]


* [http://software.intel.com/en-us/articles/intel-math-kernel-library-documentation/ Intel Math Kernel Library - Documentation]
== Carbon specifics ==


== User Notes ==
* Avoid specifying absolute library paths in your Makefile unless you wish to select a specific version. The user environment is normally correctly set up.
 
* Loading the MKL module does not yet tell the linker where to find the library. The most convenient place is to modify the Makefile similar to the following:
* [http://www.intel.com/software/products/mkl/docs/linux/WebHelp/userguide.htm User's Guide] – consult Sec. 5 to resolve linker issues, and 32bit vs. 64bit programming
LDFLAGS += -L$MKLROOT/lib/em64t
* [http://www.intel.com/software/products/mkl/docs/WebHelp/mklrefman.htm Reference Manual]
or, starting with 10.3.x:
* since v10 includes formerly separate Cluster MKL (providing ScaLapack et al.)
LDFLAGS += -L$MKLROOT/lib/intel64
* provides BLAS, Lapack, ScaLapack, FFTs (including an [http://www.intel.com/software/products/mkl/docs/fftw3xmkl_notes.htm FFTW interface])
* Link examples:
* [http://support.intel.com/support/performancetools/libraries/mkl/linux/sb/CS-028423.htm Detailed linking instructions]; [http://software.intel.com/en-us/articles/intel-math-kernel-library-intel-mkl-for-linux-linking-applications-with-intel-mkl-version-100/ alternate link]
* Link example:
   # Sequential:
   # Sequential:
     -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread
     -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread
Line 22: Line 26:
  -lfftw3xf_intel
  -lfftw3xf_intel
Choose the appropriate version between bindings for FFTW v2 vs. v3 and C vs. Fortran.
Choose the appropriate version between bindings for FFTW v2 vs. v3 and C vs. Fortran.
*  Avoid specifying absolute library paths in your Makefile unless you wish to select a specific version.  The user environment is normally correctly set up.  To force the library version current at the time of writing, add as first flag to the linker options:
<code>-L$MKLROOT/lib/em64t</code>. The variable <code>$MKLROOT</code>is automatically provided.
* see [[HPC/Carbon_Cluster_-_Getting_started#Example_job_file]] for controlling OpenMP execution.
* see [[HPC/Carbon_Cluster_-_Getting_started#Example_job_file]] for controlling OpenMP execution.

Revision as of 21:16, May 20, 2011

Carbon specifics

  • Avoid specifying absolute library paths in your Makefile unless you wish to select a specific version. The user environment is normally correctly set up.
  • Loading the MKL module does not yet tell the linker where to find the library. The most convenient place is to modify the Makefile similar to the following:
LDFLAGS += -L$MKLROOT/lib/em64t

or, starting with 10.3.x:

LDFLAGS += -L$MKLROOT/lib/intel64
  • Link examples:
 # Sequential:
   -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread
 # OpenMP multi-threaded:
   -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread
  • The FFTW interface of the MKL can be linked by prefixing the above options with one of:
-lfftw2xc_intel
-lfftw2xf_intel
-lfftw3xc_intel
-lfftw3xf_intel

Choose the appropriate version between bindings for FFTW v2 vs. v3 and C vs. Fortran.