Build Nalu-Wind and Trilinos statically on Darwin (#9522)
* Added conflict in Trilinos for STK when building as shared on Darwin. * Created shared variant for Nalu and Nalu-Wind to automatically build Trilinos as static library on Darwin. * Moved ECP tags from Nalu to Nalu-Wind (the latter is the official ECP application).
This commit is contained in:
parent
91f9a25905
commit
3a2088b4f7
3 changed files with 22 additions and 5 deletions
|
@ -22,6 +22,7 @@
|
|||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import sys
|
||||
|
||||
|
||||
class NaluWind(CMakePackage):
|
||||
|
@ -32,6 +33,8 @@ class NaluWind(CMakePackage):
|
|||
|
||||
maintainers = ['jrood-nrel']
|
||||
|
||||
tags = ['ecp', 'ecp-apps']
|
||||
|
||||
version('master', branch='master')
|
||||
|
||||
variant('openfast', default=False,
|
||||
|
@ -40,10 +43,15 @@ class NaluWind(CMakePackage):
|
|||
description='Compile with Tioga support')
|
||||
variant('hypre', default=False,
|
||||
description='Compile with Hypre support')
|
||||
variant('shared', default=(sys.platform != 'darwin'),
|
||||
description='Build Trilinos as shared library')
|
||||
|
||||
depends_on('mpi')
|
||||
depends_on('yaml-cpp@0.5.3:')
|
||||
depends_on('trilinos+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf+shards~hypre@master,develop')
|
||||
depends_on('trilinos+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf+shards~hypre@master,develop', when='+shared')
|
||||
# Cannot build Trilinos as a shared library with STK on Darwin
|
||||
# https://github.com/trilinos/Trilinos/issues/2994
|
||||
depends_on('trilinos~shared+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf+shards~hypre@master,develop', when='~shared')
|
||||
depends_on('openfast+cxx', when='+openfast')
|
||||
depends_on('tioga', when='+tioga')
|
||||
depends_on('hypre+mpi+int64', when='+hypre')
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import sys
|
||||
|
||||
|
||||
class Nalu(CMakePackage):
|
||||
|
@ -34,8 +35,6 @@ class Nalu(CMakePackage):
|
|||
homepage = "https://github.com/NaluCFD/Nalu"
|
||||
git = "https://github.com/NaluCFD/Nalu.git"
|
||||
|
||||
tags = ['ecp', 'ecp-apps']
|
||||
|
||||
version('master', branch='master')
|
||||
|
||||
variant('openfast', default=False,
|
||||
|
@ -44,10 +43,15 @@ class Nalu(CMakePackage):
|
|||
description='Compile with Tioga support')
|
||||
variant('hypre', default=False,
|
||||
description='Compile with Hypre support')
|
||||
variant('shared', default=(sys.platform != 'darwin'),
|
||||
description='Build Trilinos as shared library')
|
||||
|
||||
depends_on('mpi')
|
||||
depends_on('yaml-cpp@0.5.3:')
|
||||
depends_on('trilinos+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf+shards~hypre@master,develop')
|
||||
depends_on('trilinos+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf+shards~hypre@master,develop', when='+shared')
|
||||
# Cannot build Trilinos as a shared library with STK on Darwin
|
||||
# https://github.com/trilinos/Trilinos/issues/2994
|
||||
depends_on('trilinos~shared+exodus+tpetra+muelu+belos+ifpack2+amesos2+zoltan+stk+boost~superlu-dist+superlu+hdf5+zlib+pnetcdf+shards~hypre@master,develop', when='~shared')
|
||||
depends_on('openfast+cxx', when='+openfast')
|
||||
depends_on('tioga', when='+tioga')
|
||||
depends_on('hypre+mpi+int64', when='+hypre')
|
||||
|
|
|
@ -273,6 +273,11 @@ class Trilinos(CMakePackage):
|
|||
conflicts('+superlu-dist', when='+complex+amesos2')
|
||||
# PnetCDF was only added after v12.10.1
|
||||
conflicts('+pnetcdf', when='@0:12.10.1')
|
||||
# https://github.com/trilinos/Trilinos/issues/2994
|
||||
conflicts(
|
||||
'+shared', when='+stk platform=darwin',
|
||||
msg='Cannot build Trilinos with STK as a shared library on Darwin.'
|
||||
)
|
||||
|
||||
# ###################### Dependencies ##########################
|
||||
|
||||
|
@ -313,7 +318,7 @@ class Trilinos(CMakePackage):
|
|||
depends_on('hypre~internal-superlu~int64', when='+hypre')
|
||||
depends_on('hypre@xsdk-0.2.0~internal-superlu', when='@xsdk-0.2.0+hypre')
|
||||
depends_on('hypre@develop~internal-superlu', when='@develop+hypre')
|
||||
# FIXME: concretizer bug? 'hl' req by netcdf is affecting this code.
|
||||
# We need hdf5+hl to match with netcdf during concretization
|
||||
depends_on('hdf5+hl+mpi', when='+hdf5')
|
||||
depends_on('python', when='+python')
|
||||
depends_on('py-numpy', when='+python', type=('build', 'run'))
|
||||
|
|
Loading…
Reference in a new issue