Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make use of the full range of AUX matrices
The gist of it is that we have this signature `mr2d_malloc(Int n)`, bounding the internal `malloc` to `Int`, which is Scalapack's indexing type. This is not how `malloc` is defined and means that maximum AUX matrix size is artifically limited on 64-bit systems to 2GB. This PR operates this transformation: `mr2d_malloc(Int n) -> mr2d_malloc(size_t n)`, yet ensures `Int -> size_t` conversion does not involve Int-negative values and ensures that no 64-bit values are passed to `malloc` on 32-bit systems. The main advantage of this on 64-bit system allows the use of the **full** _signed_ 32-bit indexing range instead of `range / element size`. E.g. the max AUX matrix size is now 16GB instead of 2GB previously. With this, "standard" 32-bit Scalapack and Blas/Lapack can still be used in programs like GPAW. Details (and full commit history) are in Reference-ScaLAPACK/scalapack#85 which does not seem to receive much attention. This patch is a way to provide that feature to conda users in the meantime.
- Loading branch information