Papi components (#13706)

* Added support for papi components.

* Restored sha256 hashes to package files.
This commit is contained in:
G-Ragghianti 2019-11-13 16:49:06 -05:00 committed by Adam J. Stewart
parent a2ef7896b7
commit dc36b4737d

View File

@ -17,11 +17,12 @@ class Papi(Package):
enables software engineers to see, in near real time, the enables software engineers to see, in near real time, the
relation between software performance and processor events. In relation between software performance and processor events. In
addition Component PAPI provides access to a collection of addition Component PAPI provides access to a collection of
components that expose performance measurement opportunites components that expose performance measurement opportunities
across the hardware and software stack.""" across the hardware and software stack."""
homepage = "http://icl.cs.utk.edu/papi/index.html" homepage = "http://icl.cs.utk.edu/papi/index.html"
maintainers = ['G-Ragghianti']
url = "http://icl.cs.utk.edu/projects/papi/downloads/papi-5.4.1.tar.gz" url = "http://icl.cs.utk.edu/projects/papi/downloads/papi-5.4.1.tar.gz"
version('5.7.0', sha256='d1a3bb848e292c805bc9f29e09c27870e2ff4cda6c2fba3b7da8b4bba6547589') version('5.7.0', sha256='d1a3bb848e292c805bc9f29e09c27870e2ff4cda6c2fba3b7da8b4bba6547589')
version('5.6.0', sha256='49b7293f9ca2d74d6d80bd06b5c4be303663123267b4ac0884cbcae4c914dc47') version('5.6.0', sha256='49b7293f9ca2d74d6d80bd06b5c4be303663123267b4ac0884cbcae4c914dc47')
version('5.5.1', sha256='49dc2c2323f6164c4a7e81b799ed690ee73158671205e71501f849391dd2c2d4') version('5.5.1', sha256='49dc2c2323f6164c4a7e81b799ed690ee73158671205e71501f849391dd2c2d4')
@ -30,11 +31,27 @@ class Papi(Package):
version('5.4.1', sha256='e131c1449786fe870322a949e44f974a5963824f683232e653fb570cc65d4e87') version('5.4.1', sha256='e131c1449786fe870322a949e44f974a5963824f683232e653fb570cc65d4e87')
version('5.3.0', sha256='99f2f36398b370e75d100b4a189d5bc0ac4f5dd66df44d441f88fd32e1421524') version('5.3.0', sha256='99f2f36398b370e75d100b4a189d5bc0ac4f5dd66df44d441f88fd32e1421524')
variant('example', default=True, description='Install the example files')
variant('infiniband', default=False, description='Enable Infiniband support')
variant('powercap', default=False, description='Enable powercap interface support')
variant('rapl', default=False, description='Enable RAPL support')
variant('lmsensors', default=False, description='Enable lm_sensors support')
depends_on('lm-sensors', when='+lmsensors')
# Does not build with newer versions of gcc, see # Does not build with newer versions of gcc, see
# https://bitbucket.org/icl/papi/issues/46/cannot-compile-on-arch-linux # https://bitbucket.org/icl/papi/issues/46/cannot-compile-on-arch-linux
patch('https://bitbucket.org/icl/papi/commits/53de184a162b8a7edff48fed01a15980664e15b1/raw', sha256='64c57b3ad4026255238cc495df6abfacc41de391a0af497c27d0ac819444a1f8', when='@5.4.0:5.6.99%gcc@8:') patch('https://bitbucket.org/icl/papi/commits/53de184a162b8a7edff48fed01a15980664e15b1/raw', sha256='64c57b3ad4026255238cc495df6abfacc41de391a0af497c27d0ac819444a1f8', when='@5.4.0:5.6.99%gcc@8:')
def install(self, spec, prefix): def install(self, spec, prefix):
if '+lmsensors' in spec:
with working_dir("src/components/lmsensors"):
configure_args = [
"--with-sensors_incdir=%s/include/sensors" %
spec['lm-sensors'].prefix,
"--with-sensors_libdir=%s/lib" %
spec['lm-sensors'].prefix]
configure(*configure_args)
with working_dir("src"): with working_dir("src"):
configure_args = ["--prefix=%s" % prefix] configure_args = ["--prefix=%s" % prefix]
@ -44,6 +61,10 @@ def install(self, spec, prefix):
# fail, so that PAPI does not get confused # fail, so that PAPI does not get confused
configure_args.append('MPICC=:') configure_args.append('MPICC=:')
configure_args.append(
'--with-components={0}'.format(' '.join(
filter(lambda x: spec.variants[x].value, spec.variants))))
configure(*configure_args) configure(*configure_args)
# Don't use <malloc.h> # Don't use <malloc.h>