In a project I am using
find_package(BLAS REQUIRED)
to detect BLAS.
Is there a way to tell which implementation of BLAS was found after this?
According to the documentation BLA_VENDOR can be used to require a certain implementation, but it doesn't report which one was found.
Unfortunatelly I need to know which BLAS was found because different implementations have subtle differences in their interfaces, for example MKL uses zdotu with 6 arguments rather than 5 (first is the pointer to the result value).
Per @Tsyvarev suggestion I ended up doing this
It seems that
-DRETURN_BY_STACK(or-DFORTRAN_COMPLEX_FUNCTIONS_RETURN_VOID) is a way recognized by some BLAS headers (e.g.cblas.h) to have MKL-compatible declarations.Technically one might need to try with every variant of
intelmkl BLAS, and choose one somehow, I am putting it here for completeness.