Hey, I’m writing a plugin for Psi4 and I’m hoping to use BLAS in it. I realize that I don’t need “find_package blas” in my plugin cmake, but when I run the plugin, the version (OpenBLAS vs MKL) depends on how psi4 was built. I’m hoping to use a macro to tell the plugin compiler if MKL BLAS will be used at run time so it can compile with the particular sections of the code accordingly, however I’m having some trouble.
Firstly, it seems to me that by compiling psi4 with BLAS_TYPE=MKL or OPENBLAS cmake options, the plugin still uses the same BLAS version. However, it seems that the python used to compile psi4 might be the one determining it: if numpy uses MKL, then the MKL BLAS is used in the plugin. Could someone please confirm if this is true?
Secondly, I tried directly using “ifdef USING_LAPACK_MKL” in my plugin, the compiler always reacts as the macro is undefined. Is this the correct variable I should use? How should I change my plugin CMakeLists.txt to allow it to retrieve the variable from psi4 compling procedure? Or should I try a different way?
P.S. Function ZDOTC is defined differently in MKL blas. Since psi4 doesn’t have wrappers for Z functions, I built them myself, and I tried to keep everything in the same way as libqt.