New Issue: Improve portability of BLAS/LAPACK-dependent LinearAlgebra tests

17076, “ben-albrecht”, “Improve portability of BLAS/LAPACK-dependent LinearAlgebra tests”, “2021-02-02T20:33:53Z”

The LinearAlgebra tests (test/library/packages/LinearAlgebra/) are all skipped when not running on a Cray XC (with the exception of test/library/packages/LinearAlgebra/correctness/no-dependencies) because they rely on the command line driver (cc) available on Cray machines to pass all the correct BLAS/LAPACK flags to the compiler.

For a long time, we have wanted to make these tests more portable so that they can detect the BLAS/LAPACK on the users’ machine and throw the right flags automatically. The end goal would be for the user to be able to just run start_test test/library/packages/LinearAlgebra and have all the linear algebra tests run as long as the user has BLAS and LAPACK installed on their machine (and maybe some env vars set).

To implement this, the tests in test/library/packages/LinearAlgebra/ should use an executable compopts that checks users’ env variables and/or calls pkg-config to determine the values for the library path (-L), include path (-I) linker flags (-l), and specific implementations flags (-s blasImpl / -s lapackImpl). There should also be a check to see if we’re on a Cray XC, because no flags are required in that case.