KokkosKernels,Tpetra: Plug in TPLs (MKL, cuSPARSE, ...) for sparse matrix-vector multiply
Created by: mhoemmen
Please refer to the three attached patches. Their file names should end in .patch, but I had to rename them to .txt so Github would take them.
NOTE: If you want to use MKL for sparse matrix-vector multiply in Tpetra, you must do the following. First, apply the attached patches in order. Second, enable the MKL TPL in Trilinos. This is not the same thing as building against MKL for BLAS and LAPACK. Here is an example of the required CMake options, assuming that ${MKLROOT}
is the path of the MKL installation:
-D TPL_ENABLE_MKL:BOOL=ON -D MKL_LIBRARY_DIRS:FILEPATH="${MKLROOT}/lib/intel64" -D MKL_LIBRARY_NAMES:STRING="mkl_rt" -D MKL_INCLUDE_DIRS:FILEPATH="${MKLROOT}/include"
Third, set the TPETRA_USE_MKL_SPMV environment variable to 1. If you set it to 0, Tpetra will /not/ use MKL for sparse matrix-vector multiply. The environment variable lets you compare performance of Trilinos' implementation and MKL without needing to recompile.
0001-TpetraKernels-Add-comments-static_assert-to-single-v.txt 0002-TpetraKernels-Add-MKL-TPL.txt 0003-Tpetra-Call-MKL-for-single-vec-double-int-SpMV.txt