2022-01-13 03:21:41 +08:00
|
|
|
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
2018-10-08 04:52:23 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
2018-08-19 07:18:50 +08:00
|
|
|
#
|
2018-10-08 04:52:23 +08:00
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
2022-05-29 00:55:44 +08:00
|
|
|
from spack.package import *
|
2018-08-19 07:18:50 +08:00
|
|
|
|
|
|
|
|
|
|
|
class Chatterbug(MakefilePackage):
|
|
|
|
"""A suite of communication-intensive proxy applications that mimic
|
2022-07-31 06:19:18 +08:00
|
|
|
commonly found communication patterns in HPC codes. These codes can be
|
|
|
|
used as synthetic codes for benchmarking, or for trace generation using
|
|
|
|
Score-P / OTF2.
|
2018-08-19 07:18:50 +08:00
|
|
|
"""
|
2022-07-31 06:19:18 +08:00
|
|
|
|
|
|
|
tags = ["proxy-app"]
|
2018-08-19 07:18:50 +08:00
|
|
|
|
|
|
|
homepage = "https://chatterbug.readthedocs.io"
|
2022-07-31 06:19:18 +08:00
|
|
|
git = "https://github.com/LLNL/chatterbug.git"
|
2018-08-19 07:18:50 +08:00
|
|
|
|
2022-07-31 06:19:18 +08:00
|
|
|
version("develop", branch="master")
|
|
|
|
version("1.0", tag="v1.0")
|
2018-08-19 07:18:50 +08:00
|
|
|
|
2022-07-31 06:19:18 +08:00
|
|
|
variant("scorep", default=False, description="Build with Score-P tracing")
|
2018-08-19 07:18:50 +08:00
|
|
|
|
2022-07-31 06:19:18 +08:00
|
|
|
depends_on("mpi")
|
|
|
|
depends_on("scorep", when="+scorep")
|
2018-08-19 07:18:50 +08:00
|
|
|
|
|
|
|
@property
|
|
|
|
def build_targets(self):
|
|
|
|
targets = []
|
|
|
|
|
2022-07-31 06:19:18 +08:00
|
|
|
targets.append("MPICXX = {0}".format(self.spec["mpi"].mpicxx))
|
2018-08-19 07:18:50 +08:00
|
|
|
|
|
|
|
return targets
|
|
|
|
|
|
|
|
def build(self, spec, prefix):
|
|
|
|
if "+scorep" in spec:
|
2022-07-31 06:19:18 +08:00
|
|
|
make("WITH_OTF2=YES")
|
2018-08-19 07:18:50 +08:00
|
|
|
else:
|
|
|
|
make()
|
|
|
|
|
|
|
|
def install(self, spec, prefix):
|
|
|
|
if "+scorep" in spec:
|
2022-07-31 06:19:18 +08:00
|
|
|
make("WITH_OTF2=YES", "PREFIX=" + spec.prefix, "install")
|
2018-08-19 07:18:50 +08:00
|
|
|
else:
|
2022-07-31 06:19:18 +08:00
|
|
|
make("PREFIX=" + spec.prefix, "install")
|