spack/var/spack/repos/builtin/packages/chatterbug/package.py

48 lines
1.3 KiB
Python
Raw Normal View History

2022-01-13 03:21:41 +08:00
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
2018-08-19 07:18:50 +08:00
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
2018-08-19 07:18:50 +08:00
class Chatterbug(MakefilePackage):
"""A suite of communication-intensive proxy applications that mimic
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
"""
tags = ["proxy-app"]
2018-08-19 07:18:50 +08:00
homepage = "https://chatterbug.readthedocs.io"
git = "https://github.com/LLNL/chatterbug.git"
2018-08-19 07:18:50 +08:00
version("develop", branch="master")
version("1.0", tag="v1.0")
2018-08-19 07:18:50 +08:00
variant("scorep", default=False, description="Build with Score-P tracing")
2018-08-19 07:18:50 +08:00
depends_on("mpi")
depends_on("scorep", when="+scorep")
2018-08-19 07:18:50 +08:00
@property
def build_targets(self):
targets = []
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:
make("WITH_OTF2=YES")
2018-08-19 07:18:50 +08:00
else:
make()
def install(self, spec, prefix):
if "+scorep" in spec:
make("WITH_OTF2=YES", "PREFIX=" + spec.prefix, "install")
2018-08-19 07:18:50 +08:00
else:
make("PREFIX=" + spec.prefix, "install")