[petsc-dev] How to check MKL requirements for a matrix class

Richard Tran Mills rtmills.anl at gmail.com
Wed Jun 14 13:29:00 CDT 2017

PETSc developers,

I have been working on an AIJMKL matrix class that enables use of MKL
sparse BLAS routines. I need to keep this from breaking the build when a
user does not have MKL. What should I check for? I see when I build on a
machine where I have specified that MKL be used for BLAS and LAPACK, in
$PETSC_ARCH/include/petscconf.h I see two relevant entries:


I think it's the latter I want to check for -- I'm guessing that the former
is set only when "sequential" (i.e., non-threaded) has been set?

Actually, checking for the above will not be entirely adequate, because I
support the use of the sparse inspector-executor routines, which users with
an old version of MKL will not have. I need to add a check for this
(probably can just check for existence of mkl_sparse_optimize); can someone
give me a hint on where in the BuildSystem stuff I should be adding this?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170614/316426fa/attachment.html>

More information about the petsc-dev mailing list