diff options
Diffstat (limited to 'var/spack/repos/builtin')
-rw-r--r-- | var/spack/repos/builtin/packages/portage/package.py | 34 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/tangram/package.py | 20 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/wonton/package.py | 14 |
3 files changed, 39 insertions, 29 deletions
diff --git a/var/spack/repos/builtin/packages/portage/package.py b/var/spack/repos/builtin/packages/portage/package.py index 331e4aed48..3ec7cca307 100644 --- a/var/spack/repos/builtin/packages/portage/package.py +++ b/var/spack/repos/builtin/packages/portage/package.py @@ -25,7 +25,6 @@ class Portage(CMakePackage): variant('mpi', default=True, description='Support MPI') variant('tangram', default=False, description='Use Tangram interface reconstruction package') variant('jali', default=False, description='Include support for Jali mesh framework') - variant('flecsisp', default=False, description='Include support for FleCSI mesh framework') variant('thrust', default=False, description='Enable on-node parallelism using NVidia Thrust library') variant('kokkos', default=False, description='Enable on-node or device parallelism with Kokkos') variant('openmp', default=False, description="Enable on-node parallelism using OpenMP") @@ -34,23 +33,23 @@ class Portage(CMakePackage): depends_on("cmake@3.13:", type='build') depends_on('mpi', when='+mpi') + depends_on('kokkos', when='+kokkos') + depends_on('thrust', when='+thrust') + depends_on('jali', when='+jali') depends_on('tangram', when='+tangram') - depends_on('tangram+mpi', when='+tangram+mpi') - depends_on('tangram+jali', when='+tangram+jali') - depends_on('tangram+flecsisp', when='+tangram+flecsisp') - depends_on('tangram+thrust', when='+tangram+thrust') - depends_on('tangram+kokkos', when='+tangram+kokkos') - depends_on('tangram+cuda', when='+tangram+cuda') + + for _variant in ['mpi', 'jali', 'openmp', 'thrust', 'kokkos', 'cuda']: + depends_on('tangram+' + _variant, when='+tangram+' + _variant) + depends_on('tangram~' + _variant, when='+tangram~' + _variant) depends_on('wonton') - depends_on('wonton+mpi', when='+mpi') - depends_on('wonton+jali', when='+jali') - depends_on('wonton+flecsisp', when='+flecsisp') - depends_on('wonton+thrust', when='+thrust') - depends_on('wonton+kokkos', when='+kokkos') - depends_on('wonton+openmp', when='+openmp') - depends_on('wonton+cuda', when='+cuda') + # Wonton depends array + wonton_variant = ['mpi', 'jali', 'openmp', 'thrust', 'kokkos', 'cuda'] + + for _variant in wonton_variant: + depends_on('wonton+' + _variant, when='+' + _variant) + depends_on('wonton~' + _variant, when='~' + _variant) # Jali needs MPI conflicts('+jali ~mpi') @@ -84,7 +83,7 @@ class Portage(CMakePackage): else: options.append('-DPORTAGE_ENABLE_Jali=OFF') - if '+flecsi' in self.spec: + if '+flecsisp' in self.spec: options.append('-DPORTAGE_ENABLE_FleCSI=ON') else: options.append('-DPORTAGE_ENABLE_FleCSI=OFF') @@ -103,3 +102,8 @@ class Portage(CMakePackage): options.append('-DENABLE_APP_TESTS=OFF') return options + + def check(self): + if self.run_tests: + with working_dir(self.build_directory): + make("test") diff --git a/var/spack/repos/builtin/packages/tangram/package.py b/var/spack/repos/builtin/packages/tangram/package.py index 265cc11574..3c54c07328 100644 --- a/var/spack/repos/builtin/packages/tangram/package.py +++ b/var/spack/repos/builtin/packages/tangram/package.py @@ -22,7 +22,7 @@ class Tangram(CMakePackage): version('1.0.1', sha256='8f2f8c01bb2d726b0f64e5a5bc3aa2bd8057ccaee7a29c68f1439d16e39aaa90') version('master', branch='master', submodules=True) - variant('mpi', default=True, + variant('mpi', default=False, description='Enable interface reconstruction with MPI') variant('thrust', default=False, description='Enable on-node parallelism with NVidia Thrust') @@ -46,15 +46,12 @@ class Tangram(CMakePackage): depends_on('cmake@3.13:', type='build') depends_on('mpi', when='+mpi') +# Wonton depends array + wonton_depends = ['mpi', 'jali', 'openmp', 'thrust', 'kokkos', 'cuda'] - depends_on('wonton') - depends_on('wonton+jali', when='+jali') - depends_on('wonton~mpi', when='~mpi') - depends_on('wonton+mpi', when='+mpi') - depends_on('wonton+thrust', when='+thrust') - depends_on('wonton+kokkos', when='+kokkos') - depends_on('wonton+cuda', when='+cuda') - depends_on('wonton+openmp', when='+openmp') + for _variant in wonton_depends: + depends_on('wonton+' + _variant, when='+' + _variant) + depends_on('wonton~' + _variant, when='~' + _variant) def cmake_args(self): options = [] @@ -87,3 +84,8 @@ class Tangram(CMakePackage): options.append('-DENABLE_APP_TESTS=OFF') return options + + def check(self): + if self.run_tests: + with working_dir(self.build_directory): + make("test") diff --git a/var/spack/repos/builtin/packages/wonton/package.py b/var/spack/repos/builtin/packages/wonton/package.py index 9dd5492488..292ce177f6 100644 --- a/var/spack/repos/builtin/packages/wonton/package.py +++ b/var/spack/repos/builtin/packages/wonton/package.py @@ -33,7 +33,7 @@ class Wonton(CMakePackage): variant('kokkos', default=False, description='Enable on-node or device parallelism with Kokkos') variant('openmp', default=False, description="Enable on-node parallelism using OpenMP") variant('cuda', default=False, description="Enable GPU parallelism using CUDA") - + variant('flecsi', default=False, description="Enable FlecSI") # wrappers to external mesh/state libraries variant('jali', default=False, description='Enable Jali mesh wrappers') @@ -47,6 +47,7 @@ class Wonton(CMakePackage): depends_on('netlib-lapack +lapacke', when='+lapacke') depends_on('mpi', when='+mpi') + depends_on('flecsi', when='+flecsi') depends_on('jali +mstk', when='+jali') depends_on('mpi', when='+jali') @@ -113,10 +114,8 @@ class Wonton(CMakePackage): else: options.append('-DWONTON_ENABLE_Jali=OFF') - if '+flecsi' in self.spec: - options.append('-DWONTON_ENABLE_FleCSI=ON') - else: - options.append('-DWONTON_ENABLE_FleCSI=OFF') + # BROKEN DEPENDENCY!!!!!! + options.append(define_from_variant('WONTON_ENABLE_FleCSI', 'flecsi')) # Unit test variant if self.run_tests: @@ -127,3 +126,8 @@ class Wonton(CMakePackage): options.append('-DENABLE_APP_TESTS=OFF') return options + + def check(self): + if self.run_tests: + with working_dir(self.build_directory): + make("test") |