summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authormic84 <mrosso@lbl.gov>2020-07-01 23:28:57 -0700
committerGitHub <noreply@github.com>2020-07-02 08:28:57 +0200
commit509b3c30161512f519978efbf0fbde7aacf2d1ba (patch)
tree694a8b223c7e7f3f9a17310fd05fac28d3cbd893 /var
parent8a9fa9bd18f226f34574a440d1ae6e13917a78d2 (diff)
downloadspack-509b3c30161512f519978efbf0fbde7aacf2d1ba.tar.gz
spack-509b3c30161512f519978efbf0fbde7aacf2d1ba.tar.bz2
spack-509b3c30161512f519978efbf0fbde7aacf2d1ba.tar.xz
spack-509b3c30161512f519978efbf0fbde7aacf2d1ba.zip
amrex: added v20.07 (#17337)
Also added support for hdf5, petsc and hypre
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/amrex/package.py32
1 files changed, 31 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/amrex/package.py b/var/spack/repos/builtin/packages/amrex/package.py
index f6cb778f4b..1f90ed1e57 100644
--- a/var/spack/repos/builtin/packages/amrex/package.py
+++ b/var/spack/repos/builtin/packages/amrex/package.py
@@ -18,6 +18,7 @@ class Amrex(CMakePackage):
maintainers = ['mic84', 'asalmgren']
version('develop', branch='development')
+ version('20.07', sha256='c386f566f4c57ee56b5630f79ce2c6117d5a612a4aab69b7b26e48d577251165')
version('20.06', sha256='be2f2a5107111fcb8b3928b76024b370c7cb01a9e5dd79484cf7fcf59d0b4858')
version('20.05', sha256='97d753bb75e845a0a959ec1a044a48e6adb86dd008b5e29ce7a01d49ed276338')
version('20.04', sha256='a7ece54d5d89cc00fd555551902a0d4d0fb50db15d2600f441353eed0dddd83b')
@@ -57,6 +58,12 @@ class Amrex(CMakePackage):
values=('Debug', 'Release'))
variant('sundials', default=False,
description='Build AMReX with SUNDIALS support')
+ variant('hdf5', default=False,
+ description='Enable HDF5-based I/O')
+ variant('hypre', default=False,
+ description='Enable Hypre interfaces')
+ variant('petsc', default=False,
+ description='Enable PETSc interfaces')
# Build dependencies
depends_on('mpi', when='+mpi')
@@ -68,6 +75,24 @@ class Amrex(CMakePackage):
conflicts('%apple-clang')
conflicts('%clang')
+ # Check options compatibility
+ conflicts('+sundials', when='~fortran',
+ msg='AMReX SUNDIALS support needs AMReX Fortran API (+fortran)')
+ conflicts('+hdf5', when='@:20.06',
+ msg='AMReX HDF5 support needs AMReX newer than version 20.06')
+ conflicts('+hypre', when='@:20.06',
+ msg='AMReX Hypre support needs AMReX newer than version 20.06')
+ conflicts('+hypre', when='~fortran',
+ msg='AMReX Hypre support needs AMReX Fortran API (+fortran)')
+ conflicts('+hypre', when='~linear_solvers',
+ msg='AMReX Hypre support needs variant +linear_solvers')
+ conflicts('+petsc', when='@:20.06',
+ msg='AMReX PETSc support needs AMReX newer than version 20.06')
+ conflicts('+petsc', when='~fortran',
+ msg='AMReX PETSc support needs AMReX Fortran API (+fortran)')
+ conflicts('+petsc', when='~linear_solvers',
+ msg='AMReX PETSc support needs variant +linear_solvers')
+
def url_for_version(self, version):
if version >= Version('20.05'):
url = "https://github.com/AMReX-Codes/amrex/releases/download/{0}/amrex-{0}.tar.gz"
@@ -89,11 +114,16 @@ class Amrex(CMakePackage):
self.spec.variants['precision'].value.upper(),
'-DENABLE_EB:BOOL=%s' % self.cmake_is_on('+eb'),
'-DXSDK_ENABLE_Fortran:BOOL=%s' % self.cmake_is_on('+fortran'),
+ '-DENABLE_FORTRAN_INTERFACES:BOOL=%s'
+ % self.cmake_is_on('+fortran'),
'-DENABLE_LINEAR_SOLVERS:BOOL=%s' %
self.cmake_is_on('+linear_solvers'),
'-DENABLE_AMRDATA:BOOL=%s' % self.cmake_is_on('+amrdata'),
'-DENABLE_PARTICLES:BOOL=%s' % self.cmake_is_on('+particles'),
- '-DENABLE_SUNDIALS:BOOL=%s' % self.cmake_is_on('+sundials')
+ '-DENABLE_SUNDIALS:BOOL=%s' % self.cmake_is_on('+sundials'),
+ '-DENABLE_HDF5:BOOL=%s' % self.cmake_is_on('+hdf5'),
+ '-DENABLE_HYPRE:BOOL=%s' % self.cmake_is_on('+hypre'),
+ '-DENABLE_PETSC:BOOL=%s' % self.cmake_is_on('+petsc'),
]
if self.spec.satisfies('%fj'):
args.append('-DCMAKE_Fortran_MODDIR_FLAG=-M')