summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/extrae/package.py20
1 files changed, 20 insertions, 0 deletions
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)