Closed band-a-prend closed 2 years ago
I.e. in my case cmake LAPACK_LIBRARIES additionally returns blas implementation library too, but I can't find the proof of that in cmake documentation.
Therefore the separate BLAS_LIBRARIES isn't dropped here.
Thanks. I merged this in the master branch. Indeed, this patch solve a long standing issue...
Note that BLAS and LAPACK libraries are basically found together within CMake macro.
This patch merge LAPACK_LIBRARIES and BLAS_LIBRARIES lists with removing of duplicates and replacing ";" with " " within list to provide proper linking via scifor.pc pkgconfig.
Tested against lapack and openblas system libraries (cmake configuration output of
SF compilation lines:
).Using lapack initial:
-L${libdir} -lscifor /usr/lib64/liblapack.so;/usr/lib64/libblas.so /usr/lib64/libblas.so
patched:-L${libdir} -lscifor /usr/lib64/liblapack.so /usr/lib64/libblas.so
Using openblas initial:
-L${libdir} -lscifor /usr/lib64/libopenblas.so;/usr/lib64/libopenblas.so /usr/lib64/libopenblas.so
patched:-L${libdir} -lscifor /usr/lib64/libopenblas.so
Related issue: https://github.com/QcmPlab/SciFortran/issues/4#issuecomment-736931796
TESTING: The patched system installed SciFortran was tested for lapack/openblas with quick example:
Result was compared with python implementation (in fortran case matrix is transpose but it's no matter for triang matrix):