Skip to content
Snippets Groups Projects
Unverified Commit 16a9464b authored by Cody Balos's avatar Cody Balos Committed by GitHub
Browse files

sundials: add version 5.1.0 and trilinos variant (#15155)

* sundials: add version 5.1.0 and trilinos variant

* sundials: add version 5.1.0 and trilinos variant
parent 6764a946
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,7 @@ class Sundials(CMakePackage): ...@@ -21,6 +21,7 @@ class Sundials(CMakePackage):
# Versions # Versions
# ========================================================================== # ==========================================================================
version('develop', branch='develop') version('develop', branch='develop')
version('5.1.0', sha256='fb22d14fad42203809dc46d046b001149ec4e901b23882bd4a80619157fd9b21')
version('5.0.0', sha256='345141ec01c641d0bdfb3476c478b7e74fd6a7192a478a27cafe75d9da2d7dd3') version('5.0.0', sha256='345141ec01c641d0bdfb3476c478b7e74fd6a7192a478a27cafe75d9da2d7dd3')
version('4.1.0', sha256='280de1c27b2360170a6f46cb3799b2aee9dff3bddbafc8b08c291a47ab258aa5') version('4.1.0', sha256='280de1c27b2360170a6f46cb3799b2aee9dff3bddbafc8b08c291a47ab258aa5')
version('4.0.1', sha256='29e409c8620e803990edbda1ebf49e03a38c08b9187b90658d86bddae913aed4') version('4.0.1', sha256='29e409c8620e803990edbda1ebf49e03a38c08b9187b90658d86bddae913aed4')
...@@ -65,9 +66,9 @@ class Sundials(CMakePackage): ...@@ -65,9 +66,9 @@ class Sundials(CMakePackage):
variant('pthread', default=False, variant('pthread', default=False,
description='Enable Pthreads parallel vector') description='Enable Pthreads parallel vector')
variant('cuda', default=False, variant('cuda', default=False,
description='Enable CUDA parallel vector') description='Enable CUDA vector and solvers')
variant('raja', default=False, variant('raja', default=False,
description='Enable RAJA parallel vector') description='Enable RAJA vector')
# External libraries # External libraries
variant('hypre', default=False, variant('hypre', default=False,
...@@ -77,11 +78,13 @@ class Sundials(CMakePackage): ...@@ -77,11 +78,13 @@ class Sundials(CMakePackage):
variant('klu', default=False, variant('klu', default=False,
description='Enable KLU sparse, direct solver') description='Enable KLU sparse, direct solver')
variant('petsc', default=False, variant('petsc', default=False,
description='Enable PETSc MPI parallel vector') description='Enable PETSc interfaces')
variant('superlu-mt', default=False, variant('superlu-mt', default=False,
description='Enable SuperLU_MT sparse, direct solver') description='Enable SuperLU_MT sparse, direct solver')
variant('superlu-dist', default=False, variant('superlu-dist', default=False,
description='Enable SuperLU_DIST sparse, direct solver') description='Enable SuperLU_DIST sparse, direct solver')
variant('trilinos', default=False,
description='Enable Trilinos interfaces')
# Library type # Library type
variant('shared', default=True, variant('shared', default=True,
...@@ -130,6 +133,7 @@ class Sundials(CMakePackage): ...@@ -130,6 +133,7 @@ class Sundials(CMakePackage):
conflicts('+examples-cuda', when='@:2.7.0') conflicts('+examples-cuda', when='@:2.7.0')
conflicts('+superlu-dist', when='@:4.1.0') conflicts('+superlu-dist', when='@:4.1.0')
conflicts('+f2003', when='@:4.1.0') conflicts('+f2003', when='@:4.1.0')
conflicts('+trilinos', when='@:4.1.0')
# External libraries incompatible with 64-bit indices # External libraries incompatible with 64-bit indices
conflicts('+lapack', when='@3.0.0: +int64') conflicts('+lapack', when='@3.0.0: +int64')
...@@ -173,6 +177,7 @@ class Sundials(CMakePackage): ...@@ -173,6 +177,7 @@ class Sundials(CMakePackage):
depends_on('petsc +mpi', when='+petsc') depends_on('petsc +mpi', when='+petsc')
depends_on('hypre +mpi', when='+hypre') depends_on('hypre +mpi', when='+hypre')
depends_on('superlu-dist@6.1.1:', when='+superlu-dist') depends_on('superlu-dist@6.1.1:', when='+superlu-dist')
depends_on('trilinos+tpetra', when='+trilinos')
# Require that external libraries built with the same precision # Require that external libraries built with the same precision
depends_on('petsc~double~complex', when='+petsc precision=single') depends_on('petsc~double~complex', when='+petsc precision=single')
...@@ -253,8 +258,7 @@ def on_off(varstr): ...@@ -253,8 +258,7 @@ def on_off(varstr):
'-DMPI_ENABLE=%s' % on_off('+mpi'), '-DMPI_ENABLE=%s' % on_off('+mpi'),
'-DOPENMP_ENABLE=%s' % on_off('+openmp'), '-DOPENMP_ENABLE=%s' % on_off('+openmp'),
'-DPTHREAD_ENABLE=%s' % on_off('+pthread'), '-DPTHREAD_ENABLE=%s' % on_off('+pthread'),
'-DCUDA_ENABLE=%s' % on_off('+cuda'), '-DCUDA_ENABLE=%s' % on_off('+cuda')
'-DRAJA_ENABLE=%s' % on_off('+raja')
]) ])
# MPI support # MPI support
...@@ -274,6 +278,10 @@ def on_off(varstr): ...@@ -274,6 +278,10 @@ def on_off(varstr):
'-DHYPRE_INCLUDE_DIR=%s' % spec['hypre'].prefix.include, '-DHYPRE_INCLUDE_DIR=%s' % spec['hypre'].prefix.include,
'-DHYPRE_LIBRARY_DIR=%s' % spec['hypre'].prefix.lib '-DHYPRE_LIBRARY_DIR=%s' % spec['hypre'].prefix.lib
]) ])
else:
args.extend([
'-DHYPRE_ENABLE=OFF'
])
# Building with KLU # Building with KLU
if '+klu' in spec: if '+klu' in spec:
...@@ -282,6 +290,10 @@ def on_off(varstr): ...@@ -282,6 +290,10 @@ def on_off(varstr):
'-DKLU_INCLUDE_DIR=%s' % spec['suite-sparse'].prefix.include, '-DKLU_INCLUDE_DIR=%s' % spec['suite-sparse'].prefix.include,
'-DKLU_LIBRARY_DIR=%s' % spec['suite-sparse'].prefix.lib '-DKLU_LIBRARY_DIR=%s' % spec['suite-sparse'].prefix.lib
]) ])
else:
args.extend([
'-DKLU_ENABLE=OFF'
])
# Building with LAPACK # Building with LAPACK
if '+lapack' in spec: if '+lapack' in spec:
...@@ -290,6 +302,10 @@ def on_off(varstr): ...@@ -290,6 +302,10 @@ def on_off(varstr):
'-DLAPACK_LIBRARIES=%s' '-DLAPACK_LIBRARIES=%s'
% (spec['lapack'].libs + spec['blas'].libs).joined(';') % (spec['lapack'].libs + spec['blas'].libs).joined(';')
]) ])
else:
args.extend([
'-DLAPACK_ENABLE=OFF'
])
# Building with PETSc # Building with PETSc
if '+petsc' in spec: if '+petsc' in spec:
...@@ -302,12 +318,21 @@ def on_off(varstr): ...@@ -302,12 +318,21 @@ def on_off(varstr):
'-DPETSC_INCLUDE_DIR=%s' % spec['petsc'].prefix.include, '-DPETSC_INCLUDE_DIR=%s' % spec['petsc'].prefix.include,
'-DPETSC_LIBRARY_DIR=%s' % spec['petsc'].prefix.lib '-DPETSC_LIBRARY_DIR=%s' % spec['petsc'].prefix.lib
]) ])
else:
args.extend([
'-DPETSC_ENABLE=OFF'
])
# Building with RAJA # Building with RAJA
if '+raja' in spec: if '+raja' in spec:
args.extend([ args.extend([
'-DRAJA_ENABLE=ON',
'-DRAJA_DIR=%s' % spec['raja'].prefix.share.raja.cmake '-DRAJA_DIR=%s' % spec['raja'].prefix.share.raja.cmake
]) ])
else:
args.extend([
'-DRAJA_ENABLE=OFF'
])
# Building with SuperLU_MT # Building with SuperLU_MT
if '+superlu-mt' in spec: if '+superlu-mt' in spec:
...@@ -327,6 +352,10 @@ def on_off(varstr): ...@@ -327,6 +352,10 @@ def on_off(varstr):
args.append('-DSUPERLUMT_THREAD_TYPE=OpenMP') args.append('-DSUPERLUMT_THREAD_TYPE=OpenMP')
else: else:
args.append('-DSUPERLUMT_THREAD_TYPE=Pthread') args.append('-DSUPERLUMT_THREAD_TYPE=Pthread')
else:
args.extend([
'-DSUPERLUMT_ENABLE=OFF'
])
# Building with SuperLU_DIST # Building with SuperLU_DIST
if '+superlu-dist' in spec: if '+superlu-dist' in spec:
...@@ -341,6 +370,22 @@ def on_off(varstr): ...@@ -341,6 +370,22 @@ def on_off(varstr):
'-DSUPERLUDIST_OpenMP=%s' '-DSUPERLUDIST_OpenMP=%s'
% on_off('^superlu-dist+openmp') % on_off('^superlu-dist+openmp')
]) ])
else:
args.extend([
'-DSUPERLUDIST_ENABLE=OFF'
])
# Building with Trilinos
if '+trilinos' in spec:
args.extend([
'-DTrilinos_ENABLE=ON',
'-DTrilinos_DIR=%s'
% spec['trilinos'].prefix
])
else:
args.extend([
'-DTrilinos_ENABLE=OFF'
])
# Examples # Examples
if spec.satisfies('@3.0.0:'): if spec.satisfies('@3.0.0:'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment