hypre: add superlu-dist variant (#10985)

- add a patch to fix build error with superlu-dist
This commit is contained in:
Satish Balay 2019-03-24 22:16:47 -05:00 committed by GitHub
parent d7e984bcf8
commit 8c165494f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View File

@ -38,6 +38,8 @@ class Hypre(Package):
# SuperluDist have conflicting headers with those in Hypre
variant('internal-superlu', default=True,
description="Use internal Superlu routines")
variant('superlu-dist', default=True,
description='Activates support for SuperluDist')
variant('int64', default=False,
description="Use 64bit integers")
variant('mpi', default=True, description='Enable MPI support')
@ -50,10 +52,12 @@ class Hypre(Package):
# Patch to build shared libraries on Darwin
patch('darwin-shared-libs-for-hypre-2.13.0.patch', when='+shared@2.13.0 platform=darwin')
patch('darwin-shared-libs-for-hypre-2.14.0.patch', when='+shared@2.14.0 platform=darwin')
patch('superlu-dist-link.patch')
depends_on("mpi", when='+mpi')
depends_on("blas")
depends_on("lapack")
depends_on('superlu-dist', when='+superlu-dist+mpi')
# Patch to build shared libraries on Darwin does not apply to
# versions before 2.13.0
@ -100,6 +104,13 @@ def install(self, spec, prefix):
configure_args.append("--without-mli")
configure_args.append("--without-fei")
if 'superlu-dist' in self.spec:
configure_args.append('--with-dsuperlu-include=%s' %
spec['superlu-dist'].prefix.include)
configure_args.append('--with-dsuperlu-lib=%s' %
spec['superlu-dist'].libs)
configure_args.append('--with-dsuperlu')
if '+debug' in self.spec:
configure_args.append("--enable-debug")
else:

View File

@ -0,0 +1,13 @@
diff --git a/src/lib/Makefile b/src/lib/Makefile
index f49d1683..615947b0 100644
--- a/src/lib/Makefile
+++ b/src/lib/Makefile
@@ -58,7 +58,7 @@ $(BLASFILES)\
$(LAPACKFILES)
SONAME = libHYPRE-${HYPRE_RELEASE_VERSION}${HYPRE_LIB_SUFFIX}
-SOLIBS = ${MPILIBDIRS} ${MPILIBS} ${LAPACKLIBDIRS} ${LAPACKLIBS}\
+SOLIBS = ${DSUPERLU_LIBS} ${MPILIBDIRS} ${MPILIBS} ${LAPACKLIBDIRS} ${LAPACKLIBS}\
${BLASLIBDIRS} ${BLASLIBS} ${LIBS} ${FLIBS}