From e22da8df057c607ddc586956caa60a76ff25574d Mon Sep 17 00:00:00 2001 From: Hervé Yviquel Date: Tue, 25 May 2021 14:34:28 -0300 Subject: extrae package: add variant for cuda and cupti (#23522) --- var/spack/repos/builtin/packages/extrae/package.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/extrae/package.py b/var/spack/repos/builtin/packages/extrae/package.py index 07a7d52150..d4531876e0 100644 --- a/var/spack/repos/builtin/packages/extrae/package.py +++ b/var/spack/repos/builtin/packages/extrae/package.py @@ -67,6 +67,13 @@ class Extrae(AutotoolsPackage): 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('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 args = ["--with-mpi=%s" % spec['mpi'].prefix, @@ -85,6 +92,19 @@ class Extrae(AutotoolsPackage): 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"]) + 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) -- cgit v1.2.3-60-g2f50