diff options
author | Jon Rood <jon.rood@nrel.gov> | 2017-07-13 08:14:15 -0600 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2017-07-13 09:14:15 -0500 |
commit | 47fe9e7aad850bf2d650b33e5faa32cb7fe312a4 (patch) | |
tree | fbea6027cc26f804aa780bc0c026a013aba62684 /var | |
parent | bde58a319b5837bf24cc6d2cc4fec5a2e597a854 (diff) | |
download | spack-47fe9e7aad850bf2d650b33e5faa32cb7fe312a4.tar.gz spack-47fe9e7aad850bf2d650b33e5faa32cb7fe312a4.tar.bz2 spack-47fe9e7aad850bf2d650b33e5faa32cb7fe312a4.tar.xz spack-47fe9e7aad850bf2d650b33e5faa32cb7fe312a4.zip |
Adding OpenMP variant to Trilinos. Also building NetCDF with PNetCDF directly, for Trilinos. (#4687)
* Adding OpenMP variant to Trilinos. Also building NetCDF with PNetCDF in Trilinos when necessary.
* Adding runtime error for PNetCDF variant in Trilinos when necessary. Omitting unnecessary openmp variant for Trilinos in Nalu.
* Changing variant checks to conflicts statements.
* Adding comments to Trilinos package.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/trilinos/package.py | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index f3d1f61111..74022f0833 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -151,6 +151,8 @@ class Trilinos(CMakePackage): description='Enable DataTransferKit') variant('fortrilinos', default=False, description='Enable ForTrilinos') + variant('openmp', default=False, + description='Enable OpenMP') resource(name='dtk', git='https://github.com/ornl-cees/DataTransferKit', @@ -167,6 +169,13 @@ class Trilinos(CMakePackage): conflicts('+fortrilinos', when='~fortran') conflicts('+fortrilinos', when='@:99') conflicts('+fortrilinos', when='@master') + # Can only use one type of SuperLU + conflicts('+superlu-dist', when='+superlu') + # For Trilinos v11 we need to force SuperLUDist=OFF, since only the + # deprecated SuperLUDist v3.3 together with an Amesos patch is working. + conflicts('+superlu-dist', when='@:11.14.3') + # PnetCDF was only added after v12.10.1 + conflicts('+pnetcdf', when='@:12.10.1') # ###################### Dependencies ########################## @@ -183,9 +192,9 @@ class Trilinos(CMakePackage): # MPI related dependencies depends_on('mpi') - depends_on('netcdf+mpi') - depends_on('parallel-netcdf', when="+pnetcdf@master") - depends_on('parallel-netcdf', when="+pnetcdf@12.10.2:") + depends_on('netcdf+mpi', when="~pnetcdf") + depends_on('netcdf+mpi+parallel-netcdf', when="+pnetcdf@master") + depends_on('netcdf+mpi+parallel-netcdf', when="+pnetcdf@12.10.2:") depends_on('parmetis', when='+metis') # Trilinos' Tribits config system is limited which makes it very tricky to # link Amesos with static MUMPS, see @@ -218,23 +227,8 @@ class Trilinos(CMakePackage): url = "https://github.com/trilinos/Trilinos/archive/trilinos-release-{0}.tar.gz" return url.format(version.dashed) - # check that the combination of variants makes sense - def variants_check(self): - if ('+superlu-dist' in self.spec and - self.spec.satisfies('@11.14.1:11.14.3')): - # For Trilinos v11 we need to force SuperLUDist=OFF, since only the - # deprecated SuperLUDist v3.3 together with an Amesos patch is - # working. - raise RuntimeError('The superlu-dist variant can only be used' + - ' with Trilinos @12.0.1:') - if '+superlu-dist' in self.spec and '+superlu' in self.spec: - # Only choose one type of superlu - raise RuntimeError('The superlu-dist and superlu variant' + - ' cannot be used together') - def cmake_args(self): spec = self.spec - self.variants_check() cxx_flags = [] options = [] @@ -346,7 +340,8 @@ class Trilinos(CMakePackage): '-DTrilinos_ENABLE_SEACASEpu:BOOL=ON', '-DTrilinos_ENABLE_SEACASExodiff:BOOL=ON', '-DTrilinos_ENABLE_SEACASNemspread:BOOL=ON', - '-DTrilinos_ENABLE_SEACASNemslice:BOOL=ON' + '-DTrilinos_ENABLE_SEACASNemslice:BOOL=ON', + '-DTrilinos_ENABLE_SEACASIoss:BOOL=ON' ]) else: options.extend([ @@ -527,6 +522,17 @@ class Trilinos(CMakePackage): # ################# Miscellaneous Stuff ###################### + # OpenMP + if '+openmp' in spec: + options.extend([ + '-DTrilinos_ENABLE_OpenMP:BOOL=ON', + '-DKokkos_ENABLE_OpenMP:BOOL=ON' + ]) + if '+tpetra' in spec: + options.extend([ + '-DTpetra_INST_OPENMP:BOOL=ON' + ]) + # Fortran lib if '+fortran' in spec: if spec.satisfies('%gcc') or spec.satisfies('%clang'): |