Skip to content

Use lapack 3.4.0 instead of 3.1.1 #72

Closed

Description

@MarbolanGos

As lapack was updated I was thinking is it possible easily to use it.
I made those changes to the Makefile:

--- Makefile.old 2011-11-23 13:36:44.000000000 +0100
+++ Makefile 2011-11-23 13:38:38.000000000 +0100
@@ -195,47 +195,47 @@
netlib :

else
-netlib : lapack-3.1.1 patch.for_lapack-3.1.1 lapack-3.1.1/make.inc
+netlib : lapack-3.4.0 patch.for_lapack-3.4.0 lapack-3.4.0/make.inc
ifndef NOFORTRAN

  • -@$(MAKE) -C lapack-3.1.1 lapacklib
  • -@$(MAKE) -C lapack-3.4.0 lapacklib
    endif
    endif

-prof_lapack : lapack-3.1.1 lapack-3.1.1/make.inc

  • -@$(MAKE) -C lapack-3.1.1 lapack_prof
    +prof_lapack : lapack-3.4.0 lapack-3.4.0/make.inc
  • -@$(MAKE) -C lapack-3.4.0 lapack_prof

-lapack-3.1.1/make.inc :
+lapack-3.4.0/make.inc :
ifndef NOFORTRAN

  • -@echo "FORTRAN = $(FC)" > lapack-3.1.1/make.inc
  • -@echo "OPTS = $(FFLAGS)" >> lapack-3.1.1/make.inc
  • -@echo "POPTS = $(FPFLAGS)" >> lapack-3.1.1/make.inc
  • -@echo "NOOPT = $(FFLAGS) -O0" >> lapack-3.1.1/make.inc
  • -@echo "PNOOPT = $(FPFLAGS) -O0" >> lapack-3.1.1/make.inc
  • -@echo "LOADOPTS = $(FFLAGS) $(EXTRALIB)" >> lapack-3.1.1/make.inc
  • -@echo "ARCH = $(AR)" >> lapack-3.1.1/make.inc
  • -@echo "RANLIB = $(RANLIB)" >> lapack-3.1.1/make.inc
  • -@echo "LAPACKLIB = ../$(LIBNAME)" >> lapack-3.1.1/make.inc
  • -@echo "LAPACKLIB_P = ../$(LIBNAME_P)" >> lapack-3.1.1/make.inc
  • -@echo "SUFFIX = $(SUFFIX)" >> lapack-3.1.1/make.inc
  • -@echo "PSUFFIX = $(PSUFFIX)" >> lapack-3.1.1/make.inc
    -# -@echo "CEXTRALIB = $(CEXTRALIB)" >> lapack-3.1.1/make.inc
  • -@cat make.inc >> lapack-3.1.1/make.inc
  • -@echo "FORTRAN = $(FC)" > lapack-3.4.0/make.inc
  • -@echo "OPTS = $(FFLAGS)" >> lapack-3.4.0/make.inc
  • -@echo "POPTS = $(FPFLAGS)" >> lapack-3.4.0/make.inc
  • -@echo "NOOPT = $(FFLAGS) -O0" >> lapack-3.4.0/make.inc
  • -@echo "PNOOPT = $(FPFLAGS) -O0" >> lapack-3.4.0/make.inc
  • -@echo "LOADOPTS = $(FFLAGS) $(EXTRALIB)" >> lapack-3.4.0/make.inc
  • -@echo "ARCH = $(AR)" >> lapack-3.4.0/make.inc
  • -@echo "RANLIB = $(RANLIB)" >> lapack-3.4.0/make.inc
  • -@echo "LAPACKLIB = ../$(LIBNAME)" >> lapack-3.4.0/make.inc
  • -@echo "LAPACKLIB_P = ../$(LIBNAME_P)" >> lapack-3.4.0/make.inc
  • -@echo "SUFFIX = $(SUFFIX)" >> lapack-3.4.0/make.inc
  • -@echo "PSUFFIX = $(PSUFFIX)" >> lapack-3.4.0/make.inc
    +# -@echo "CEXTRALIB = $(CEXTRALIB)" >> lapack-3.4.0/make.inc
  • -@cat make.inc >> lapack-3.4.0/make.inc
    endif

-lapack-3.1.1 : lapack-3.1.1.tgz
+lapack-3.4.0 : lapack-3.4.0.tgz
ifndef NOFORTRAN

  • @if test $(MD5SUM) lapack-3.1.1.tgz | $(AWK) '{print $$1}' = 00b21551a899bcfbaa7b8443e1faeef9; then \
  • @if test $(MD5SUM) lapack-3.4.0.tgz | $(AWK) '{print $$1}' = 00b21551a899bcfbaa7b8443e1faeef9; then
    echo $(TAR) zxf $< ;\
  •   $(TAR) zxf $< && (cd lapack-3.1.1; $(PATCH) -p1 < ../patch.for_lapack-3.1.1) ;\
    
  •   $(TAR) zxf $< && (cd lapack-3.4.0; $(PATCH) -p1 < ../patch.for_lapack-3.4.0) ;\
    
    else \
  •   echo "  lapack-3.1.1.tgz check sum is wrong (Please use orignal)." ;\
    
  •   rm -rf lapack-3.1.1 ;\
    
  •   echo "  lapack-3.4.0.tgz check sum is wrong (Please use orignal)." ;\
    
  •   rm -rf lapack-3.4.0 ;\
    
    fi
    endif

-lapack-3.1.1.tgz :
+lapack-3.4.0.tgz :
ifndef NOFORTRAN

large.tgz :
@@ -248,21 +248,21 @@
-wget http://www.netlib.org/lapack/timing/timing.tgz
endif

-lapack-timing : lapack-3.1.1 large.tgz timing.tgz
+lapack-timing : lapack-3.4.0 large.tgz timing.tgz
ifndef NOFORTRAN

  • (cd lapack-3.1.1; $(TAR) zxf ../timing.tgz TIMING)
  • (cd lapack-3.1.1/TIMING; $(TAR) zxf ../../large.tgz )
  • make -C lapack-3.1.1 tmglib
  • make -C lapack-3.1.1/TIMING
  • (cd lapack-3.4.0; $(TAR) zxf ../timing.tgz TIMING)
  • (cd lapack-3.4.0/TIMING; $(TAR) zxf ../../large.tgz )
  • make -C lapack-3.4.0 tmglib
  • make -C lapack-3.4.0/TIMING
    endif

lapack-test :

  • $(MAKE) -C lapack-3.1.1 tmglib
  • $(MAKE) -C lapack-3.1.1/TESTING xeigtstc xeigtstd xeigtsts xeigtstz xlintstc xlintstd xlintstds xlintsts xlintstz xlintstzc
  • @rm -f lapack-3.1.1/TESTING/*.out
  • $(MAKE) -j 1 -C lapack-3.1.1/TESTING
  • $(GREP) failed lapack-3.1.1/TESTING/*.out
  • $(MAKE) -C lapack-3.4.0 tmglib
  • $(MAKE) -C lapack-3.4.0/TESTING xeigtstc xeigtstd xeigtsts xeigtstz xlintstc xlintstd xlintstds xlintsts xlintstz xlintstzc
  • @rm -f lapack-3.4.0/TESTING/*.out
  • $(MAKE) -j 1 -C lapack-3.4.0/TESTING
  • $(GREP) failed lapack-3.4.0/TESTING/*.out

dummy :

@@ -280,9 +280,9 @@
#endif
@rm -f .$(LIBSUFFIX) *.so *~ *.exe getarch getarch_2nd *.dll *.lib *.$(SUFFIX) *.dwf libopenblas.$(LIBSUFFIX) libopenblas_p.$(LIBSUFFIX) *.lnk myconfig.h
@rm -f Makefile.conf config.h Makefile_kernel.conf config_kernel.h st
*.dylib

  • @if test -d lapack-3.1.1; then \
  • echo deleting lapack-3.1.1; \
  • rm -rf lapack-3.1.1 ;\
  • @if test -d lapack-3.4.0; then \
  • echo deleting lapack-3.4.0; \
  • rm -rf lapack-3.4.0 ;
    fi
    @rm -f *.grd Makefile.conf_last config_last.h
  • @echo Done.
    \ Pas de fin de ligne à la fin du fichier.
  • @echo Done.

Copied patch.for_lapack-3.1.1 into patch.for_lapack-3.4.0 and all compiled correctly in my:
OpenBLAS build complete.

OS ... Linux
Architecture ... x86_64
BINARY ... 64bit
C compiler ... GCC (command line : gcc)
Fortran compiler ... GFORTRAN (command line : gfortran)
Library Name ... libopenblas_penrynp-r0.1alpha2.4.a (Multi threaded; Max num-threads is 8)

Activity

  1. ghost assigned on Nov 24, 2011
  2. xianyi commented on Nov 24, 2011

    @xianyi
    Collaborator

    Hi,

    Thank you for this patch. I will add this patch into develop branch.
    You can also fork this project. Then, you can click "Pull Request" button on github.com

    Thank you again!~

    Xianyi

  3. xianyi commented on Nov 24, 2011

    @xianyi
    Collaborator

    Hi,

    After applying this patch, this patch didn't work.
    Output:
    lapack-3.4.0.tgz check sum is wrong (Please use orignal).
    /bin/sh: cannot create lapack-3.4.0/make.inc: Directory nonexistent
    ....

    Then, I changed md5 checking for lapack-3.4.0. However, it failed on the patching. Outputs:
    tar zxf lapack-3.4.0.tgz
    patching file INSTALL/Makefile
    Hunk #1 FAILED at 27.
    1 out of 1 hunk FAILED -- saving rejects to file INSTALL/Makefile.rej
    patching file Makefile
    Hunk #1 FAILED at 20.
    ...

    Thanks

    Xianyi

  4. MarbolanGos commented on Nov 24, 2011

    @MarbolanGos
    Author

    You are right I changed other things. Sorry...

    Thanks for updating lapack.

  5. xianyi commented on Nov 24, 2011

    @xianyi
    Collaborator

    Hi,

    You can send the patch to me (traits.zhang at gmail dot com). Alternatively, you can use "Pull Request" on github.com

    Thanks

    Xianyi

  6. added a commit that references this issue on Nov 28, 2011
  7. xianyi commented on Nov 28, 2011

    @xianyi
    Collaborator

    Hi,
    I just upgraded LAPACK to 3.4.0 version in develop branch. You can download it from https://github.com/xianyi/OpenBLAS/zipball/develop

    Could you help me test LAPACK 3.4.0 ?

    Thanks

    Xianyi

  8. MarbolanGos commented on Nov 28, 2011

    @MarbolanGos
    Author

    Hi,
    Sorry for not responding I was busy those days. Thank you for taking care of it.
    I tried your archive on 3 different computers with intel based CPUs all compiled well and I had no errors on lapack tests. All on Linux stations (64 bits).

  9. upsha commented on Dec 4, 2011

    @upsha

    Hi,
    I compiled the LAPACK-3.4.0 with MinGW-w64 without error. It runs with my small test code. However, I haven't figure out how to install python with MinGW-w64 and cannot run the build-in lapack_testing.py yet.

    Best,
    Upsha

  10. xianyi commented on Dec 5, 2011

    @xianyi
    Collaborator

    Hi Upsha,

    Thank you for the test.

    Xianyi

  11. ViralBShah commented on Dec 10, 2011

    @ViralBShah
    Contributor

    Does one get a faster LAPACK by using this patch, rather than by compiling LAPACK directly and linking it to openblas?

  12. xianyi commented on Jan 1, 2012

    @xianyi
    Collaborator

    Hi Viral,

    I think Mr. Goto optimized some LAPACK functions such as LU factorization. Thus, it will be faster than original LAPACK.

    Thanks

    Xianyi

  13. ViralBShah commented on Jan 1, 2012

    @ViralBShah
    Contributor

    Ok, in that case I will try it out once you merge it into master and make the next release.

    -viral

    On Jan 1, 2012, at 7:32 PM, Xianyi Zhang wrote:

    Hi Viral,

    I think Mr. Goto optimized some LAPACK functions such as LU factorization. Thus, it will be faster than original LAPACK.

    Thanks

    Xianyi


    Reply to this email directly or view it on GitHub:
    #72 (comment)

  14. added a commit that references this issue on Jul 21, 2020
  15. added a commit that references this issue on Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions