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

Barry Smith bsmith at mcs.anl.gov
Wed Jun 14 14:31:59 CDT 2017

> On Jun 14, 2017, at 1:29 PM, Richard Tran Mills <rtmills.anl at gmail.com> wrote:
> 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?

   config/BuildSystem/config/packages/mkl_sparse_optimize.py You can basically copy mkl_cpardiso.py and use that as a template; 10 minutes work.


> Thanks,
> Richard

More information about the petsc-dev mailing list