lapack icon indicating copy to clipboard operation
lapack copied to clipboard

Makefile Incorrectly Overwrites BLAS Library Instead of Linking

Open ghost opened this issue 2 years ago • 3 comments

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.

ghost avatar Aug 24 '23 13:08 ghost

@ocelotStride are you able to submit a PR?

langou avatar Aug 25 '23 02:08 langou

@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?

ghost avatar Sep 28 '23 16:09 ghost

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.

langou avatar Sep 28 '23 17:09 langou