summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Böhme <boehme3@llnl.gov>2021-03-05 06:30:57 -0800
committerGitHub <noreply@github.com>2021-03-05 15:30:57 +0100
commit098b7b2e50261f6ef26a333a024ff5ab6b2f0521 (patch)
tree093172be6afeae4a6bad48cc04b961beb241fe29
parent71dd8ed265715204da6907b7bd35d40f16daf49e (diff)
downloadspack-098b7b2e50261f6ef26a333a024ff5ab6b2f0521.tar.gz
spack-098b7b2e50261f6ef26a333a024ff5ab6b2f0521.tar.bz2
spack-098b7b2e50261f6ef26a333a024ff5ab6b2f0521.tar.xz
spack-098b7b2e50261f6ef26a333a024ff5ab6b2f0521.zip
Add Caliper 2.5.0 and Adiak 0.3.0 (#20718)
-rw-r--r--var/spack/repos/builtin/packages/adiak/package.py7
-rw-r--r--var/spack/repos/builtin/packages/caliper/package.py57
2 files changed, 44 insertions, 20 deletions
diff --git a/var/spack/repos/builtin/packages/adiak/package.py b/var/spack/repos/builtin/packages/adiak/package.py
index efea0d1c46..02c1ca81eb 100644
--- a/var/spack/repos/builtin/packages/adiak/package.py
+++ b/var/spack/repos/builtin/packages/adiak/package.py
@@ -12,10 +12,17 @@ class Adiak(CMakePackage):
homepage = "https://github.com/LLNL/Adiak"
url = "https://github.com/LLNL/Adiak/releases/download/v0.1/adiak-v0.1.1.tar.gz"
+ git = "https://github.com/LLNL/Adiak"
+
+ maintainers = ["daboehme", "mplegendre"]
variant('mpi', default=True, description='Build with MPI support')
variant('shared', default=True, description='Build dynamic libraries')
+ version('0.3.0-alpha', commit='054d2693a977ed0e1f16c665b4966bb90924779e',
+ submodules=True)
+ version('0.2.1', commit='950e3bfb91519ecb7b7ee7fa3063bfab23c0e2c9',
+ submodules=True, preferred=True)
version('0.1.1', sha256='438e4652e15e206cd0019423d829fd4f2329323ff0c8861d9586bae051d9624b')
depends_on('mpi', when='+mpi')
diff --git a/var/spack/repos/builtin/packages/caliper/package.py b/var/spack/repos/builtin/packages/caliper/package.py
index ef420e6782..b550527189 100644
--- a/var/spack/repos/builtin/packages/caliper/package.py
+++ b/var/spack/repos/builtin/packages/caliper/package.py
@@ -8,7 +8,7 @@ from spack import *
import sys
-class Caliper(CMakePackage):
+class Caliper(CMakePackage, CudaPackage):
"""Caliper is a program instrumentation and performance measurement
framework. It is designed as a performance analysis toolbox in a
library, allowing one to bake performance analysis capabilities
@@ -17,9 +17,12 @@ class Caliper(CMakePackage):
homepage = "https://github.com/LLNL/Caliper"
git = "https://github.com/LLNL/Caliper.git"
+ url = "https://github.com/LLNL/Caliper/archive/v2.5.0.tar.gz"
- version('master')
- version('2.5.0', tag='v2.5.0')
+ maintainers = ["daboehme"]
+
+ version('master', branch='master')
+ version('2.5.0', sha256='d553e60697d61c53de369b9ca464eb30710bda90fba9671201543b64eeac943c')
version('2.4.0', tag='v2.4.0')
version('2.3.0', tag='v2.3.0')
version('2.2.0', tag='v2.2.0')
@@ -37,15 +40,15 @@ class Caliper(CMakePackage):
description='Enable Adiak support')
variant('mpi', default=True,
description='Enable MPI wrappers')
- variant('dyninst', default=False,
- description='Enable symbol translation support with dyninst')
# libunwind has some issues on Mac
- variant('callpath', default=sys.platform != 'darwin',
- description='Enable callpath service (requires libunwind)')
+ variant('libunwind', default=sys.platform != 'darwin',
+ description='Enable stack unwind support')
+ variant('libdw', default=is_linux,
+ description='Enable DWARF symbol lookup')
# pthread_self() signature is incompatible with PAPI_thread_init() on Mac
variant('papi', default=sys.platform != 'darwin',
description='Enable PAPI service')
- variant('libpfm', default=is_linux,
+ variant('libpfm', default=False,
description='Enable libpfm (perf_events) service')
# Gotcha is Linux-only
variant('gotcha', default=is_linux,
@@ -59,15 +62,14 @@ class Caliper(CMakePackage):
depends_on('adiak@0.1:0.99', when='@2.2: +adiak')
- depends_on('dyninst@10.0:10.99', when='@2: +dyninst')
-
depends_on('papi@5.3:5.99', when='@:2.2 +papi')
depends_on('papi@5.3:6.99', when='@2.3: +papi')
depends_on('libpfm4@4.8:4.99', when='+libpfm')
depends_on('mpi', when='+mpi')
- depends_on('unwind@1.2:1.99', when='+callpath')
+ depends_on('unwind@1.2:1.99', when='+libunwind')
+ depends_on('elfutils', when='+libdw')
depends_on('sosflow@spack', when='@1.0:1.99+sosflow')
@@ -75,12 +77,9 @@ class Caliper(CMakePackage):
depends_on('python', type='build')
# sosflow support not yet in 2.0
- conflicts('+sosflow', '@2.0.0:2.4.99')
+ conflicts('+sosflow', '@2.0.0:2.5.99')
conflicts('+adiak', '@:2.1.99')
-
- # The Dyninst 9.X used by v1.9.X is deprecated
- conflicts('+dyninst', when='@:1.99',
- msg='Dyninst unsupported by version <=2.0.1')
+ conflicts('+libdw', '@:2.4.99')
patch('for_aarch64.patch', when='target=aarch64:')
@@ -94,10 +93,9 @@ class Caliper(CMakePackage):
'-DBUILD_DOCS=Off',
'-DBUILD_SHARED_LIBS=%s' % ('On' if '+shared' in spec else 'Off'),
'-DWITH_ADIAK=%s' % ('On' if '+adiak' in spec else 'Off'),
- '-DWITH_DYNINST=%s' % ('On' if '+dyninst' in spec else 'Off'),
- '-DWITH_CALLPATH=%s' % ('On' if '+callpath' in spec else 'Off'),
'-DWITH_GOTCHA=%s' % ('On' if '+gotcha' in spec else 'Off'),
'-DWITH_PAPI=%s' % ('On' if '+papi' in spec else 'Off'),
+ '-DWITH_LIBDW=%s' % ('On' if '+libdw' in spec else 'Off'),
'-DWITH_LIBPFM=%s' % ('On' if '+libpfm' in spec else 'Off'),
'-DWITH_SOSFLOW=%s' % ('On' if '+sosflow' in spec else 'Off'),
'-DWITH_SAMPLER=%s' % ('On' if '+sampler' in spec else 'Off'),
@@ -107,15 +105,34 @@ class Caliper(CMakePackage):
if '+papi' in spec:
args.append('-DPAPI_PREFIX=%s' % spec['papi'].prefix)
+ if '+libdw' in spec:
+ args.append('-DLIBDW_PREFIX=%s' % spec['elfutils'].prefix)
if '+libpfm' in spec:
args.append('-DLIBPFM_INSTALL=%s' % spec['libpfm4'].prefix)
if '+sosflow' in spec:
args.append('-DSOS_PREFIX=%s' % spec['sosflow'].prefix)
- if '+callpath' in spec:
- args.append('-DLIBUNWIND_PREFIX=%s' % spec['libunwind'].prefix)
+
+ # -DWITH_CALLPATH was renamed -DWITH_LIBUNWIND in 2.5
+ callpath_flag = 'LIBUNWIND' if spec.satisfies('@2.5:') else 'CALLPATH'
+ if '+libunwind' in spec:
+ args.append('-DLIBUNWIND_PREFIX=%s' % spec['unwind'].prefix)
+ args.append('-DWITH_%s=On' % callpath_flag)
+ else:
+ args.append('-DWITH_%s=Off' % callpath_flag)
if '+mpi' in spec:
args.append('-DMPI_C_COMPILER=%s' % spec['mpi'].mpicc)
args.append('-DMPI_CXX_COMPILER=%s' % spec['mpi'].mpicxx)
+ if '+cuda' in spec:
+ args.append('-DCUDA_TOOLKIT_ROOT_DIR=%s' % spec['cuda'].prefix)
+ # technically only works with cuda 10.2+, otherwise cupti is in
+ # ${CUDA_TOOLKIT_ROOT_DIR}/extras/CUPTI
+ args.append('-DCUPTI_PREFIX=%s' % spec['cuda'].prefix)
+ args.append('-DWITH_NVTX=On')
+ args.append('-DWITH_CUPTI=On')
+ else:
+ args.append('-DWITH_NVTX=Off')
+ args.append('-DWITH_CUPTI=Off')
+
return args