While many 'system'-installed packages are detected and used by default (e.g. Eigen, fmt, sundials, yaml-cpp), the same is not true for BLAS and LAPACK. Instead, it does require the blas_lapack_libs flag (as expected, there currently is no system_blas_lapack option).
While there are some issues related to incompatible versions packaged with MATLAB, it would make sense to use BLAS and LAPACK by default otherwise (instead of Eigen's linear algebra support). Based on communication with @speth there are couple of caveats to consider:
[...] there are a number of special cases that you would want handle. One is that one of the best BLAS/LAPACK implementations to link to would be the MKL if it’s present. The other is that if you’re trying to autodetect, you probably want to try figuring out if it’s a version that uses an 8-byte index type or not (which is the Matlab issue).
Abstract
While many 'system'-installed packages are detected and used by default (e.g.
Eigen
,fmt
,sundials
,yaml-cpp
), the same is not true for BLAS and LAPACK. Instead, it does require theblas_lapack_libs
flag (as expected, there currently is nosystem_blas_lapack
option).While there are some issues related to incompatible versions packaged with MATLAB, it would make sense to use BLAS and LAPACK by default otherwise (instead of Eigen's linear algebra support). Based on communication with @speth there are couple of caveats to consider: