summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorPhil Tooley <32297355+ptooley@users.noreply.github.com>2019-08-30 19:28:14 +0100
committerPeter Scheibel <scheibel1@llnl.gov>2019-08-30 11:28:14 -0700
commitf759eda3aefb87e6b5e7cd46fdee69f55b243f91 (patch)
tree78e5fe2990316ce91d8d374b6b5a839d3b64d6b6 /var
parent517846003f4fa64b9269c6ae833817669f17772f (diff)
downloadspack-f759eda3aefb87e6b5e7cd46fdee69f55b243f91.tar.gz
spack-f759eda3aefb87e6b5e7cd46fdee69f55b243f91.tar.bz2
spack-f759eda3aefb87e6b5e7cd46fdee69f55b243f91.tar.xz
spack-f759eda3aefb87e6b5e7cd46fdee69f55b243f91.zip
extrae package: add 3.7.1, optionalise dyninst, papi (#11978)
* Convert to Autotools package * dyninst and papi are now optional (off by default) * limit dyninst version to < 10 (see https://github.com/bsc-performance-tools/extrae/issues/30) * Add numactl dependency * Enable parallel installs for 3.7 and later * Set EXTRAE_HOME in module files and for dependent package installs * Generalize cxx11 support flag (previously it was using a specific syntax and this updates it to use the cxx11 support flag for the compiler in use).
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/extrae/package.py92
1 files changed, 57 insertions, 35 deletions
diff --git a/var/spack/repos/builtin/packages/extrae/package.py b/var/spack/repos/builtin/packages/extrae/package.py
index b749196349..d8428fb125 100644
--- a/var/spack/repos/builtin/packages/extrae/package.py
+++ b/var/spack/repos/builtin/packages/extrae/package.py
@@ -24,7 +24,7 @@ from spack import *
# LDFLAGS=-pthread
-class Extrae(Package):
+class Extrae(AutotoolsPackage):
"""Extrae is the package devoted to generate tracefiles which can
be analyzed later by Paraver. Extrae is a tool that uses
different interposition mechanisms to inject probes into the
@@ -35,54 +35,76 @@ class Extrae(Package):
OpenMP, CUDA, OpenCL, pthread, OmpSs"""
homepage = "https://tools.bsc.es/extrae"
url = "https://ftp.tools.bsc.es/extrae/extrae-3.4.1-src.tar.bz2"
+ version('3.7.1', sha256='95810b057f95e91bfc89813eb8bd320dfe40614fc8e98c63d95c5101c56dd213')
version('3.4.1', '69001f5cfac46e445d61eeb567bc8844')
+ depends_on("autoconf", type='build')
+ depends_on("automake", type='build')
+ depends_on("libtool", type='build')
+ depends_on("m4", type='build')
+
depends_on("mpi")
- depends_on("dyninst")
depends_on("libunwind")
depends_on("boost")
depends_on("libdwarf")
depends_on("papi")
depends_on("elf", type="link")
depends_on("libxml2")
-
+ depends_on("numactl")
+ depends_on("binutils+libiberty")
+ depends_on("gettext")
# gettext dependency added to find -lintl
# https://www.gnu.org/software/gettext/FAQ.html#integrating_undefined
- depends_on("gettext")
- depends_on("binutils+libiberty")
- def install(self, spec, prefix):
- if 'openmpi' in spec:
- mpi = spec['openmpi']
- elif 'mpich' in spec:
- mpi = spec['mpich']
- elif 'mvapich2' in spec:
- mpi = spec['mvapich2']
+ build_directory = 'spack-build'
+
+ variant('dyninst', default=False, description="Use dyninst for dynamic code installation")
+ depends_on('dyninst@:9', when='+dyninst')
+
+ variant('papi', default=True, description="Use PAPI to collect performance counters")
+ depends_on('papi', when='+papi')
- extra_config_args = []
+ def configure_args(self):
+ spec = self.spec
+ args = ["--with-mpi=%s" % spec['mpi'].prefix,
+ "--with-unwind=%s" % spec['libunwind'].prefix,
+ "--with-boost=%s" % spec['boost'].prefix,
+ "--with-dwarf=%s" % spec['libdwarf'].prefix,
+ "--with-elf=%s" % spec['elf'].prefix,
+ "--with-xml-prefix=%s" % spec['libxml2'].prefix,
+ "--with-binutils=%s" % spec['binutils'].prefix]
+
+ args += (["--with-papi=%s" % spec['papi'].prefix]
+ if '+papi' in self.spec else
+ ["--without-papi"])
+
+ args += (["--with-dyninst=%s" % spec['dyninst'].prefix]
+ if '+dyninst' in self.spec else
+ ["--without-dyninst"])
+
+ if spec.satisfies("^dyninst@9.3.0:"):
+ make.add_default_arg("CXXFLAGS=%s" % self.compiler.cxx11_flag)
+ args.append("CXXFLAGS=%s" % self.compiler.cxx11_flag)
# This was added due to configure failure
# https://www.gnu.org/software/gettext/FAQ.html#integrating_undefined
- extra_config_args.append('LDFLAGS=-lintl')
+ args.append('LDFLAGS=-lintl')
- if spec.satisfies("^dyninst@9.3.0:"):
- make.add_default_arg('CXXFLAGS=-std=c++11')
- extra_config_args.append('CXXFLAGS=-std=c++11')
-
- configure("--prefix=%s" % prefix,
- "--with-mpi=%s" % mpi.prefix,
- "--with-unwind=%s" % spec['libunwind'].prefix,
- "--with-dyninst=%s" % spec['dyninst'].prefix,
- "--with-boost=%s" % spec['boost'].prefix,
- "--with-dwarf=%s" % spec['libdwarf'].prefix,
- "--with-papi=%s" % spec['papi'].prefix,
- "--with-dyninst-headers=%s" % spec[
- 'dyninst'].prefix.include,
- "--with-elf=%s" % spec['elf'].prefix,
- "--with-xml-prefix=%s" % spec['libxml2'].prefix,
- "--with-binutils=%s" % spec['binutils'].prefix,
- "--with-dyninst-libs=%s" % spec['dyninst'].prefix.lib,
- *extra_config_args)
-
- make()
- make("install", parallel=False)
+ return(args)
+
+ def install(self, spec, prefix):
+ with working_dir(self.build_directory):
+ # parallel installs are buggy prior to 3.7
+ # see https://github.com/bsc-performance-tools/extrae/issues/18
+ if(spec.satisfies('@3.7:')):
+ make('install', parallel=True)
+ else:
+ make('install', parallel=False)
+
+ def setup_environment(self, spack_env, run_env):
+ # set EXTRAE_HOME in the module file
+ run_env.set('EXTRAE_HOME', self.prefix)
+
+ def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
+ # set EXTRAE_HOME for everyone using the Extrae package
+ spack_env.set('EXTRAE_HOME', self.prefix)