[hypre] 08/08: use hypre's internal SuperLU 3

Drew Parsons dparsons at moszumanska.debian.org
Tue Nov 1 08:47:53 UTC 2016


This is an automated email from the git hooks/post-receive script.

dparsons pushed a commit to branch experimental
in repository hypre.

commit ca6c1491ad16ab727339db2d8efd3f26d2426d41
Author: Drew Parsons <dparsons at debian.org>
Date:   Tue Nov 1 14:30:47 2016 +0800

    use hypre's internal SuperLU 3
    
    hypre is coded to use SuperLU 3, which is not source compatible with
    the latest external SuperLU 5.
    
    Therefore configure hypre to use its internal superlu.
    
    SuperLU uses lapack, so also patch to only use internal lapack where
    the configuration says to.
---
 debian/control                        |   1 -
 debian/patches/lapack.patch           |   2 +-
 debian/patches/series                 |   2 +-
 debian/patches/shlibs-interlink.patch |   9 +--
 debian/patches/superlu.patch          |  49 -----------------
 debian/patches/superlu_internal.patch | 100 ++++++++++++++++++++++++++++++++++
 debian/rules                          |   2 +-
 7 files changed, 108 insertions(+), 57 deletions(-)

diff --git a/debian/control b/debian/control
index 6a56804..1ae77f9 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,6 @@ Build-Depends:
  libblas-dev | libblas.so,
  liblapack-dev | liblapack.so,
  libltdl-dev,
- libsuperlu-dev,
  libtool,
  mpi-default-dev,
 Vcs-Git: https://anonscm.debian.org/git/debian-science/packages/hypre.git
diff --git a/debian/patches/lapack.patch b/debian/patches/lapack.patch
index ab8629e..ab36c4e 100644
--- a/debian/patches/lapack.patch
+++ b/debian/patches/lapack.patch
@@ -19,7 +19,7 @@ Index: hypre/src/FEI_mv/femli/mli_utils.c
  #include "HYPRE_IJ_mv.h"
  #include "../fei-hypre/HYPRE_parcsr_fgmres.h"
 +
-+#ifndef LAPACKLIBS
++#ifdef HYPRE_USING_HYPRE_LAPACK
  #include "hypre_lapack.h"
 +#endif
  
diff --git a/debian/patches/series b/debian/patches/series
index e8ddc72..7cfa77a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,4 @@
 configure.patch
-superlu.patch
 install.patch
 #examples.patch
 ##cmake-install.patch
@@ -9,3 +8,4 @@ complex.patch
 shlibs-interlink.patch
 test.patch
 lapack.patch
+superlu_internal.patch
diff --git a/debian/patches/shlibs-interlink.patch b/debian/patches/shlibs-interlink.patch
index eb1c9d6..db3a60b 100644
--- a/debian/patches/shlibs-interlink.patch
+++ b/debian/patches/shlibs-interlink.patch
@@ -12,7 +12,7 @@ Index: hypre/src/lib/Makefile
 ===================================================================
 --- hypre.orig/src/lib/Makefile
 +++ hypre/src/lib/Makefile
-@@ -59,6 +59,27 @@ $(UTILITIESFILES)\
+@@ -59,6 +59,28 @@ $(UTILITIESFILES)\
  $(BLASFILES)\
  $(LAPACKFILES)
  
@@ -35,12 +35,13 @@ Index: hypre/src/lib/Makefile
 +  ../distributed_ls/pilut/libHYPRE_DistributedMatrixPilutSolver.so \
 +  ../parcsr_ls/libHYPRE_parcsr_ls.so \
 +  ../FEI_mv/fei-hypre/libHYPRE_FEI.so \
-+  ../FEI_mv/femli/libHYPRE_mli.so
++  ../FEI_mv/femli/libHYPRE_mli.so \
++  ../FEI_mv/SuperLU/SRC/libHYPRE_superlu.so
 +
  SONAME = libHYPRE-${HYPRE_RELEASE_VERSION}.so
  SOLIBS = ${MPILIBDIRS} ${MPILIBS} ${LAPACKLIBDIRS} ${LAPACKLIBS}\
   ${BLASLIBDIRS} ${BLASLIBS} ${LIBS} ${FLIBS}
-@@ -71,7 +92,7 @@ SOLIBS = ${MPILIBDIRS} ${MPILIBS} ${LAPA
+@@ -71,7 +93,7 @@ SOLIBS = ${MPILIBDIRS} ${MPILIBS} ${LAPA
  all: libHYPRE${HYPRE_LIB_SUFFIX}
  	cp -fR libHYPRE* ${HYPRE_BUILD_DIR}/lib
  
@@ -49,7 +50,7 @@ Index: hypre/src/lib/Makefile
  	cp -fR libHYPRE* ${HYPRE_LIB_INSTALL}
  
  clean:
-@@ -105,7 +126,7 @@ libHYPRE.a: ${FILES_HYPRE}
+@@ -105,7 +127,7 @@ libHYPRE.a: ${FILES_HYPRE}
  	${AR} $@ $(UTILITIESFILES) $(BLASFILES) $(LAPACKFILES)
  	${RANLIB} $@
  
diff --git a/debian/patches/superlu.patch b/debian/patches/superlu.patch
deleted file mode 100644
index b87c0f2..0000000
--- a/debian/patches/superlu.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Index: hypre/src/FEI_mv/femli/test/make.csh
-===================================================================
---- hypre.orig/src/FEI_mv/femli/test/make.csh
-+++ hypre/src/FEI_mv/femli/test/make.csh
-@@ -1,4 +1,4 @@
- #!/bin/csh
- mpiCC -c -DHYPRE_TIMING -I../../../hypre/include -I.. -I../../.. driver.c
--mpiCC -o driver driver.o -L../../../hypre/lib -L/usr/lib -lHYPRE -lHYPRE_superlu -lHYPRE_LSI -lg2c -lm
-+mpiCC -o driver driver.o -L../../../hypre/lib -L/usr/lib -lHYPRE -lsuperlu -lHYPRE_LSI -lg2c -lm
- 
-Index: hypre/src/parcsr_block_mv/Makefile
-===================================================================
---- hypre.orig/src/parcsr_block_mv/Makefile
-+++ hypre/src/parcsr_block_mv/Makefile
-@@ -34,7 +34,7 @@ LFLAGS = \
-       -lHYPRE_DistributedMatrixPilutSolver -lHYPRE_IJ_mv \
-       -lHYPRE_parcsr_mv -lHYPRE_seq_mv -lHYPRE_DistributedMatrix \
-       -lHYPRE_MatrixMatrix -lHYPRE_utilities -lm
--# -L. -lHYPRE_parcsr_block_mv -L../hypre/lib -lHYPRE_LSI -lHYPRE_superlu -lm
-+# -L. -lHYPRE_parcsr_block_mv -L../hypre/lib -lHYPRE_LSI -lsuperlu -lm
- 
- HEADERS =\
-  csr_block_matrix.h\
-Index: hypre/src/FEI_mv/fei-hypre/Makefile
-===================================================================
---- hypre.orig/src/FEI_mv/fei-hypre/Makefile
-+++ hypre/src/FEI_mv/fei-hypre/Makefile
-@@ -212,7 +212,7 @@ libHYPRE_FEI.a: ${OBJS}
- 
- libHYPRE_FEI.so: ${OBJS}
- 	@echo  "Building $@ ... "
--	${BUILD_CC_SHARED} -o ${SONAME} ${OBJS} ${SHARED_SET_SONAME}${SONAME}
-+	${BUILD_CC_SHARED} -o ${SONAME} ${OBJS} -lsuperlu ${SHARED_SET_SONAME}${SONAME}
- 	ln -s ${SONAME} $@
- 
- ${OBJS}: ${HEADERS}
-Index: hypre/src/FEI_mv/femli/Makefile
-===================================================================
---- hypre.orig/src/FEI_mv/femli/Makefile
-+++ hypre/src/FEI_mv/femli/Makefile
-@@ -157,7 +157,7 @@ libHYPRE_mli.a: ${OBJS}
- 
- libHYPRE_mli.so: ${OBJS}
- 	@echo  "Building $@ ... "
--	${BUILD_CC_SHARED} -o ${SONAME} ${OBJS} ${SHARED_SET_SONAME}${SONAME}
-+	${BUILD_CC_SHARED} -o ${SONAME} ${OBJS} -lsuperlu ${SHARED_SET_SONAME}${SONAME}
- 	ln -s ${SONAME} $@
- 
- ${OBJS}: ${HEADERS}
diff --git a/debian/patches/superlu_internal.patch b/debian/patches/superlu_internal.patch
new file mode 100644
index 0000000..594ab40
--- /dev/null
+++ b/debian/patches/superlu_internal.patch
@@ -0,0 +1,100 @@
+Index: hypre/src/FEI_mv/SuperLU/SRC/Makefile
+===================================================================
+--- hypre.orig/src/FEI_mv/SuperLU/SRC/Makefile
++++ hypre/src/FEI_mv/SuperLU/SRC/Makefile
+@@ -43,6 +43,7 @@ include ../make.inc
+ include ../../../config/Makefile.config
+ CINCLUDES = ${INCLUDES} ${MPIINCLUDE}
+ C_COMPILE_FLAGS = \
++ -DLAPACKLIBS=${LAPACKLIBS}\
+  -I$(srcdir)\
+  -I$(srcdir)/../../../\
+  -I$(srcdir)/../../../utilities\
+@@ -153,13 +154,15 @@ FILES =\
+ 
+ OBJS = ${FILES:.c=.o}
+ 
++SONAME = libHYPRE_superlu-${HYPRE_RELEASE_VERSION}.so
++
+ all: libHYPRE_superlu${HYPRE_LIB_SUFFIX}
+ 	cp -fp *.h $(HYPRE_BUILD_DIR)/include
+ #	cp -fp libHYPRE* $(HYPRE_BUILD_DIR)/lib
+ 
+ install: libHYPRE_superlu${HYPRE_LIB_SUFFIX}
+-	cp -f *.h $(HYPRE_INC_INSTALL)
+-#	cp -f libHYPRE* $(HYPRE_LIB_INSTALL)
++	cp -fR *.h $(HYPRE_INC_INSTALL)
++	cp -fR libHYPRE* $(HYPRE_LIB_INSTALL)
+ 	@echo  " "
+ 
+ clean:
+@@ -174,7 +177,8 @@ libHYPRE_superlu.a: ${OBJS}
+ 
+ libHYPRE_superlu.so: ${OBJS}
+ 	@echo  "Building $@ ... "
+-	${BUILD_CC_SHARED} -o $@ ${OBJS}
++	${BUILD_CC_SHARED} -o ${SONAME} ${OBJS} ${SHARED_SET_SONAME}${SONAME}
++	ln -s ${SONAME} $@
+ 
+ ${OBJS}: ${HEADERS}
+ 
+Index: hypre/src/FEI_mv/SuperLU/SRC/dgsequ.c
+===================================================================
+--- hypre.orig/src/FEI_mv/SuperLU/SRC/dgsequ.c
++++ hypre/src/FEI_mv/SuperLU/SRC/dgsequ.c
+@@ -18,7 +18,10 @@
+ 
+ #include <math.h>
+ #include "slu_ddefs.h"
++
++#ifdef HYPRE_USING_HYPRE_LAPACK
+ #include "hypre_lapack.h"
++#endif
+ 
+ void
+ dgsequ(SuperMatrix *A, double *r, double *c, double *rowcnd,
+Index: hypre/src/FEI_mv/SuperLU/SRC/dgssvx.c
+===================================================================
+--- hypre.orig/src/FEI_mv/SuperLU/SRC/dgssvx.c
++++ hypre/src/FEI_mv/SuperLU/SRC/dgssvx.c
+@@ -13,7 +13,10 @@
+ 
+ 
+ #include "slu_ddefs.h"
++
++#ifdef HYPRE_USING_HYPRE_LAPACK
+ #include "hypre_lapack.h"
++#endif
+ 
+ void
+ dgssvx(superlu_options_t *options, SuperMatrix *A, int *perm_c, int *perm_r,
+Index: hypre/src/FEI_mv/SuperLU/SRC/dlaqgs.c
+===================================================================
+--- hypre.orig/src/FEI_mv/SuperLU/SRC/dlaqgs.c
++++ hypre/src/FEI_mv/SuperLU/SRC/dlaqgs.c
+@@ -17,7 +17,10 @@
+ 
+ #include <math.h>
+ #include "slu_ddefs.h"
++
++#ifdef HYPRE_USING_HYPRE_LAPACK
+ #include "hypre_lapack.h"
++#endif
+ 
+ void
+ dlaqgs(SuperMatrix *A, double *r, double *c, 
+Index: hypre/src/FEI_mv/SuperLU/SRC/dpivotgrowth.c
+===================================================================
+--- hypre.orig/src/FEI_mv/SuperLU/SRC/dpivotgrowth.c
++++ hypre/src/FEI_mv/SuperLU/SRC/dpivotgrowth.c
+@@ -13,7 +13,10 @@
+ 
+ #include <math.h>
+ #include "slu_ddefs.h"
++
++#ifdef HYPRE_USING_HYPRE_LAPACK
+ #include "hypre_lapack.h"
++#endif
+ 
+ double
+ dPivotGrowth(int ncols, SuperMatrix *A, int *perm_c, 
diff --git a/debian/rules b/debian/rules
index bc6dffb..59f9ec0 100644
--- a/debian/rules
+++ b/debian/rules
@@ -22,7 +22,7 @@ LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
 # extra flags set to be similar to what petsc requires
 extra_flags += \
   --with-fei --with-mli \
-  --without-superlu \
+  --with-superlu \
   --with-blas \
   --with-lapack-libs="lapack" --with-lapack-lib-dirs="/usr/lib/lapack" --with-fmangle-lapack="one-underscore" \
   --prefix=$(CURDIR)/debian/tmp/usr

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/hypre.git



More information about the debian-science-commits mailing list