summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorJon Rood <jon.rood@nrel.gov>2018-10-15 12:03:11 -0600
committerPeter Scheibel <scheibel1@llnl.gov>2018-10-15 11:03:11 -0700
commit3a2088b4f7038d559da58462b9d5d14a7dd7d9a5 (patch)
tree58e63028009a81e796eb23962317916bf186382b /var
parent91f9a25905f7c1032252a3e3bc8e0c1a4477ec1c (diff)
downloadspack-3a2088b4f7038d559da58462b9d5d14a7dd7d9a5.tar.gz
spack-3a2088b4f7038d559da58462b9d5d14a7dd7d9a5.tar.bz2
spack-3a2088b4f7038d559da58462b9d5d14a7dd7d9a5.tar.xz
spack-3a2088b4f7038d559da58462b9d5d14a7dd7d9a5.zip
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).
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/nalu-wind/package.py10
-rw-r--r--var/spack/repos/builtin/packages/nalu/package.py10
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py7
3 files changed, 22 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/nalu-wind/package.py b/var/spack/repos/builtin/packages/nalu-wind/package.py
index 8ea04adf92..2c5c4679f4 100644
--- a/var/spack/repos/builtin/packages/nalu-wind/package.py
+++ b/var/spack/repos/builtin/packages/nalu-wind/package.py
@@ -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')
diff --git a/var/spack/repos/builtin/packages/nalu/package.py b/var/spack/repos/builtin/packages/nalu/package.py
index 89084f51d3..f7e566e73f 100644
--- a/var/spack/repos/builtin/packages/nalu/package.py
+++ b/var/spack/repos/builtin/packages/nalu/package.py
@@ -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')
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index acce7d173e..ffa836734f 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -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'))