diff options
author | Mathias Anselmann <mathias.anselmann@posteo.de> | 2020-09-23 01:52:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-22 18:52:05 -0500 |
commit | b578d55d12a75102c25062b73e4ebbf8d54e8de3 (patch) | |
tree | 5bce1b4746bc44b95b670f3ab2487c3d5b4864fb | |
parent | bbb6b14540f34ba68a55a050818afb8821d6a063 (diff) | |
download | spack-b578d55d12a75102c25062b73e4ebbf8d54e8de3.tar.gz spack-b578d55d12a75102c25062b73e4ebbf8d54e8de3.tar.bz2 spack-b578d55d12a75102c25062b73e4ebbf8d54e8de3.tar.xz spack-b578d55d12a75102c25062b73e4ebbf8d54e8de3.zip |
setting old GO default values for older trilinos versioins to (hopefully) not break the installation. Adjusting dealii package to just explicitly set GO if trilinos >= 12.18.1 is installed (#15439)
-rw-r--r-- | var/spack/repos/builtin/packages/dealii/package.py | 2 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/trilinos/package.py | 27 |
2 files changed, 24 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 8d7bd2be81..81cdea10cf 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -155,7 +155,7 @@ class Dealii(CMakePackage, CudaPackage): depends_on('slepc@:3.6.3', when='@:8.4.1+slepc+petsc+mpi') depends_on('slepc~arpack', when='+slepc+petsc+mpi+int64') depends_on('sundials@:3~pthread', when='@9.0:+sundials') - depends_on('trilinos gotype=int', when='+trilinos') + depends_on('trilinos gotype=int', when='+trilinos@12.18.1:') # Both Trilinos and SymEngine bundle the Teuchos RCP library. # This leads to conflicts between macros defined in the included # headers when they are not compiled in the same mode. diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index a5b02f866e..472c6af2a9 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -712,18 +712,37 @@ class Trilinos(CMakePackage): 'explicit_template_instantiation')) if '+explicit_template_instantiation' in spec and '+tpetra' in spec: - gotype = spec.variants['gotype'].value options.extend([ define('Tpetra_INST_DOUBLE', True), - define('Tpetra_INST_INT_INT', gotype == 'int'), - define('Tpetra_INST_INT_LONG', gotype == 'long'), - define('Tpetra_INST_INT_LONG_LONG', gotype == 'long_long'), define('Tpetra_INST_COMPLEX_DOUBLE', complex_s), define('Tpetra_INST_COMPLEX_FLOAT', float_s and complex_s), define('Tpetra_INST_FLOAT', float_s), define('Tpetra_INST_SERIAL', True), ]) + gotype = spec.variants['gotype'].value + # default in older Trilinos versions to enable multiple GOs + if ((gotype == 'none') and spec.satisfies('@:12.14.1')): + options.extend([ + '-DTpetra_INST_INT_INT:BOOL=ON', + '-DTpetra_INST_INT_LONG:BOOL=ON', + '-DTpetra_INST_INT_LONG_LONG:BOOL=ON' + ]) + # set default GO in newer versions to long + elif (gotype == 'none'): + options.extend([ + '-DTpetra_INST_INT_INT:BOOL=OFF', + '-DTpetra_INST_INT_LONG:BOOL=ON', + '-DTpetra_INST_INT_LONG_LONG:BOOL=OFF' + ]) + # if another GO is specified, use this + else: + options.extend([ + define('Tpetra_INST_INT_INT', gotype == 'int'), + define('Tpetra_INST_INT_LONG', gotype == 'long'), + define('Tpetra_INST_INT_LONG_LONG', gotype == 'long_long'), + ]) + # disable due to compiler / config errors: if spec.satisfies('%xl') or spec.satisfies('%xl_r'): options.extend([ |