BLAS and LAPACK: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Created page with "{{Draft}} [http://www.netlib.org/blas/ BLAS (Basic Linear Algebra Subprogram] and [http://www.netlib.org/lapack/ LAPACK (Linear Algebra PACK)] are two of the most commonly use...")
 
No edit summary
Line 18: Line 18:


On [[Narval]], we have set <tt>FLEXIBLAS=blis</tt> to use AMD's implementation by default, while on other clusters, <tt>FLEXIBLAS</tt> is left undefined, which defaults to using Intel MKL.
On [[Narval]], we have set <tt>FLEXIBLAS=blis</tt> to use AMD's implementation by default, while on other clusters, <tt>FLEXIBLAS</tt> is left undefined, which defaults to using Intel MKL.
= Using Intel MKL directly =
Although we recommend using FlexiBLAS, it is still possible to use Intel MKL directly. If you are using one of the Intel compilers (e.g. <code>ifort, icc, icpc</code>) then the solution is to replace <tt>-lblas</tt> and <tt>-llapack</tt> with <tt>-mkl=sequential</tt> (without internal MKL threading) or <tt>-mkl</tt> (with threading) in your compiler and linker options in order to ensure that the MKL and thus BLAS/LAPACK are used. See [https://software.intel.com/en-us/mkl-linux-developer-guide-using-the-mkl-compiler-option here] for more on the significance of <code>sequential</code> and other options.
If you are using a non-Intel compiler, for example the Gnu compiler collection, then you will need to explicitly list the necessary MKL libraries during the link phase. Intel provides a tool called the [https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor MKL Link Advisor] to help you find the correct compiler and linker options.
The same [https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor MKL Link Advisor] tool is also useful if you receive "undefined reference" errors while using Intel compilers and <code>-mkl</code>.
Bureaucrats, cc_docs_admin, cc_staff, rsnt_translations
2,837

edits

Navigation menu