Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if BLAS_ILP64 is #defined use 64-bit int #6

Closed
wants to merge 1 commit into from

Conversation

evaleev
Copy link
Contributor

@evaleev evaleev commented Dec 29, 2020

BLAS_ILP64 is the preprocessor symbol defined by BLAS++

There is currently no introspection of int size (ILP vs LP). BLAS++'s introspection will not work when cross-compiling anyway so I think it's reasonable to require the user to define it appropriately.

Resolves #5

`BLAS_ILP64` is the preprocessor symbol defined by BLAS++

There is currently no introspection of int size (ILP vs LP). BLAS++'s introspection will not work when cross-compiling anyway so I think it's reasonable to require the user to define it appropriately.
@wavefunction91
Copy link
Owner

@evaleev This is not generally safe, the ScaLAPACK library itself has to be introspected for LP/ILP64 to avoid unexpected problems (i.e. someone trying to link an ILP64 BLAS library to LP64 BLACS/ScaLAPACK). As the only (stock) ILP64 BLACS/ScaLAPACK library is MKL, this is a rather rare case (convincing ScaLAPACK/BLACS to compile ILP64 is tedious, even from source as the naming conventions are not consistent, rarely found in the wild).

The discovery modules already set ScaLAPACK_IS_LP64 when appropriate
https://github.com/wavefunction91/linalg-cmake-modules/blob/main/FindScaLAPACK.cmake#L134
https://github.com/wavefunction91/linalg-cmake-modules/blob/main/FindScaLAPACK.cmake#L140

Robust introspection (ala BLAS) should be done, but it generally requires running an MPI program, which is not generally possible at configure (on e.g. SLURM systems with MPI disabled on head-nodes). I do have the procedure set up, just have to figure out how to run it portably
https://github.com/wavefunction91/linalg-cmake-modules/blob/main/FindScaLAPACK.cmake#L191

The work around for this is that users will have to manually specify (non-MKL) ILP64 ScaLAPACK installations by ScaLAPACK_LIBRARIES and manually set ScaLAPACK_IS_LP64=FALSE

TL;DR BLAS ILP64 is not enough to ensure that everything is correct for a ScaLAPACK ILP64. We already have some variables floating around to handle this, we just haven't propagated them into the build system yet. I'll keep this open for now util I get around to fixing it (assuming that this patch already works for your purposes)

@evaleev
Copy link
Contributor Author

evaleev commented Jan 7, 2021 via email

@wavefunction91 wavefunction91 mentioned this pull request Jan 15, 2021
@wavefunction91
Copy link
Owner

Addressed in #8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

missing support for ilp64
2 participants