summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarah Osborn <30503782+osborn9@users.noreply.github.com>2019-10-23 12:13:21 -0700
committerAdam J. Stewart <ajstewart426@gmail.com>2019-10-23 14:13:21 -0500
commitb7536eb3323309b47a2f17883f0ad75cf1fa1e90 (patch)
tree3e366d3093af1dcec45b46f626d53581ea9a7b1b
parent26ec644fc8718f134900e613780669c0c9b9e951 (diff)
downloadspack-b7536eb3323309b47a2f17883f0ad75cf1fa1e90.tar.gz
spack-b7536eb3323309b47a2f17883f0ad75cf1fa1e90.tar.bz2
spack-b7536eb3323309b47a2f17883f0ad75cf1fa1e90.tar.xz
spack-b7536eb3323309b47a2f17883f0ad75cf1fa1e90.zip
hypre: Add new variants to expose existing features. (#13373)
* hypre: Add new variants to expost existing features. * hypre: Add new variants to expose existing features. * hypre: Shorten description line. * hypre: Add an explicit else clause to disable some features.
-rw-r--r--var/spack/repos/builtin/packages/hypre/package.py41
1 files changed, 36 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/hypre/package.py b/var/spack/repos/builtin/packages/hypre/package.py
index a244437057..44ff3efc16 100644
--- a/var/spack/repos/builtin/packages/hypre/package.py
+++ b/var/spack/repos/builtin/packages/hypre/package.py
@@ -41,14 +41,18 @@ class Hypre(Package):
# between versions 2.12.1 and 2.13.0.
variant('shared', default=(sys.platform != 'darwin'),
description="Build shared library (disables static library)")
- # SuperluDist have conflicting headers with those in Hypre
- variant('internal-superlu', default=True,
- description="Use internal Superlu routines")
+ # Use internal SuperLU routines for FEI - version 2.12.1 and below
+ variant('internal-superlu', default=False,
+ description="Use internal SuperLU routines")
variant('superlu-dist', default=False,
- description='Activates support for SuperluDist')
+ description='Activates support for SuperLU_Dist library')
variant('int64', default=False,
description="Use 64bit integers")
+ variant('mixedint', default=False,
+ description="Use 64bit integers while reducing memory use")
+ variant('complex', default=False, description='Use complex values')
variant('mpi', default=True, description='Enable MPI support')
+ variant('openmp', default=False, description='Enable OpenMP support')
variant('debug', default=False,
description='Build debug instead of optimized version')
@@ -71,6 +75,16 @@ class Hypre(Package):
# versions before 2.13.0
conflicts("+shared@:2.12.99 platform=darwin")
+ # Conflicts
+ # Option added in v2.13.0
+ conflicts('+superlu-dist', when='@:2.12.99')
+
+ # Internal SuperLU Option removed in v2.13.0
+ conflicts('+internal-superlu', when='@2.13.0:')
+
+ # Option added in v2.16.0
+ conflicts('+mixedint', when='@:2.15.99')
+
def url_for_version(self, version):
if version >= Version('2.12.0'):
url = 'https://github.com/hypre-space/hypre/archive/v{0}.tar.gz'
@@ -100,8 +114,25 @@ class Hypre(Package):
else:
configure_args.append('--without-MPI')
+ if '+openmp' in self.spec:
+ configure_args.append('--with-openmp')
+ else:
+ configure_args.append('--without-openmp')
+
if '+int64' in self.spec:
configure_args.append('--enable-bigint')
+ else:
+ configure_args.append('--disable-bigint')
+
+ if '+mixedint' in self.spec:
+ configure_args.append('--enable-mixedint')
+ else:
+ configure_args.append('--disable-mixedint')
+
+ if '+complex' in self.spec:
+ configure_args.append('--enable-complex')
+ else:
+ configure_args.append('--disable-complex')
if '+shared' in self.spec:
configure_args.append("--enable-shared")
@@ -112,7 +143,7 @@ class Hypre(Package):
configure_args.append("--without-mli")
configure_args.append("--without-fei")
- if 'superlu-dist' in self.spec:
+ 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' %