scivision / mumps

MUMPS via CMake
http://mumps-solver.org
MIT License
115 stars 46 forks source link

Compilation with openblas fixes #60

Closed gkaf89 closed 1 year ago

gkaf89 commented 1 year ago

These are a few fixes in the compilation with OpenBLAS. The issues rectified are the following:

  1. Allow multiple directories in CMAKE_PREFIX_PATH, e.g. -D CMAKE_PREFIX_PATH:PATH="${HOME}/opt/scalapack;${HOME}/opt/openblas"
  2. Link with the correct LAPACK library wehn building with OpenBLAS. OpenBLAS links BLAS and LAPACK in a single shared object, libopenblas.so. The reference implementation of Netlib is used, with some parts optimized.
  3. Report support for GEMMT by initializing the flag BLAS_HAVE_GEMMT.
scivision commented 1 year ago

Thanks I used two of your commits, but implemented OpenBLAS in a more general way. https://github.com/scivision/mumps/commit/ad06d43db387a2c96abd66aa6a7f2d189b0a656a https://github.com/scivision/mumps/commit/5a7fd7e14050dde8a0dfe371811a515b067e7f6f

I also added a CI test for OpenBLAS https://github.com/scivision/mumps/actions/runs/5555844546/jobs/10147547056.

To specify OpenBLAS:

cmake -Bbuild -DLAPACK_VENDOR=OpenBLAS

# optional if having trouble auto-finding OpenBLAS
cmake -Bbuild -DLAPACK_VENDOR=OpenBLAS -DLAPACK_ROOT=/path/to/openblas
gkaf89 commented 1 year ago

Thank you for the quick merge!

Don't worry about modifying my approach, I am new in the code base and thus still a bit reluctant to make extended refactorings.