diff --git a/lib/benchpark/system.py b/lib/benchpark/system.py index c220f628f..2bd4d320d 100644 --- a/lib/benchpark/system.py +++ b/lib/benchpark/system.py @@ -150,6 +150,7 @@ def variables_yaml(self): raise ValueError(f"Missing required info: {attr}") optionals = list() + optionals_as_cfg = "" for opt in ["sys_gpus_per_node", "sys_mem_per_node", "queue"]: if getattr(self, opt, None): optionals.append(f"{opt}: {getattr(self, opt)}") diff --git a/var/sys_repo/systems/cts/compilers/gcc/00-gcc-12-compilers.yaml b/var/sys_repo/systems/cts/compilers/gcc/00-gcc-12-compilers.yaml new file mode 100644 index 000000000..b290f6bae --- /dev/null +++ b/var/sys_repo/systems/cts/compilers/gcc/00-gcc-12-compilers.yaml @@ -0,0 +1,19 @@ +# Copyright 2023 Lawrence Livermore National Security, LLC and other +# Benchpark Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: Apache-2.0 + +compilers: +- compiler: + spec: gcc@12.1.1 + paths: + cc: /usr/tce/packages/gcc/gcc-12.1.1/bin/gcc + cxx: /usr/tce/packages/gcc/gcc-12.1.1/bin/g++ + f77: /usr/tce/packages/gcc/gcc-12.1.1/bin/gfortran + fc: /usr/tce/packages/gcc/gcc-12.1.1/bin/gfortran + flags: {} + operating_system: rhel8 + target: x86_64 + modules: [] + environment: {} + extra_rpaths: [] diff --git a/var/sys_repo/systems/cts/compilers/intel/00-intel-2021-6-0-compilers.yaml b/var/sys_repo/systems/cts/compilers/intel/00-intel-2021-6-0-compilers.yaml new file mode 100644 index 000000000..893019fb3 --- /dev/null +++ b/var/sys_repo/systems/cts/compilers/intel/00-intel-2021-6-0-compilers.yaml @@ -0,0 +1,19 @@ +# Copyright 2023 Lawrence Livermore National Security, LLC and other +# Benchpark Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: Apache-2.0 + +compilers: +- compiler: + spec: intel@2021.6.0-classic + paths: + cc: /usr/tce/packages/intel-classic/intel-classic-2021.6.0/bin/icc + cxx: /usr/tce/packages/intel-classic/intel-classic-2021.6.0/bin/icpc + f77: /usr/tce/packages/intel-classic/intel-classic-2021.6.0/bin/ifort + fc: /usr/tce/packages/intel-classic/intel-classic-2021.6.0/bin/ifort + flags: {} + operating_system: rhel8 + target: x86_64 + modules: [] + environment: {} + extra_rpaths: [] diff --git a/var/sys_repo/systems/cts/externals/base/00-packages.yaml b/var/sys_repo/systems/cts/externals/base/00-packages.yaml new file mode 100644 index 000000000..921d6033b --- /dev/null +++ b/var/sys_repo/systems/cts/externals/base/00-packages.yaml @@ -0,0 +1,50 @@ +# Copyright 2023 Lawrence Livermore National Security, LLC and other +# Benchpark Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: Apache-2.0 + +packages: + papi: + buildable: false + externals: + - spec: papi@6.0.0.1 + prefix: /usr/tce/packages/papi/papi-6.0.0.1 + tar: + buildable: false + externals: + - spec: tar@1.30 + prefix: /usr + cmake: + buildable: false + externals: + - spec: cmake@3.26.3 + prefix: /usr/tce/packages/cmake/cmake-3.26.3 + gmake: + externals: + - spec: gmake@4.2.1 + prefix: /usr + blas: + buildable: false + externals: + - spec: intel-oneapi-mkl@2022.1.0 + prefix: /usr/tce/backend/installations/linux-rhel8-x86_64/intel-19.0.4/intel-oneapi-mkl-2022.1.0-sksz67twjxftvwchnagedk36gf7plkrp + lapack: + buildable: false + externals: + - spec: intel-oneapi-mkl@2022.1.0 + prefix: /usr/tce/backend/installations/linux-rhel8-x86_64/intel-19.0.4/intel-oneapi-mkl-2022.1.0-sksz67twjxftvwchnagedk36gf7plkrp + python: + buildable: false + externals: + - spec: python@3.9.12 + prefix: /usr/tce/packages/python/python-3.9.12/ + hwloc: + buildable: false + externals: + - spec: hwloc@2.9.1 + prefix: /usr + fftw: + buildable: false + externals: + - spec: fftw@3.3.10 + prefix: /usr/tce/packages/fftw/fftw-3.3.10 \ No newline at end of file diff --git a/var/sys_repo/systems/cts/externals/mpi/00-gcc-packages.yaml b/var/sys_repo/systems/cts/externals/mpi/00-gcc-packages.yaml new file mode 100644 index 000000000..a0ca91340 --- /dev/null +++ b/var/sys_repo/systems/cts/externals/mpi/00-gcc-packages.yaml @@ -0,0 +1,13 @@ +# Copyright 2023 Lawrence Livermore National Security, LLC and other +# Benchpark Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: Apache-2.0 + +packages: + mpi: + buildable: false + externals: + - spec: mvapich2@2.3.7-gcc1211 + prefix: /usr/tce/packages/mvapich2/mvapich2-2.3.7-gcc-12.1.1 + extra_attributes: + ldflags: "-L/usr/tce/packages/mvapich2/mvapich2-2.3.7-gcc-12.1.1/lib -lmpi" \ No newline at end of file diff --git a/var/sys_repo/systems/cts/externals/mpi/01-intel-packages.yaml b/var/sys_repo/systems/cts/externals/mpi/01-intel-packages.yaml new file mode 100644 index 000000000..9226a6549 --- /dev/null +++ b/var/sys_repo/systems/cts/externals/mpi/01-intel-packages.yaml @@ -0,0 +1,13 @@ +# Copyright 2023 Lawrence Livermore National Security, LLC and other +# Benchpark Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: Apache-2.0 + +packages: + mpi: + buildable: false + externals: + - spec: mvapich2@2.3.7-intel202160classic + prefix: /usr/tce/packages/mvapich2/mvapich2-2.3.7-intel-classic-2021.6.0 + extra_attributes: + ldflags: "-L/usr/tce/packages/mvapich2/mvapich2-2.3.7-intel-classic-2021.6.0/lib -lmpi" diff --git a/var/sys_repo/systems/cts/system.py b/var/sys_repo/systems/cts/system.py new file mode 100644 index 000000000..f7c86498a --- /dev/null +++ b/var/sys_repo/systems/cts/system.py @@ -0,0 +1,104 @@ +# Copyright 2023 Lawrence Livermore National Security, LLC and other +# Benchpark Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: Apache-2.0 + +import pathlib + +from benchpark.directives import variant +from benchpark.system import System + +id_to_resources = { + "ruby": { + "sys_cores_per_node": 56, + }, + "magma": { + "sys_cores_per_node": 96, + }, +} + + +class Cts(System): + + variant( + "cluster", + default="ruby", + values=("ruby", "magma"), + description="Which cluster to run on", + ) + + variant( + "compiler", + default="gcc", + values=("gcc", "intel"), + description="Which compiler to use", + ) + + def initialize(self): + super().initialize() + + self.scheduler = "slurm" + attrs = id_to_resources.get(self.spec.variants["cluster"][0]) + for k, v in attrs.items(): + setattr(self, k, v) + + def generate_description(self, output_dir): + super().generate_description(output_dir) + + sw_description = pathlib.Path(output_dir) / "software.yaml" + + with open(sw_description, "w") as f: + f.write(self.sw_description()) + + def external_pkg_configs(self): + externals = Cts.resource_location / "externals" + + compiler = self.spec.variants["compiler"][0] + + selections = [externals / "base" / "00-packages.yaml"] + + if compiler == "gcc": + selections.append(externals / "mpi" / "00-gcc-packages.yaml") + elif compiler == "intel": + selections.append(externals / "mpi" / "01-intel-packages.yaml") + + return selections + + def compiler_configs(self): + compilers = Cts.resource_location / "compilers" + + compiler = self.spec.variants["compiler"][0] + + selections = [] + if compiler == "gcc": + selections.append(compilers / "gcc" / "00-gcc-12-compilers.yaml") + elif compiler == "intel": + selections.append(compilers / "intel" / "00-intel-2021-6-0-compilers.yaml") + + return selections + + def sw_description(self): + """This is somewhat vestigial, and maybe deleted later. The experiments + will fail if these variables are not defined though, so for now + they are still generated (but with more-generic values). + """ + return """\ +software: + packages: + default-compiler: + pkg_spec: gcc + default-mpi: + pkg_spec: mvapich2 + compiler-gcc: + pkg_spec: gcc + compiler-intel: + pkg_spec: intel + blas: + pkg_spec: intel-oneapi-mkl + lapack: + pkg_spec: intel-oneapi-mkl + mpi-gcc: + pkg_spec: mvapich2 + mpi-intel: + pkg_spec: mvapich2 +"""