- Infos im HLRS Wiki sind nicht rechtsverbindlich und ohne Gewähr -
- Information contained in the HLRS Wiki is not legally binding and HLRS is not responsible for any damages that might result from its use -
MKL: Difference between revisions
From HLRS Platforms
Jump to navigationJump to search
No edit summary |
No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Infobox software | {{Infobox software | ||
| description =Intel® '''Math Kernel Library''' (MKL) is a library of optimized math routines for science, engineering, and financial applications. Core math functions include BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms and Vector Math. | | description =Intel® '''Math Kernel Library''' (MKL) is a library of optimized math routines for science, engineering, and financial applications. Core math functions include BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms and Vector Math. | ||
| logo = [[Image:intel-logo.png]] | |||
| developer = Intel | | developer = Intel | ||
| available on = [[NEC | | available on = [[Vulcan (NEC Cluster)]] | ||
| category = [[:Category:Numerical Library | Numerical Library]] | | category = [[:Category:Numerical Library | Numerical Library]] | ||
| license = Commercial | | license = Commercial | ||
Line 8: | Line 9: | ||
}} | }} | ||
== | === Using MKL on Vulcan (NEC cluster) === | ||
This example shows the basic steps when using MKL. | |||
Load the necessary module. For example: | |||
<pre> | |||
module load compiler/intel | |||
module load numlib/intel # set up MKL environment | module load numlib/intel/mkl # set up MKL environment | ||
module load mpi/impi # if MPI needed | |||
module load mpi/impi # MPI needed | </pre> | ||
=== Example === | === Example === | ||
{{File|filename = example_blas.f90 | {{File|filename = example_blas.f90 | ||
Line 57: | Line 48: | ||
}} | }} | ||
=== Compilation example === | |||
ifort example_blas.f90 -L$ | <pre> | ||
: - | ifort -c example_blas.f90 -o example_blas.o | ||
ifort -L$MKLROOT/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -openmp5 -lpthread example_blas.o | |||
</pre> | |||
To see what libraries are recommended for a particular use case, visit: | |||
* [http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ Intel® MKL Link Line Advisor] | |||
== See also == | == See also == | ||
* [[Software Development Tools, Compilers & Libraries]] | * [[Software Development Tools, Compilers & Libraries]] | ||
Line 69: | Line 64: | ||
== External links == | == External links == | ||
* [http://software.intel.com/en-us/intel-mkl/ Intel® MKL homepage] | * [http://software.intel.com/en-us/intel-mkl/ Intel® MKL homepage] | ||
* [http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ Intel® MKL Link Line Advisor] | |||
[[Category:Numerical Library]] | [[Category:Numerical Library]] |
Latest revision as of 11:38, 18 August 2021
Intel® Math Kernel Library (MKL) is a library of optimized math routines for science, engineering, and financial applications. Core math functions include BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms and Vector Math. |
|
Using MKL on Vulcan (NEC cluster)
This example shows the basic steps when using MKL.
Load the necessary module. For example:
module load compiler/intel module load numlib/intel/mkl # set up MKL environment module load mpi/impi # if MPI needed
Example
File: example_blas.f90
program example_blas implicit none real, dimension(3) :: a = (/2.,1.,-1./), b = (/5., -2., 1.5/) real :: c, sdot real(kind=8) :: d, dnrm2 ! *** skalar product *** ! sdot: s ... REAL, dot ... skalar product ! 1. Argument ... dimensions of the vectors ! 2. und 4. A. ... the vectors ! 3. und 5. A. ... increment (here 1) c = sdot(3, a, 1, b, 1) write(*,*) c ! Result: 6.500000 ! *** norm of the vectors *** ! dnrm2: d ... DOUBLE PRECISION, nrm2 ... (euklidian) norm ! 1. Argument: dimensions of the vectors ! 2. A.: vektor ! 3. A.: increment (here 1) d = dnrm2(3, dble(a), 1) write(*,*) d ! Result: 2.44948974278318 end program example_blas
Compilation example
ifort -c example_blas.f90 -o example_blas.o ifort -L$MKLROOT/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -openmp5 -lpthread example_blas.o
To see what libraries are recommended for a particular use case, visit: