extrae package: add variant for cuda and cupti (#23522)

This commit is contained in:
Hervé Yviquel 2021-05-25 14:34:28 -03:00 committed by GitHub
parent c5389c430b
commit e22da8df05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 @@ def configure_args(self):
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)