nalu-wind: remove SuperLU dependency from Trilinos and simplify recipe (#23600)

* Update Nalu-Wind to remove SuperLU from Trilinos requirement. Also simplify Nalu-Wind package.

* Leave boost option in nalu-wind.

* Add git branches into TPL requirements. Update OpenFAST for change to main branch.
This commit is contained in:
Jon Rood 2021-05-13 03:18:43 -06:00 committed by GitHub
parent 8a40a3a70f
commit 97e6c0fda4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 30 deletions

View file

@ -20,15 +20,12 @@ class NaluWind(CMakePackage, CudaPackage):
homepage = "https://nalu-wind.readthedocs.io" homepage = "https://nalu-wind.readthedocs.io"
git = "https://github.com/exawind/nalu-wind.git" git = "https://github.com/exawind/nalu-wind.git"
maintainers = ['jrood-nrel', 'sayerhs'] maintainers = ['jrood-nrel']
tags = ['ecp', 'ecp-apps'] tags = ['ecp', 'ecp-apps']
version('master', branch='master') version('master', branch='master')
# Options
variant('shared', default=(sys.platform != 'darwin'),
description='Build dependencies as shared libraries')
variant('pic', default=True, variant('pic', default=True,
description='Position independent code') description='Position independent code')
variant('abs_tol', default=1.0e-15, variant('abs_tol', default=1.0e-15,
@ -37,7 +34,6 @@ class NaluWind(CMakePackage, CudaPackage):
variant('rel_tol', default=1.0e-12, variant('rel_tol', default=1.0e-12,
values=_parse_float, values=_parse_float,
description='Relative tolerance for regression tests') description='Relative tolerance for regression tests')
# Third party libraries
variant('openfast', default=False, variant('openfast', default=False,
description='Compile with OpenFAST support') description='Compile with OpenFAST support')
variant('tioga', default=False, variant('tioga', default=False,
@ -48,50 +44,34 @@ class NaluWind(CMakePackage, CudaPackage):
description='Compile with Catalyst support') description='Compile with Catalyst support')
variant('fftw', default=False, variant('fftw', default=False,
description='Compile with FFTW support') description='Compile with FFTW support')
variant('openmp', default=False,
description='Compile with OpenMP support')
variant('boost', default=False, variant('boost', default=False,
description='Enable Boost integration') description='Enable Boost integration')
variant('wind-utils', default=False, variant('wind-utils', default=False,
description='Build wind-utils') description='Build wind-utils')
# Required dependencies
depends_on('mpi') depends_on('mpi')
depends_on('yaml-cpp@0.5.3:', when='+shared') depends_on('yaml-cpp@0.5.3:')
depends_on('yaml-cpp~shared@0.5.3:', when='~shared') depends_on('trilinos@master,develop ~cuda~wrapper+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist~superlu+hdf5+zlib+pnetcdf+shards~hypre', when='~cuda')
# Cannot build Trilinos as a shared library with STK on Darwin # Cannot build Trilinos as a shared library with STK on Darwin
# which is why we have a 'shared' variant for Nalu-Wind
# https://github.com/trilinos/Trilinos/issues/2994 # https://github.com/trilinos/Trilinos/issues/2994
depends_on('trilinos@master,develop ~cuda~wrapper+shared+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf+shards~hypre', when='~cuda+shared') depends_on('trilinos@master,develop ~cuda~wrapper+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist~superlu+hdf5+zlib+pnetcdf+shards~hypre~shared', when=(sys.platform == 'darwin'))
depends_on('trilinos@master,develop ~cuda~wrapper~shared+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf+shards~hypre', when='~cuda~shared') depends_on('openfast@master,develop +cxx', when='+openfast')
# Optional dependencies depends_on('tioga@master,develop', when='+tioga')
depends_on('openfast@develop +cxx+shared', when='+openfast+shared') depends_on('hypre@develop,2.18.2: +mpi~superlu-dist', when='+hypre')
depends_on('openfast@develop +cxx~shared', when='+openfast~shared')
depends_on('tioga@master +shared', when='+tioga+shared~cuda')
depends_on('tioga@master ~shared', when='+tioga~shared~cuda')
depends_on('tioga@develop ~shared', when='+tioga~shared+cuda')
depends_on('hypre@2.18.2: +mpi~cuda+int64~superlu-dist+shared', when='+hypre~cuda+shared')
depends_on('hypre@2.18.2: +mpi~cuda+int64~superlu-dist~shared', when='+hypre~cuda~shared')
depends_on('kokkos-nvcc-wrapper', type='build', when='+cuda') depends_on('kokkos-nvcc-wrapper', type='build', when='+cuda')
for _arch in CudaPackage.cuda_arch_values: for _arch in CudaPackage.cuda_arch_values:
depends_on('trilinos@master,develop ~shared+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf+shards~hypre+cuda+cuda_rdc+wrapper cuda_arch={0}'.format(_arch), depends_on('trilinos@master,develop ~shared+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist~superlu+hdf5+zlib+pnetcdf+shards~hypre+cuda+cuda_rdc+wrapper cuda_arch={0}'.format(_arch),
when='+cuda cuda_arch={0}'.format(_arch)) when='+cuda cuda_arch={0}'.format(_arch))
depends_on('hypre@develop +mpi+cuda~int64~superlu-dist cuda_arch={0}'.format(_arch), depends_on('hypre@develop +mpi+cuda~int64~superlu-dist cuda_arch={0}'.format(_arch),
when='+hypre+cuda cuda_arch={0}'.format(_arch)) when='+hypre+cuda cuda_arch={0}'.format(_arch))
depends_on('trilinos-catalyst-ioss-adapter', when='+catalyst') depends_on('trilinos-catalyst-ioss-adapter', when='+catalyst')
# FFTW doesn't have a 'shared' variant at this moment
depends_on('fftw+mpi', when='+fftw') depends_on('fftw+mpi', when='+fftw')
depends_on('boost cxxstd=14', when='+boost') depends_on('boost cxxstd=14', when='+boost')
conflicts('+cuda', when='+shared')
def cmake_args(self): def cmake_args(self):
spec = self.spec spec = self.spec
args = [ args = [
self.define_from_variant('BUILD_SHARED_LIBS', 'shared'),
self.define_from_variant('CMAKE_POSITION_INDEPENDENT_CODE', 'pic'), self.define_from_variant('CMAKE_POSITION_INDEPENDENT_CODE', 'pic'),
self.define('CMAKE_CXX_COMPILER', spec['mpi'].mpicxx), self.define('CMAKE_CXX_COMPILER', spec['mpi'].mpicxx),
self.define('CMAKE_C_COMPILER', spec['mpi'].mpicc), self.define('CMAKE_C_COMPILER', spec['mpi'].mpicc),
@ -101,7 +81,6 @@ def cmake_args(self):
self.define_from_variant('ENABLE_CUDA', 'cuda'), self.define_from_variant('ENABLE_CUDA', 'cuda'),
self.define_from_variant('ENABLE_WIND_UTILS', 'wind-utils'), self.define_from_variant('ENABLE_WIND_UTILS', 'wind-utils'),
self.define_from_variant('ENABLE_BOOST', 'boost'), self.define_from_variant('ENABLE_BOOST', 'boost'),
self.define_from_variant('ENABLE_OPENMP', 'openmp'),
] ]
args.append(self.define_from_variant('ENABLE_OPENFAST', 'openfast')) args.append(self.define_from_variant('ENABLE_OPENFAST', 'openfast'))

View file

@ -15,7 +15,7 @@ class Openfast(CMakePackage):
maintainers = ['jrood-nrel'] maintainers = ['jrood-nrel']
version('develop', branch='dev') version('develop', branch='dev')
version('master', branch='master') version('master', branch='main')
variant('shared', default=True, variant('shared', default=True,
description="Build shared libraries") description="Build shared libraries")