[cmake] use wfn91's linear algebra discovery modules#254
Conversation
…p version to fix problems in BLACS/ScaLAPACK discovery (#256) + fixed associated API changes
|
@evaleev This passes all CI except for Travis + clang (which is not a problem in the build, it's a problem in the Ubuntu packages). Do we want to fix the Travis build, or take Gitlab as being indicative of it working? |
…aleevGroup/tiledarray into evaleev/feature/wfn91-linalg-discovery
@wavefunction91 would be nice to have some docs for the discovery kit to avoid duplication of effort ... BTW is `BLA_STATIC` respected by your kit?
|
@wavefunction91 I think this is ready. I'm pretty sure my updates of the dox (INSTALL.md) are not 100% correct (does your kit respect |
|
We have |
| - standard CMake BLAS/LAPACK modules. | ||
|
|
||
| The latter is used if CMake cache variable `BLA_VENDOR` is specified: | ||
| - `BLA_VENDOR` -- controls which vendor BLAS/LAPACK library will be sought |
There was a problem hiding this comment.
We don't use BLA_VENDOR, we set a priority list BLAS_PREFERENCE_LIST which will have the same effect as BLA_VENDOR when set to a single item. We do this to decouple LAPACK/BLAS (e.g. in the case of BLIS + NETLIB / BLIS + FLAME), but due to the hierarchy discovery, allowing full discovery (e.g. setting BLAS_PREFERENCE_LIST="IntelMKL" and letting FindLAPACK satisfy the FindBLAS dependency and recognize that it contains a LAPACK linker) will do the right thing.
We could add a BLA_VENDOR <-> BLAS_PREFERENCE_LIST compatibility, or you propagate in the VG CMake kit, which ever you prefer
There was a problem hiding this comment.
I think it is least surprising to emulate Find{BLAS,LAPACK} as much as reasonable, no?
There was a problem hiding this comment.
i.e. I think it's reasonable to read same input vars as those, i.e. read BLA_{VENDOR,STATIC}
There was a problem hiding this comment.
I suppose that is the least surprising behaviour, I'll patch that today
| Fortunately, Intel MKL can be discovered by BLAS++/LAPACK++ automatically in most instances; if needed, specifying `BLA_VENDOR` with [appropriate argument](https://cmake.org/cmake/help/latest/module/FindBLAS.html#input-variables) can be used to force TiledArray to use MKL. Unfortunately it is not possible to specify the use of TBB-based backend for MKL without the use of a toolchain file. All MKL-enabled toolchains in [The Valeev Group CMake kit](https://github.com/ValeevGroup/kit-cmake/tree/master/toolchains) can be used to configure TiledArray to use sequential, OpenMP, or TBB backend by setting the `MKL_THREADING` CMake cache variable to `SEQ`, `OMP`, or `TBB`, respectively. The toolchains also respect the user-provided choice of `BLA_STATIC`. If multiple MKL versions are present on your system, specify the apropriate variant of the library by loading the corresponding `mklvars.sh` script to set environment variables `MKLROOT` and, if necessary, `LD_LIBRARY_PATH`/`DYLD_LIBRARY_PATH`. | ||
| To discover and configure the use of Intel MKL consider these suggestions: | ||
| - The use of NWChemEx discovery kit is strongly recommended for discovering Intel MKL. The following CMake cache variables can be used to specify the desired Intel MKL configuration: | ||
| - `intelmkl_PREFERS_STATIC`: whether to look for static or shared/dynamic libraries (default = `OFF`) |
There was a problem hiding this comment.
This would be covered by BLAS_PREFERS_STATIC
|
@evaleev Kitware compatibility is added in wavefunction91/linalg-cmake-modules@510b928 , we should just need to bump the version in The following are the allowed specs for
|
|
@wavefunction91 OK, thanks, will do |
per discussion here ValeevGroup/tiledarray#254
Does the user need to specify |
3989d45 to
3f8a4d1
Compare
|
@evaleev The user should not have to specify
|
|
@wavefunction91 sorry for wasting your time ... since the proper thing will be to interpret |
e5b8bcc to
2e02078
Compare
No description provided.