summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorCarson Woods <carsonwoods@users.noreply.github.com>2022-09-12 09:54:42 -0400
committerGitHub <noreply@github.com>2022-09-12 08:54:42 -0500
commit46828eff1b4e79a01dc7deb00b962d9f75b7a141 (patch)
treee45fe2de4988e0d239cf6d8ee38ed0db2a1f4047 /var
parent5be1da449125f053a82fb35903d4fdcbedc6e65e (diff)
downloadspack-46828eff1b4e79a01dc7deb00b962d9f75b7a141.tar.gz
spack-46828eff1b4e79a01dc7deb00b962d9f75b7a141.tar.bz2
spack-46828eff1b4e79a01dc7deb00b962d9f75b7a141.tar.xz
spack-46828eff1b4e79a01dc7deb00b962d9f75b7a141.zip
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
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py135
1 files changed, 82 insertions, 53 deletions
diff --git a/var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py b/var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py
index 101caa1610..fabf612ef1 100644
--- a/var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py
+++ b/var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py
@@ -18,74 +18,103 @@ class IntelMpiBenchmarks(MakefilePackage):
"""
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"]
+ version("2021.3", sha256="9b58a4a7eef7c0c877513152340948402fd87cb06270d2d81308dc2ef740f4c7")
+ version("2021.2", sha256="ade3bfe18b4313a31fc09f0bf038e0a6c169c4145089bfc6f1f827687b81be6a")
+ version("2021.1", sha256="9089bb81e3091af3481e03b898b339fb2d9fb6574d4ef059adb1f5410112b23a")
version("2019.6", sha256="1cd0bab9e947228fced4666d907f77c51336291533919896a923cff5fcad62e9")
version("2019.5", sha256="61f8e872a3c3076af53007a68e4da3a8d66be2ba7a051dc21e626a4e2d26e651")
version("2019.4", sha256="aeb336be10275c1a2f579b491b6631122876b461ac7148b1d0764f13b7552690")
version("2019.3", sha256="4f256d11bfed9ca6166548486d61a062e67be61f13dd9f30690232720e185f31")
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", when="@2019:")
+ depends_on("intel-mpi", when="@2018")
+ depends_on("gmake", type="build", when="@2018")
- depends_on("mpi")
+ conflicts(
+ "^openmpi",
+ when="@:2019.0",
+ msg="intel-mpi-benchmarks <= v2019.0 cannot be built with OpenMPI, "
+ "please specify a different MPI implementation",
+ )
# https://github.com/intel/mpi-benchmarks/pull/19
- patch("add_const.patch", when="@:2019.6")
+ patch("add_const.patch", when="@2019")
# https://github.com/intel/mpi-benchmarks/pull/20
- patch("reorder_benchmark_macros.patch", when="@:2019.6")
-
- variant(
- "benchmark",
- default="all",
- values=("mpi1", "ext", "io", "nbc", "p2p", "rma", "mt", "all"),
- multi=False,
- description="Specify which benchmark to build",
- )
+ patch("reorder_benchmark_macros.patch", when="@2019.1:2019.6")
- def build(self, spec, prefix):
- env["CC"] = spec["mpi"].mpicc
- env["CXX"] = spec["mpi"].mpicxx
+ 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)
- 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")
+ @property
+ def build_directory(self):
+ if self.spec.satisfies("@2018"):
+ return "src"
else:
- make("all")
+ 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["CXX"] = spec["mpi"].mpicxx
def install(self, spec, prefix):
mkdir(prefix.bin)
- if "benchmark=mpi1" in spec:
- install("IMB-MPI1", prefix.bin)
- elif "benchmark=ext" in spec:
- install("IMB-EXT", prefix.bin)
- elif "benchmark=io" in spec:
- install("IMB-IO", prefix.bin)
- elif "benchmark=nbc" in spec:
- install("IMB-NBC", prefix.bin)
- elif "benchmark=p2p" in spec:
- install("IMB-P2P", prefix.bin)
- elif "benchmark=rma" in spec:
- install("IMB-RMA", prefix.bin)
- elif "benchmark=mt" in spec:
- install("IMB-MT", prefix.bin)
- else:
- 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)
+ with working_dir(self.build_directory):
+ if "+mpi1" in spec:
+ install("IMB-MPI1", prefix.bin)
+ elif "+ext" in spec:
+ install("IMB-EXT", prefix.bin)
+ elif "+io" in spec:
+ install("IMB-IO", prefix.bin)
+ elif "+nbc" in spec:
+ install("IMB-NBC", prefix.bin)
+ elif "+p2p" in spec:
+ install("IMB-P2P", prefix.bin)
+ elif "+rma" in spec:
+ install("IMB-RMA", prefix.bin)
+ elif "+mt" in spec:
+ install("IMB-MT", prefix.bin)