Add new and legacy intel-mpi-benchmarks versions (#32535)
* Add new intel-mpi-benchmarks version * Add new versions of intel mpi benchmarks * Fix style bugs * Fix style bugs * Switch to using url_for_version formatting and improve patch ranges * p2p benchmark is not included on older versions * Set patch to proper version * Add url field, improve patch versioning, improve version detection * Add url field, improve patch versioning, improve version detection * Bug fix Syntax fix * Remove 2019 from valid version on reorder_benchmark_macros patch * OpenMPI isn't supported on older versions of the benchmark. Prevents OpenMPI from being selected on those versions * Add new requirement of gmake for older versions * Require intel-mpi for older versions of benchmark * Minor changes to build directory for older versions * Remove repeated conflict * Minor style changes * Minor change * Correct fix for intel-mpi-benchmarks * Bug fix * Bug fix * Attempted fix for install bug * Attempted fix for install bug * Remove duplicate build_directory setting
This commit is contained in:
parent
5be1da4491
commit
46828eff1b
@ -18,74 +18,103 @@ class IntelMpiBenchmarks(MakefilePackage):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
homepage = "https://software.intel.com/en-us/articles/intel-mpi-benchmarks"
|
homepage = "https://software.intel.com/en-us/articles/intel-mpi-benchmarks"
|
||||||
url = "https://github.com/intel/mpi-benchmarks/archive/IMB-v2019.5.tar.gz"
|
url = "https://github.com/intel/mpi-benchmarks/archive/IMB-v2021.3.tar.gz"
|
||||||
|
|
||||||
maintainers = ["carsonwoods"]
|
maintainers = ["carsonwoods"]
|
||||||
|
|
||||||
|
version("2021.3", sha256="9b58a4a7eef7c0c877513152340948402fd87cb06270d2d81308dc2ef740f4c7")
|
||||||
|
version("2021.2", sha256="ade3bfe18b4313a31fc09f0bf038e0a6c169c4145089bfc6f1f827687b81be6a")
|
||||||
|
version("2021.1", sha256="9089bb81e3091af3481e03b898b339fb2d9fb6574d4ef059adb1f5410112b23a")
|
||||||
version("2019.6", sha256="1cd0bab9e947228fced4666d907f77c51336291533919896a923cff5fcad62e9")
|
version("2019.6", sha256="1cd0bab9e947228fced4666d907f77c51336291533919896a923cff5fcad62e9")
|
||||||
version("2019.5", sha256="61f8e872a3c3076af53007a68e4da3a8d66be2ba7a051dc21e626a4e2d26e651")
|
version("2019.5", sha256="61f8e872a3c3076af53007a68e4da3a8d66be2ba7a051dc21e626a4e2d26e651")
|
||||||
version("2019.4", sha256="aeb336be10275c1a2f579b491b6631122876b461ac7148b1d0764f13b7552690")
|
version("2019.4", sha256="aeb336be10275c1a2f579b491b6631122876b461ac7148b1d0764f13b7552690")
|
||||||
version("2019.3", sha256="4f256d11bfed9ca6166548486d61a062e67be61f13dd9f30690232720e185f31")
|
version("2019.3", sha256="4f256d11bfed9ca6166548486d61a062e67be61f13dd9f30690232720e185f31")
|
||||||
version("2019.2", sha256="0bc2224a913073aaa5958f6ae08341e5fcd39cedc6722a09bfd4a3d7591a340b")
|
version("2019.2", sha256="0bc2224a913073aaa5958f6ae08341e5fcd39cedc6722a09bfd4a3d7591a340b")
|
||||||
|
version("2019.1", sha256="fe0d065b9936b6943ea83cb3d00aede43b17565285c6b1791fee8e340853ef79")
|
||||||
|
version("2019.0", sha256="1c7d44aa7fd86ca84ac7cae1a69a8426243048d6294582337f1de7b4ffe68d37")
|
||||||
|
version("2018.1", sha256="718a4eb155f18cf15a736f6496332407b5837cf1f19831723d4cfe5266c43507")
|
||||||
|
version("2018.0", sha256="2e60a9894a686a95791be2227bc569bf81ca3875421b5307df7d83f885b1de88")
|
||||||
|
|
||||||
depends_on("mpi")
|
depends_on("mpi", when="@2019:")
|
||||||
|
depends_on("intel-mpi", when="@2018")
|
||||||
|
depends_on("gmake", type="build", when="@2018")
|
||||||
|
|
||||||
# https://github.com/intel/mpi-benchmarks/pull/19
|
conflicts(
|
||||||
patch("add_const.patch", when="@:2019.6")
|
"^openmpi",
|
||||||
# https://github.com/intel/mpi-benchmarks/pull/20
|
when="@:2019.0",
|
||||||
patch("reorder_benchmark_macros.patch", when="@:2019.6")
|
msg="intel-mpi-benchmarks <= v2019.0 cannot be built with OpenMPI, "
|
||||||
|
"please specify a different MPI implementation",
|
||||||
variant(
|
|
||||||
"benchmark",
|
|
||||||
default="all",
|
|
||||||
values=("mpi1", "ext", "io", "nbc", "p2p", "rma", "mt", "all"),
|
|
||||||
multi=False,
|
|
||||||
description="Specify which benchmark to build",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def build(self, spec, prefix):
|
# https://github.com/intel/mpi-benchmarks/pull/19
|
||||||
|
patch("add_const.patch", when="@2019")
|
||||||
|
# https://github.com/intel/mpi-benchmarks/pull/20
|
||||||
|
patch("reorder_benchmark_macros.patch", when="@2019.1:2019.6")
|
||||||
|
|
||||||
|
variant("mpi1", default=True, description="Build MPI1 benchmark")
|
||||||
|
variant("ext", default=True, description="Build MPI1 benchmark")
|
||||||
|
variant("io", default=True, description="Build MPI1 benchmark")
|
||||||
|
variant("nbc", default=True, description="Build MPI1 benchmark")
|
||||||
|
variant("p2p", default=True, description="Build MPI1 benchmark", when="@2018")
|
||||||
|
variant("rma", default=True, description="Build MPI1 benchmark")
|
||||||
|
variant("mt", default=True, description="Build MPI1 benchmark")
|
||||||
|
|
||||||
|
def url_for_version(self, version):
|
||||||
|
if version <= Version("2019.1"):
|
||||||
|
url = "https://github.com/intel/mpi-benchmarks/archive/refs/tags/v{0}.tar.gz"
|
||||||
|
else:
|
||||||
|
url = "https://github.com/intel/mpi-benchmarks/archive/refs/tags/IMB-v{0}.tar.gz"
|
||||||
|
return url.format(version)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def build_directory(self):
|
||||||
|
if self.spec.satisfies("@2018"):
|
||||||
|
return "src"
|
||||||
|
else:
|
||||||
|
return "."
|
||||||
|
|
||||||
|
@property
|
||||||
|
def build_targets(self):
|
||||||
|
spec = self.spec
|
||||||
|
targets = []
|
||||||
|
if "+mpi1" in spec:
|
||||||
|
targets.append("MPI1")
|
||||||
|
elif "+ext" in spec:
|
||||||
|
targets.append("EXT")
|
||||||
|
elif "+io" in spec:
|
||||||
|
targets.append("IO")
|
||||||
|
elif "+nbc" in spec:
|
||||||
|
targets.append("NBC")
|
||||||
|
elif "+p2p" in spec:
|
||||||
|
targets.append("P2P")
|
||||||
|
elif "+rma" in spec:
|
||||||
|
targets.append("RMA")
|
||||||
|
elif "+mt" in spec:
|
||||||
|
targets.append("MT")
|
||||||
|
|
||||||
|
if self.spec.satisfies("@2019:"):
|
||||||
|
targets = ["TARGET=" + target for target in targets]
|
||||||
|
|
||||||
|
return targets
|
||||||
|
|
||||||
|
def edit(self, spec, prefix):
|
||||||
env["CC"] = spec["mpi"].mpicc
|
env["CC"] = spec["mpi"].mpicc
|
||||||
env["CXX"] = spec["mpi"].mpicxx
|
env["CXX"] = spec["mpi"].mpicxx
|
||||||
|
|
||||||
if "benchmark=mpi1" in spec:
|
|
||||||
make("IMB-MPI1")
|
|
||||||
elif "benchmark=ext" in spec:
|
|
||||||
make("IMB-EXT")
|
|
||||||
elif "benchmark=io" in spec:
|
|
||||||
make("IMB-IO")
|
|
||||||
elif "benchmark=nbc" in spec:
|
|
||||||
make("IMB-NBC")
|
|
||||||
elif "benchmark=p2p" in spec:
|
|
||||||
make("IMB-P2P")
|
|
||||||
elif "benchmark=rma" in spec:
|
|
||||||
make("IMB-RMA")
|
|
||||||
elif "benchmark=mt" in spec:
|
|
||||||
make("IMB-MT")
|
|
||||||
else:
|
|
||||||
make("all")
|
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
mkdir(prefix.bin)
|
mkdir(prefix.bin)
|
||||||
|
|
||||||
if "benchmark=mpi1" in spec:
|
with working_dir(self.build_directory):
|
||||||
install("IMB-MPI1", prefix.bin)
|
if "+mpi1" in spec:
|
||||||
elif "benchmark=ext" in spec:
|
install("IMB-MPI1", prefix.bin)
|
||||||
install("IMB-EXT", prefix.bin)
|
elif "+ext" in spec:
|
||||||
elif "benchmark=io" in spec:
|
install("IMB-EXT", prefix.bin)
|
||||||
install("IMB-IO", prefix.bin)
|
elif "+io" in spec:
|
||||||
elif "benchmark=nbc" in spec:
|
install("IMB-IO", prefix.bin)
|
||||||
install("IMB-NBC", prefix.bin)
|
elif "+nbc" in spec:
|
||||||
elif "benchmark=p2p" in spec:
|
install("IMB-NBC", prefix.bin)
|
||||||
install("IMB-P2P", prefix.bin)
|
elif "+p2p" in spec:
|
||||||
elif "benchmark=rma" in spec:
|
install("IMB-P2P", prefix.bin)
|
||||||
install("IMB-RMA", prefix.bin)
|
elif "+rma" in spec:
|
||||||
elif "benchmark=mt" in spec:
|
install("IMB-RMA", prefix.bin)
|
||||||
install("IMB-MT", prefix.bin)
|
elif "+mt" in spec:
|
||||||
else:
|
install("IMB-MT", prefix.bin)
|
||||||
install("IMB-EXT", prefix.bin)
|
|
||||||
install("IMB-IO", prefix.bin)
|
|
||||||
install("IMB-MPI1", prefix.bin)
|
|
||||||
install("IMB-MT", prefix.bin)
|
|
||||||
install("IMB-NBC", prefix.bin)
|
|
||||||
install("IMB-P2P", prefix.bin)
|
|
||||||
install("IMB-RMA", prefix.bin)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user