diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/extrae/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/extrae/package.py | 129 |
1 files changed, 67 insertions, 62 deletions
diff --git a/var/spack/repos/builtin/packages/extrae/package.py b/var/spack/repos/builtin/packages/extrae/package.py index 79a1e11bce..92ed12e571 100644 --- a/var/spack/repos/builtin/packages/extrae/package.py +++ b/var/spack/repos/builtin/packages/extrae/package.py @@ -29,25 +29,25 @@ from spack.pkg.builtin.boost import Boost 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 - target application so as to gather information regarding the - application performance. The Extrae instrumentation package can - instrument the MPI programin model, and the following parallel - programming models either alone or in conjunction with MPI : - OpenMP, CUDA, OpenCL, pthread, OmpSs""" + be analyzed later by Paraver. Extrae is a tool that uses + different interposition mechanisms to inject probes into the + target application so as to gather information regarding the + application performance. The Extrae instrumentation package can + instrument the MPI programin model, and the following parallel + programming models either alone or in conjunction with MPI : + 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" + url = "https://ftp.tools.bsc.es/extrae/extrae-3.4.1-src.tar.bz2" - version('3.8.3', sha256='c3bf27fb6f18e66200e40a0b4c35bc257766e5c1a525dc5725f561879e88bf32') - version('3.7.1', sha256='c83ddd18a380c9414d64ee5de263efc6f7bac5fe362d5b8374170c7f18360378') - version('3.4.1', sha256='77bfec16d6b5eee061fbaa879949dcef4cad28395d6a546b1ae1b9246f142725') + version("3.8.3", sha256="c3bf27fb6f18e66200e40a0b4c35bc257766e5c1a525dc5725f561879e88bf32") + version("3.7.1", sha256="c83ddd18a380c9414d64ee5de263efc6f7bac5fe362d5b8374170c7f18360378") + version("3.4.1", sha256="77bfec16d6b5eee061fbaa879949dcef4cad28395d6a546b1ae1b9246f142725") - depends_on("autoconf", type='build') - depends_on("automake", type='build') - depends_on("libtool", type='build') - depends_on("m4", type='build') + 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("libunwind") @@ -66,56 +66,61 @@ class Extrae(AutotoolsPackage): # gettext dependency added to find -lintl # https://www.gnu.org/software/gettext/FAQ.html#integrating_undefined - build_directory = 'spack-build' + build_directory = "spack-build" - variant('dyninst', default=False, description="Use dyninst for dynamic code installation") - depends_on('dyninst@:9', when='+dyninst') + 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') + variant("papi", default=True, description="Use PAPI to collect performance counters") + depends_on("papi", when="+papi") - variant('cuda', default=False, description="Enable support for tracing CUDA") - depends_on('cuda', when='+cuda') + variant("cuda", default=False, description="Enable support for tracing CUDA") + depends_on("cuda", when="+cuda") - variant('cupti', default=False, description='Enable CUPTI support') - depends_on('cuda', when='+cupti') - conflicts('+cupti', when='~cuda', msg='CUPTI requires CUDA') + variant("cupti", default=False, description="Enable CUPTI support") + depends_on("cuda", when="+cupti") + conflicts("+cupti", when="~cuda", msg="CUPTI requires CUDA") def configure_args(self): spec = self.spec - if '^intel-oneapi-mpi' in spec: - mpiroot = spec['mpi'].component_prefix + if "^intel-oneapi-mpi" in spec: + mpiroot = spec["mpi"].component_prefix else: - mpiroot = spec['mpi'].prefix - - args = ["--with-mpi=%s" % mpiroot, - "--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"]) - - args += (["--with-cuda=%s" % spec['cuda'].prefix] - if '+cuda' in self.spec else - ["--without-cuda"]) - - if '+cupti' in self.spec: - cupti_h = find_headers('cupti', spec['cuda'].prefix, - recursive=True) + mpiroot = spec["mpi"].prefix + + args = [ + "--with-mpi=%s" % mpiroot, + "--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"] + ) + + args += ( + ["--with-cuda=%s" % spec["cuda"].prefix] + if "+cuda" in self.spec + else ["--without-cuda"] + ) + + if "+cupti" in self.spec: + cupti_h = find_headers("cupti", spec["cuda"].prefix, recursive=True) cupti_dir = os.path.dirname(os.path.dirname(cupti_h[0])) - args += (["--with-cupti=%s" % cupti_dir] - if '+cupti' in self.spec else - ["--without-cupti"]) + args += ["--with-cupti=%s" % cupti_dir] if "+cupti" in self.spec else ["--without-cupti"] if spec.satisfies("^dyninst@9.3.0:"): make.add_default_arg("CXXFLAGS=%s" % self.compiler.cxx11_flag) @@ -126,23 +131,23 @@ class Extrae(AutotoolsPackage): # https://www.gnu.org/software/gettext/FAQ.html#integrating_undefined # - linking error # https://github.com/bsc-performance-tools/extrae/issues/57 - args.append('LDFLAGS=-lintl -pthread') + args.append("LDFLAGS=-lintl -pthread") - return(args) + 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) + if spec.satisfies("@3.7:"): + make("install", parallel=True) else: - make('install', parallel=False) + make("install", parallel=False) def setup_run_environment(self, env): # set EXTRAE_HOME in the module file - env.set('EXTRAE_HOME', self.prefix) + env.set("EXTRAE_HOME", self.prefix) def setup_dependent_build_environment(self, env, dependent_spec): # set EXTRAE_HOME for everyone using the Extrae package - env.set('EXTRAE_HOME', self.prefix) + env.set("EXTRAE_HOME", self.prefix) |