Using MKL BLAS for the LU factorization

Content

We hope that the previous benchmarks for the LU factorization were so poor because our implementation of the triangular solver (i.e. sm) was not optimized. In order to confirm our hypothesis we use some BLAS functions from MKL.

Based on this we later can figure out which of our own BLAS functions need further optimization and to what extent.

HPC library requirements for this session

We use the library from /home/numerik/pub/hpc/ws18/session21 as starting point for this session.

Copy files lu.hpp, test_lu_blk.cpp and Makefile into a local directory. For example:

heim$ rm -rf ex01
heim$ 
heim$ mkdir ex01
heim$ cp /home/numerik/pub/hpc/ws18/session21/lib/test/test_lu_blk.cpp ex01/
heim$ cp /home/numerik/pub/hpc/ws18/session21/lib/test/Makefile ex01/
heim$ cp /home/numerik/pub/hpc/ws18/session21/lib/hpc/matvec/lu.hpp ex01/
heim$ ls ex01
Makefile
lu.hpp
test_lu_blk.cpp
heim$ 

Using the MKL-BLAS functions

We provide in hpc/mklblas interfaces for the following BLAS functions:

The signatures of all these functions are consistent with our self-written functions. That means we simply write mklblas::mm(...) instead of mm(...) for using MKL-BLAS instead of ulmBLAS.

Exercise