summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark W. Krentel <krentel@rice.edu>2021-02-16 09:33:54 -0600
committerGitHub <noreply@github.com>2021-02-16 16:33:54 +0100
commitbd9289f99d0d6b62bdc9d4c55336e44c6fec6666 (patch)
treee41402fbd39071e55a2fc1483c11079200c36c2c
parent6b521a3a5be7c0cb864f187c0873abcee2969e2e (diff)
downloadspack-bd9289f99d0d6b62bdc9d4c55336e44c6fec6666.tar.gz
spack-bd9289f99d0d6b62bdc9d4c55336e44c6fec6666.tar.bz2
spack-bd9289f99d0d6b62bdc9d4c55336e44c6fec6666.tar.xz
spack-bd9289f99d0d6b62bdc9d4c55336e44c6fec6666.zip
hpcviewer: add versions 2020.12 and 2021.01 (#21659)
Add versions 2020.12 and 2021.01. The viewer and trace viewer are now integrated into a single program and one tar ball. Now available on arm/aarch64 and now uses Java 11.
-rw-r--r--var/spack/repos/builtin/packages/hpcviewer/package.py40
1 files changed, 28 insertions, 12 deletions
diff --git a/var/spack/repos/builtin/packages/hpcviewer/package.py b/var/spack/repos/builtin/packages/hpcviewer/package.py
index 2fd564a4f1..ffe85fc86b 100644
--- a/var/spack/repos/builtin/packages/hpcviewer/package.py
+++ b/var/spack/repos/builtin/packages/hpcviewer/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
+import os.path
import platform
@@ -28,7 +29,7 @@ def trace_url(ver, mach):
class Hpcviewer(Package):
"""Binary distribution of hpcviewer and hpctraceviewer for the Rice
- HPCToolkit (Linux x86_64, ppc64 and ppc64le). Note: hpctoolkit
+ HPCToolkit (Linux x86_64, ppc64le and aarch64). Note: hpctoolkit
databases are platform independent, so you don't need to install
hpctoolkit to run the viewers and it's common to run hpcrun and
hpcviewer on different machines."""
@@ -37,6 +38,11 @@ class Hpcviewer(Package):
maintainers = ['mwkrentel']
viewer_sha = {
+ ('2021.01', 'aarch64'): 'fe797a1c97943f7509c36a570198291e674cd4a793c1d6538a2761d66542dc52',
+ ('2021.01', 'ppc64le'): 'ba4035de2ae208280c3744000ea08d2d7f8c31bd7095f722e442ddc289648063',
+ ('2021.01', 'x86_64'): '99eba4e1c613203c4658f2874d0e79e1620db7a22ac7dcb810801886ba9f8a79',
+ ('2020.12', 'ppc64le'): 'ce0d741aa8849621c03183dbf11a0dc1f6d296e3de80e25976a7f2a2750899c4',
+ ('2020.12', 'x86_64'): '29c5e1427893f0652e863fd6d54a8585077662597e5073532ec9f3b116626498',
('2020.07', 'x86_64'): '19951662626c7c9817c4a75269c85810352dc48ae9a62dfb6ce4a5b502de2118',
('2020.07', 'ppc64'): '3f5d9358ef8ff9ba4f6dcaa4d7132f41ba55f0c132d9fd1e2f6da18341648a4e',
('2020.07', 'ppc64le'): 'e236a8578dc247279d1021aa35bac47e2d4864b906efcef76c0610ee0086b353',
@@ -109,16 +115,20 @@ class Hpcviewer(Package):
}
for key in viewer_sha.keys():
- if key in trace_sha and key[1] == platform.machine():
+ if key[1] == platform.machine():
version(key[0], url=viewer_url(*key), sha256=viewer_sha[key])
- resource(name='hpctraceviewer', url=trace_url(*key),
- sha256=trace_sha[key], placement='TRACE',
- when='@{0}'.format(key[0]))
+ # Current versions include the viewer and trace viewer in
+ # one tar file. Before 2020.07, the trace viewer was a
+ # separate tar file (resource).
+ if key in trace_sha:
+ resource(name='hpctraceviewer', url=trace_url(*key),
+ sha256=trace_sha[key], placement='TRACE',
+ when='@{0}'.format(key[0]))
- depends_on('java@8', type=('build', 'run'))
+ depends_on('java@11:', type=('build', 'run'), when='@2021.0:')
+ depends_on('java@8', type=('build', 'run'), when='@:2020.99')
- conflicts('target=aarch64:', msg='hpcviewer is not available on arm')
conflicts('platform=darwin', msg='hpcviewer requires a manual install on MacOS, see homepage')
# Both hpcviewer and trace viewer have an install script.
@@ -128,10 +138,16 @@ class Hpcviewer(Package):
prefix
]
- inst = Executable(join_path('.', 'install'))
- inst(*args)
-
- cd('TRACE')
+ # Sometimes the script is install.sh, sometimes install.
+ inst_path = join_path('.', 'install.sh')
+ if not os.path.exists(inst_path):
+ inst_path = join_path('.', 'install')
- inst = Executable(join_path('.', 'install'))
+ inst = Executable(inst_path)
inst(*args)
+
+ # Older versions used a separate resource for the traceviewer.
+ if os.path.isdir('TRACE'):
+ cd('TRACE')
+ inst = Executable(inst_path)
+ inst(*args)