Reference-LAPACK / lapack

LAPACK development repository
Other
1.51k stars 441 forks source link

Makefile Incorrectly Overwrites BLAS Library Instead of Linking #897

Open ghost opened 1 year ago

ghost commented 1 year ago

Description

In the process of building LAPACK and linking it against IBM's ESSL library, the current makefile appears to be using an incorrect command that leads to overwriting the original BLAS library instead of properly linking it.

The problematic command in the makefile is as follows:

ar cr -lessl isamax.o sasum.o saxpy.o scopy.o sdot.o snrm2.o srot.o srotg.o sscal.o sswap.o sdsdot.o srotmg.o srotm.o sgemv.o sgbmv.o ssymv.o ssbmv.o sspmv.o strmv.o stbmv.o stpmv.o strsv.o stbsv.o stpsv.o sger.o ssyr.o sspr.o ssyr2.o sspr2.o sgemm.o ssymm.o ssyrk.o ssyr2k.o strmm.o strsm.o idamax.o dasum.o daxpy.o dcopy.o ddot.o dnrm2.o drot.o drotg.o dscal.o dsdot.o dswap.o drotmg.o drotm.o dgemv.o dgbmv.o dsymv.o dsbmv.o dspmv.o dtrmv.o dtbmv.o dtpmv.o dtrsv.o dtbsv.o dtpsv.o dger.o dsyr.o dspr.o dsyr2.o dspr2.o dgemm.o dsymm.o dsyrk.o dsyr2k.o dtrmm.o dtrsm.o scabs1.o scasum.o scnrm2.o icamax.o caxpy.o ccopy.o cdotc.o cdotu.o csscal.o crotg.o cscal.o cswap.o csrot.o cgemv.o cgbmv.o chemv.o chbmv.o chpmv.o ctrmv.o ctbmv.o ctpmv.o ctrsv.o ctbsv.o ctpsv.o cgerc.o cgeru.o cher.o chpr.o cher2.o chpr2.o cgemm.o csymm.o csyrk.o csyr2k.o ctrmm.o ctrsm.o chemm.o cherk.o cher2k.o dcabs1.o dzasum.o dznrm2.o izamax.o zaxpy.o zcopy.o zdotc.o zdotu.o zdscal.o zrotg.o zscal.o zswap.o zdrot.o zgemv.o zgbmv.o zhemv.o zhbmv.o zhpmv.o ztrmv.o ztbmv.o ztpmv.o ztrsv.o ztbsv.o ztpsv.o zgerc.o zgeru.o zher.o zhpr.o zher2.o zhpr2.o zgemm.o zsymm.o zsyrk.o zsyr2k.o ztrmm.o ztrsm.o zhemm.o zherk.o zher2k.o lsame.o xerbla.o xerbla_array.o

This command misuses the ar archive utility and the -lessl flag, resulting in unintended consequences, such as changes in the library size and potential overwriting of original components.

Expected Behaviour:

The makefile should properly link LAPACK with the optimised ESSL library without altering or overwriting the original BLAS components. At least, this is what the language in the makefile would lead one to believe is what is meant to happen and the current default for an XLF build is to use -lessl.

langou commented 1 year ago

@ocelotStride are you able to submit a PR?

ghost commented 1 year ago

@ocelotStride are you able to submit a PR?

I am unsure what you mean by submitting a PR. Would you be able to walk me through it?

langou commented 1 year ago

PR stands for Pull Request. Here is one website: https://opensource.com/article/19/7/create-pull-request-github that looks about right on how to do this.