Find{BLAS,LAPACK} know nothing about used integer type in libraries
Some Quantum Chemistry packages written in Fortran uses by default Integer(8) (64-bit representation) type for integers. Unfortunately, it can spawn hard debugging issues on software <-> BLAS/LAPACK libraries interaction when integer types do not coincide between them.
Nowadays, most BLAS/LAPACK libraries have two variants of its: with 32-bit integers and with 64-bit integers. Usually, libraries with 32-bit integers do not have any suffixes or, sometimes, _lp64
, and libraries with 64-bit integers have mostly (not always!) suffixes 64
or _ilp64
.
To ensure that we will be linked with a needed version of the BLAS/LAPACK library, I want to have an additional flag that can resolve this issue. I noticed that this problem started to be solving by SIZEOF_INTEGER
at line https://gitlab.kitware.com/cmake/cmake/-/blob/v3.21.1/Modules/FindBLAS.cmake#L930. So, my suggestion is to add a new flag, BLA_SIZEOF_INTEGER
, which will look for libraries with 64-bit integers.
A possible solution is presented in !6407 (merged).