summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/trilinos/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/trilinos/package.py')
-rw-r--r--var/spack/repos/builtin/packages/trilinos/package.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py
index 6c0fa49262..beb1b38ba5 100644
--- a/var/spack/repos/builtin/packages/trilinos/package.py
+++ b/var/spack/repos/builtin/packages/trilinos/package.py
@@ -45,6 +45,7 @@ class Trilinos(CMakePackage):
homepage = "https://trilinos.org/"
base_url = "https://github.com/trilinos/Trilinos/archive"
+ version('develop', git='https://github.com/trilinos/Trilinos.git', tag='master')
version('12.10.1', '40f28628b63310f9bd17c26d9ebe32b1')
version('12.8.1', '01c0026f1e2050842857db941060ecd5')
version('12.6.4', 'c2ea7b5aa0d10bcabdb9b9a6e3bac3ea')
@@ -62,6 +63,8 @@ class Trilinos(CMakePackage):
return '%s/trilinos-release-%s.tar.gz' % \
(Trilinos.base_url, version.dashed)
+ variant('xsdkflags', default=False,
+ description='Compile using the default xSDK configuration')
variant('metis', default=True,
description='Compile with METIS and ParMETIS')
variant('mumps', default=True,
@@ -157,11 +160,24 @@ class Trilinos(CMakePackage):
'-DTrilinos_ENABLE_EXPLICIT_INSTANTIATION:BOOL=ON',
'-DTrilinos_ENABLE_CXX11:BOOL=ON',
'-DTPL_ENABLE_Netcdf:BOOL=ON',
- '-DTPL_ENABLE_HYPRE:BOOL=%s' % (
- 'ON' if '+hypre' in spec else 'OFF'),
'-DCMAKE_INSTALL_NAME_DIR:PATH=%s/lib' % self.prefix
])
+ # Force Trilinos to use the MPI wrappers instead of raw compilers
+ # this is needed on Apple systems that require full resolution of
+ # all symbols when linking shared libraries
+ options.extend([
+ '-DCMAKE_C_COMPILER=%s' % spec['mpi'].mpicc,
+ '-DCMAKE_CXX_COMPILER=%s' % spec['mpi'].mpicxx,
+ '-DCMAKE_Fortran_COMPILER=%s' % spec['mpi'].mpifc
+ ])
+ if '+hypre' in spec:
+ options.extend([
+ '-DTPL_ENABLE_HYPRE:BOOL=ON',
+ '-DHYPRE_INCLUDE_DIRS:PATH=%s' % spec['hypre'].prefix.include,
+ '-DHYPRE_LIBRARY_DIRS:PATH=%s' % spec['hypre'].prefix.lib
+ ])
+
if spec.satisfies('%intel') and spec.satisfies('@12.6.2'):
# Panzer uses some std:chrono that is not recognized by Intel
# Don't know which (maybe all) Trilinos versions this applies to
@@ -170,6 +186,8 @@ class Trilinos(CMakePackage):
'-DTrilinos_ENABLE_Panzer:BOOL=OFF'
])
+ if '+xsdkflags' in spec:
+ options.extend(['-DUSE_XSDK_DEFAULTS=YES'])
if '+hdf5' in spec:
options.extend([
'-DTPL_ENABLE_HDF5:BOOL=ON',