hypre: add superlu-dist variant (#10985)
- add a patch to fix build error with superlu-dist
This commit is contained in:
		| @@ -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: | ||||
|   | ||||
| @@ -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} | ||||
|   | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Satish Balay
					Satish Balay