summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/hpctoolkit-externals/package.py29
-rw-r--r--var/spack/repos/builtin/packages/hpctoolkit/package.py86
2 files changed, 67 insertions, 48 deletions
diff --git a/var/spack/repos/builtin/packages/hpctoolkit-externals/package.py b/var/spack/repos/builtin/packages/hpctoolkit-externals/package.py
deleted file mode 100644
index 1c7c7c4622..0000000000
--- a/var/spack/repos/builtin/packages/hpctoolkit-externals/package.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
-# Spack Project Developers. See the top-level COPYRIGHT file for details.
-#
-# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-
-from spack import *
-
-
-class HpctoolkitExternals(Package):
- """HPCToolkit performance analysis tool has many prerequisites and
- HpctoolkitExternals package provides all these prerequisites."""
-
- homepage = "http://hpctoolkit.org"
- git = "https://github.com/HPCToolkit/hpctoolkit-externals.git"
-
- version('master')
- version('2017.06', tag='release-2017.06')
-
- parallel = False
-
- def install(self, spec, prefix):
-
- options = ['CC=%s' % self.compiler.cc,
- 'CXX=%s' % self.compiler.cxx]
-
- with working_dir('spack-build', create=True):
- configure = Executable('../configure')
- configure('--prefix=%s' % prefix, *options)
- make('install')
diff --git a/var/spack/repos/builtin/packages/hpctoolkit/package.py b/var/spack/repos/builtin/packages/hpctoolkit/package.py
index 0f4d188d4f..449f61d6c9 100644
--- a/var/spack/repos/builtin/packages/hpctoolkit/package.py
+++ b/var/spack/repos/builtin/packages/hpctoolkit/package.py
@@ -6,7 +6,7 @@
from spack import *
-class Hpctoolkit(Package):
+class Hpctoolkit(AutotoolsPackage):
"""HPCToolkit is an integrated suite of tools for measurement and analysis
of program performance on computers ranging from multicore desktop systems
to the nation's largest supercomputers. By using statistical sampling of
@@ -17,31 +17,79 @@ class Hpctoolkit(Package):
homepage = "http://hpctoolkit.org"
git = "https://github.com/HPCToolkit/hpctoolkit.git"
- version('master')
- version('2017.06', tag='release-2017.06')
+ version('develop', branch='master')
+ version('2018.11.05', commit='d0c43e39020e67095b1f1d8bb89b75f22b12aee9')
- variant('mpi', default=True, description='Enable MPI supoort')
- variant('papi', default=True, description='Enable PAPI counter support')
+ # We can't build with both PAPI and perfmon for risk of segfault
+ # from mismatched header files (unless PAPI installs the perfmon
+ # headers).
+ variant('papi', default=False,
+ description='Use PAPI instead of perfmon for access to '
+ 'the hardware performance counters.')
+ # We always support profiling MPI applications. +mpi builds
+ # hpcprof-mpi, the MPI version of hpcprof.
+ variant('mpi', default=False,
+ description='Build hpcprof-mpi, the MPI version of hpcprof.')
+
+ variant('all-static', default=False,
+ description='Needed when MPICXX builds static binaries '
+ 'for the compute nodes.')
+
+ boost_libs = '+atomic +graph +regex +serialization' \
+ '+shared +multithreaded'
+
+ depends_on('binutils+libiberty~nls')
+ depends_on('boost' + boost_libs)
+ depends_on('bzip2')
+ depends_on('dyninst')
+ depends_on('elfutils~nls')
+ depends_on('intel-tbb')
+ depends_on('libdwarf')
+ depends_on('libmonitor+hpctoolkit')
+ depends_on('libunwind@2018.10.0:')
+ depends_on('xerces-c transcoder=iconv')
+ depends_on('xz')
+ depends_on('zlib')
+
+ depends_on('intel-xed', when='target=x86_64')
depends_on('papi', when='+papi')
+ depends_on('libpfm4', when='~papi')
depends_on('mpi', when='+mpi')
- depends_on('hpctoolkit-externals@2017.06', when='@2017.06')
- depends_on('hpctoolkit-externals@master', when='@master')
- def install(self, spec, prefix):
+ flag_handler = AutotoolsPackage.build_system_flags
- options = ['CC=%s' % self.compiler.cc,
- 'CXX=%s' % self.compiler.cxx,
- '--with-externals=%s' % spec['hpctoolkit-externals'].prefix]
+ def configure_args(self):
+ spec = self.spec
+ target = spec.architecture.target
- if '+mpi' in spec:
- options.extend(['MPICXX=%s' % spec['mpi'].mpicxx])
+ args = [
+ '--with-binutils=%s' % spec['binutils'].prefix,
+ '--with-boost=%s' % spec['boost'].prefix,
+ '--with-bzip=%s' % spec['bzip2'].prefix,
+ '--with-dyninst=%s' % spec['dyninst'].prefix,
+ '--with-elfutils=%s' % spec['elfutils'].prefix,
+ '--with-tbb=%s' % spec['intel-tbb'].prefix,
+ '--with-libdwarf=%s' % spec['libdwarf'].prefix,
+ '--with-libmonitor=%s' % spec['libmonitor'].prefix,
+ '--with-libunwind=%s' % spec['libunwind'].prefix,
+ '--with-xerces=%s' % spec['xerces-c'].prefix,
+ '--with-lzma=%s' % spec['xz'].prefix,
+ '--with-zlib=%s' % spec['zlib'].prefix,
+ ]
+
+ if target == 'x86_64':
+ args.append('--with-xed=%s' % spec['intel-xed'].prefix)
if '+papi' in spec:
- options.extend(['--with-papi=%s' % spec['papi'].prefix])
+ args.append('--with-papi=%s' % spec['papi'].prefix)
+ else:
+ args.append('--with-perfmon=%s' % spec['libpfm4'].prefix)
+
+ if '+mpi' in spec:
+ args.append('MPICXX=%s' % spec['mpi'].mpicxx)
+
+ if '+all-static' in spec:
+ args.append('--enable-all-static')
- # TODO: BG-Q configure option
- with working_dir('spack-build', create=True):
- configure = Executable('../configure')
- configure('--prefix=%s' % prefix, *options)
- make('install')
+ return args