Updates to Exawind packages (#25568)
This commit is contained in:
parent
e51463f587
commit
a018f48df9
@ -26,9 +26,9 @@ class AmrWind(CMakePackage, CudaPackage):
|
||||
incompressible flow sover for wind turbine and wind farm simulations. """
|
||||
|
||||
homepage = "https://github.com/Exawind/amr-wind"
|
||||
git = "https://github.com/exawind/amr-wind.git"
|
||||
git = "https://github.com/Exawind/amr-wind.git"
|
||||
|
||||
maintainers = ['sayerhs', 'jrood-nrel', 'michaeljbrazell']
|
||||
maintainers = ['jrood-nrel', 'michaeljbrazell']
|
||||
|
||||
tags = ['ecp', 'ecp-apps']
|
||||
|
||||
@ -54,8 +54,6 @@ class AmrWind(CMakePackage, CudaPackage):
|
||||
description='Enable OpenFAST integration')
|
||||
variant('internal-amrex', default=True,
|
||||
description='Use AMRex submodule to build')
|
||||
variant('fortran', default=False,
|
||||
description='Build fortran interfaces')
|
||||
|
||||
conflicts('+openmp', when='+cuda')
|
||||
|
||||
@ -63,16 +61,14 @@ class AmrWind(CMakePackage, CudaPackage):
|
||||
|
||||
for opt in process_amrex_constraints():
|
||||
dopt = '+particles' + opt
|
||||
if '+hypre' in dopt:
|
||||
dopt = "+fortran" + dopt
|
||||
depends_on('amrex@develop' + dopt, when='~internal-amrex' + opt)
|
||||
|
||||
depends_on('hypre+mpi+int64~cuda@2.20.0:', when='+mpi~cuda+hypre')
|
||||
depends_on('hypre~mpi+int64~cuda@2.20.0:', when='~mpi~cuda+hypre')
|
||||
depends_on('hypre+shared+mpi~int64~cuda@2.20.0:', when='+mpi~cuda+hypre')
|
||||
depends_on('hypre+shared~mpi~int64~cuda@2.20.0:', when='~mpi~cuda+hypre')
|
||||
for arch in CudaPackage.cuda_arch_values:
|
||||
depends_on('hypre+mpi~int64+cuda cuda_arch=%s @2.20.0:' % arch,
|
||||
depends_on('hypre+shared+mpi~int64+cuda cuda_arch=%s @2.20.0:' % arch,
|
||||
when='+mpi+cuda+hypre cuda_arch=%s' % arch)
|
||||
depends_on('hypre~mpi~int64+cuda cuda_arch=%s @2.20.0:' % arch,
|
||||
depends_on('hypre+shared~mpi~int64+cuda cuda_arch=%s @2.20.0:' % arch,
|
||||
when='~mpi+cuda+hypre cuda_arch=%s' % arch)
|
||||
depends_on('netcdf-c', when='+netcdf')
|
||||
depends_on('masa', when='+masa')
|
||||
@ -82,7 +78,7 @@ def cmake_args(self):
|
||||
define = CMakePackage.define
|
||||
|
||||
vs = ["mpi", "cuda", "openmp", "netcdf", "hypre", "masa",
|
||||
"openfast", "tests", "fortran"]
|
||||
"openfast", "tests"]
|
||||
args = [
|
||||
self.define_from_variant("AMR_WIND_ENABLE_%s" % v.upper(), v)
|
||||
for v in vs
|
||||
|
40
var/spack/repos/builtin/packages/exawind/package.py
Normal file
40
var/spack/repos/builtin/packages/exawind/package.py
Normal file
@ -0,0 +1,40 @@
|
||||
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class Exawind(CMakePackage):
|
||||
"""Multi-application driver for Exawind project."""
|
||||
|
||||
homepage = "https://github.com/Exawind/exawind-driver"
|
||||
git = "https://github.com/Exawind/exawind-driver.git"
|
||||
|
||||
maintainers = ['jrood-nrel']
|
||||
|
||||
tags = ['ecp', 'ecp-apps']
|
||||
|
||||
version('master', branch='main')
|
||||
|
||||
depends_on('trilinos+stk')
|
||||
depends_on('tioga+shared~nodegid')
|
||||
depends_on('nalu-wind+hypre+openfast+tioga+wind-utils')
|
||||
depends_on('amr-wind+hypre+mpi+netcdf+openfast')
|
||||
depends_on('openfast+cxx+shared@2.6.0')
|
||||
depends_on('yaml-cpp@0.6:')
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
|
||||
args = [
|
||||
self.define('Trilinos_DIR', spec['trilinos'].prefix),
|
||||
self.define('TIOGA_DIR', spec['tioga'].prefix),
|
||||
self.define('Nalu-Wind_DIR', spec['nalu-wind'].prefix),
|
||||
self.define('AMR-Wind_DIR', spec['amr-wind'].prefix),
|
||||
self.define('OpenFAST_DIR', spec['openfast'].prefix),
|
||||
self.define('YAML-CPP_DIR', spec['yaml-cpp'].prefix)
|
||||
]
|
||||
|
||||
return args
|
@ -44,3 +44,10 @@ def configure_args(self):
|
||||
options.extend(['--enable-python-interfaces'])
|
||||
|
||||
return options
|
||||
|
||||
def setup_build_environment(self, env):
|
||||
# Unfortunately can't use this because MASA overwrites it
|
||||
# env.set('CXXFLAGS', self.compiler.cxx11_flag)
|
||||
env.set('CXX', "{0} {1}".format(self.compiler.cxx, self.compiler.cxx11_flag))
|
||||
if self.spec.satisfies('%apple-clang'):
|
||||
env.set('CFLAGS', '-Wno-implicit-function-declaration')
|
||||
|
@ -52,24 +52,25 @@ class NaluWind(CMakePackage, CudaPackage):
|
||||
|
||||
depends_on('mpi')
|
||||
depends_on('yaml-cpp@0.5.3:')
|
||||
depends_on('openfast@master,develop +cxx', when='+openfast')
|
||||
depends_on('tioga@master,develop', when='+tioga')
|
||||
depends_on('hypre@develop,2.18.2: +int64+mpi~superlu-dist', when='+hypre')
|
||||
depends_on('kokkos-nvcc-wrapper', type='build', when='+cuda')
|
||||
depends_on('trilinos@master +exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist~superlu+hdf5+zlib+shards~hypre cxxstd=14')
|
||||
depends_on('trilinos@master,develop ~cuda~wrapper+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist~superlu+hdf5+zlib+shards~hypre cxxstd=14', when='~cuda')
|
||||
# Cannot build Trilinos as a shared library with STK on Darwin
|
||||
# https://github.com/trilinos/Trilinos/issues/2994
|
||||
depends_on('trilinos~shared', when=(sys.platform == 'darwin'))
|
||||
# Propagate cuda options to trilinos and hypre
|
||||
depends_on('trilinos~cuda~wrapper', when='~cuda')
|
||||
depends_on('trilinos+cuda+wrapper+cuda_rdc', when='+cuda')
|
||||
depends_on('hypre@develop +cuda', when='+cuda')
|
||||
depends_on('trilinos@master,develop ~cuda~wrapper+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist~superlu+hdf5+zlib+shards~hypre~shared cxxstd=14', when=(sys.platform == 'darwin'))
|
||||
depends_on('openfast@2.6.0 +cxx', when='+openfast')
|
||||
depends_on('tioga@master,develop', when='+tioga')
|
||||
depends_on('hypre@develop,2.18.2: ~int64+mpi~superlu-dist', when='+hypre')
|
||||
depends_on('kokkos-nvcc-wrapper', type='build', when='+cuda')
|
||||
for _arch in CudaPackage.cuda_arch_values:
|
||||
depends_on('trilinos cuda_arch=' + _arch, when='+cuda cuda_arch=' + _arch)
|
||||
depends_on('hypre cuda_arch=' + _arch, when='+hypre+cuda cuda_arch=' + _arch)
|
||||
depends_on('trilinos@master,develop ~shared+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist~superlu+hdf5+zlib+shards~hypre+cuda+cuda_rdc+wrapper cxxstd=14 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),
|
||||
when='+hypre+cuda cuda_arch={0}'.format(_arch))
|
||||
depends_on('trilinos-catalyst-ioss-adapter', when='+catalyst')
|
||||
depends_on('fftw+mpi', when='+fftw')
|
||||
depends_on('boost cxxstd=14', when='+boost')
|
||||
depends_on('nccmp')
|
||||
# indirect dependency needed to make original concretizer work
|
||||
depends_on('netcdf-c+parallel-netcdf')
|
||||
|
||||
def cmake_args(self):
|
||||
spec = self.spec
|
||||
|
@ -2,28 +2,16 @@
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
class Nccmp(Package, SourceforgePackage):
|
||||
class Nccmp(CMakePackage):
|
||||
"""Compare NetCDF Files"""
|
||||
homepage = "http://nccmp.sourceforge.net/"
|
||||
sourceforge_mirror_path = "nccmp/nccmp-1.8.2.0.tar.gz"
|
||||
url = "https://gitlab.com/remikz/nccmp/-/archive/1.9.0.1/nccmp-1.9.0.1.tar.gz"
|
||||
|
||||
version('1.9.0.1', sha256='81e9753cf451afe8248d44c841e102349e07cde942b11d1f91b5f85feb622b99')
|
||||
version('1.8.9.0', sha256='da5d2b4dcd52aec96e7d96ba4d0e97efebbd40fe9e640535e5ee3d5cd082ae50')
|
||||
version('1.8.2.0', sha256='7f5dad4e8670568a71f79d2bcebb08d95b875506d3d5faefafe1a8b3afa14f18')
|
||||
|
||||
depends_on('netcdf-c')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# Configure says: F90 and F90FLAGS are replaced by FC and
|
||||
# FCFLAGS respectively in this configure, please unset
|
||||
# F90/F90FLAGS and set FC/FCFLAGS instead and rerun configure
|
||||
# again.
|
||||
env.pop('F90', None)
|
||||
env.pop('F90FLAGS', None)
|
||||
|
||||
configure('--prefix=%s' % prefix)
|
||||
make()
|
||||
make("check")
|
||||
make("install")
|
||||
|
@ -16,6 +16,14 @@ class Openfast(CMakePackage):
|
||||
|
||||
version('develop', branch='dev')
|
||||
version('master', branch='main')
|
||||
version('2.6.0', tag='v2.6.0')
|
||||
version('2.5.0', tag='v2.5.0')
|
||||
version('2.4.0', tag='v2.4.0')
|
||||
version('2.3.0', tag='v2.3.0')
|
||||
version('2.2.0', tag='v2.2.0')
|
||||
version('2.1.0', tag='v2.1.0')
|
||||
version('2.0.0', tag='v2.0.0')
|
||||
version('1.0.0', tag='v1.0.0')
|
||||
|
||||
variant('shared', default=True,
|
||||
description="Build shared libraries")
|
||||
|
Loading…
Reference in New Issue
Block a user