Skip to content

Commit

Permalink
Zee: new option to include timemory (spack#639)
Browse files Browse the repository at this point in the history
- on BB5 : use the deployed timemory to avoid rebuild
- on local ubuntu : use a simple timemory
  • Loading branch information
WeinaJi committed Jan 3, 2020
1 parent cfb9370 commit 7443484
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deploy/configs/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ packages:
paths:
tar@1.26: /usr
version: [1.26]
timemory:
variants: +mpi+cuda+cupti+caliper~gperftools~python@3.0.0a
tk:
paths:
tk@8.5.13: /usr
Expand Down
2 changes: 2 additions & 0 deletions sysconfig/ubuntu-18.04/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ packages:
paths:
tcl@8.6: /usr
version: [8.6]
timemory:
variants: ~caliper~cuda~cupti~gperftools~papi~python~mpi
trilinos:
variants: ~hypre
all:
Expand Down
6 changes: 6 additions & 0 deletions var/spack/repos/builtin/packages/zee/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class Zee(CMakePackage):
variant('codechecks', default=False,
description='Perform additional code checks like ' +
'formatting or static analysis')
variant('timemory', default=False,
description='Add timemory API for time/memory measurement')

depends_on('boost')
depends_on('cmake@3:', type='build')
depends_on('pkg-config', type='build')
Expand All @@ -46,6 +49,7 @@ class Zee(CMakePackage):

depends_on('metis+int64')
depends_on('petsc +int64', when='+petsc')
depends_on('timemory', when='+timemory')

def _bob_options(self):
cmake_var_prefix = self.name.capitalize() + '_CXX_'
Expand All @@ -61,6 +65,8 @@ def _bob_options(self):
yield '-DPYTHON_EXECUTABLE:FILEPATH=' + self.spec['python'].command.path
yield '-DZee_FORMATTING:BOOL=TRUE'
yield '-DZee_TEST_FORMATTING:BOOL=TRUE'
if '+timemory' in self.spec:
yield '-DZee_USE_TIMEMORY:BOOL=ON'

def cmake_args(self):
return list(self._bob_options())

0 comments on commit 7443484

Please sign in to comment.