From acc690934a97d2362bdeb92768538f0531e2443c Mon Sep 17 00:00:00 2001 From: august-knox Date: Mon, 2 Dec 2024 12:28:23 -0800 Subject: [PATCH 01/13] initial commit for caliperized hpcg --- experiments/hpcg/experiment.py | 102 +++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 experiments/hpcg/experiment.py diff --git a/experiments/hpcg/experiment.py b/experiments/hpcg/experiment.py new file mode 100644 index 000000000..a0b2b5f70 --- /dev/null +++ b/experiments/hpcg/experiment.py @@ -0,0 +1,102 @@ +# 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 + +from benchpark.error import BenchparkError +from benchpark.directives import variant +from benchpark.experiment import Experiment +from benchpark.openmp import OpenMPExperiment +from benchpark.scaling import StrongScaling +from benchpark.expr.builtin.caliper import Caliper + + +class Hpcg( + Experiment, + OpenMPExperiment, + Caliper, +): + + + variant( + "workload", + default="standard", + description="workload to run", + ) + variant( + "version", + default="3.1", + values=("3.1", "develop", "caliper"), + description="app version", + ) + + def compute_applications_section(self): + # TODO: Replace with conflicts clause + scaling_modes = { + "single_node": self.spec.satisfies("+single_node"), + } + + scaling_mode_enabled = [key for key, value in scaling_modes.items() if value] + if len(scaling_mode_enabled) != 1: + print(scaling_mode_enabled) + raise BenchparkError( + f"Only one type of scaling per experiment is allowed for application package {self.name}" + ) + + if self.spec.satisfies("+single_node"): + self.add_experiment_variable( + "mx", '104', True + ) + + self.add_experiment_variable( + "my", '104', True + ) + + self.add_experiment_variable( + "mz", '104', True + ) + + self.add_experiment_variable( + "matrix_size", '{mx} {my} {mz}', False + ) + + self.add_experiment_variable( + "iterations", '60', False + ) + + self.add_experiment_variable( + "n_threads_per_proc", ['8', '16'], True + ) + + self.add_experiment_variable( + "n_ranks_per_node", '1', False + ) + + self.add_experiment_variable( + "n_nodes", '1', False + ) + + #self.add_experiment_variable( + # "env_name", 'hpcg-omp', False + #) + + self.matrix_experiment_variables('n_threads_per_proc') + + def compute_spack_section(self): + # get package version + app_version = self.spec.variants["version"][0] + + # get system config options + # TODO: Get compiler/mpi/package handles directly from system.py + system_specs = {} + system_specs["compiler"] = "default-compiler" + system_specs["mpi"] = "default-mpi" + + # set package spack specs + # empty package_specs value implies external package + self.add_spack_spec(system_specs["mpi"]) + # self.add_spack_spec(system_specs["blas"]) + + self.add_spack_spec( + self.name, [f"hpcg@{app_version}", system_specs["compiler"]] + ) From 28b9b008f98a6bf367e27360c6bcc674157bf392 Mon Sep 17 00:00:00 2001 From: august-knox Date: Thu, 12 Dec 2024 15:55:46 -0800 Subject: [PATCH 02/13] updating hpcg package and application files --- repo/hpcg/application.py | 135 +++++++++++++++++++++++++++++++++++---- repo/hpcg/package.py | 79 +++++++++++++++++++++++ 2 files changed, 202 insertions(+), 12 deletions(-) create mode 100644 repo/hpcg/package.py diff --git a/repo/hpcg/application.py b/repo/hpcg/application.py index aa88eb534..110718e1f 100644 --- a/repo/hpcg/application.py +++ b/repo/hpcg/application.py @@ -1,18 +1,129 @@ -# Copyright 2023 Lawrence Livermore National Security, LLC and other -# Benchpark Project Developers. See the top-level COPYRIGHT file for details. +# Copyright 2022-2024 The Ramble Authors # -# SPDX-License-Identifier: Apache-2.0 - -import sys +# Licensed under the Apache License, Version 2.0 or the MIT license +# , at your +# option. This file may not be copied, modified, or distributed +# except according to those terms. +import os from ramble.appkit import * -from ramble.app.builtin.hpcg import Hpcg as HpcgBase +from ramble.expander import Expander + + +class Hpcg(ExecutableApplication): + """Define HPCG application""" + + name = "hpcg" + + maintainers("douglasjacobsen") + + + + executable("execute", "xhpcg", use_mpi=True) + + executable("move-log", "mv HPCG-Benchmark*.txt {out_file}", use_mpi=False) + + workload("standard", executables=["execute", "move-log"]) + + workload_variable( + "matrix_size", + default="104 104 104", + description="Dimensions of the matrix to use", + workloads=["standard"], + ) + + workload_variable( + "iterations", + default="60", + description="Number of iterations to perform", + workloads=["standard"], + ) + + workload_variable( + "out_file", + default="{experiment_run_dir}/hpcg_result.out", + description="Output file for results", + workloads=["standard"], + ) + + log_str = Expander.expansion_str("out_file") + + figure_of_merit( + "Status", + log_file=log_str, + fom_regex=r"Final Summary::HPCG result is (?P[a-zA-Z]+) with a GFLOP/s rating of=(?P[0-9]+\.[0-9]+)", + group_name="status", + units="", + ) + + figure_of_merit( + "Gflops", + log_file=log_str, + fom_regex=r"Final Summary::HPCG result is (?P[a-zA-Z]+) with a GFLOP/s rating of=(?P[0-9]+\.[0-9]+)", + group_name="gflops", + units="GFLOP/s", + ) + + figure_of_merit( + "Time", + log_file=log_str, + fom_regex=r"Final Summary::Results are.* execution time.*is=(?P[0-9]+\.[0-9]*)", + group_name="exec_time", + units="s", + ) + + figure_of_merit( + "ComputeDotProductMsg", + log_file=log_str, + fom_regex=r"Final Summary::Reference version of ComputeDotProduct used.*=(?P.*)", + group_name="msg", + units="", + ) + + figure_of_merit( + "ComputeSPMVMsg", + log_file=log_str, + fom_regex=r"Final Summary::Reference version of ComputeSPMV used.*=(?P.*)", + group_name="msg", + units="", + ) + + figure_of_merit( + "ComputeMGMsg", + log_file=log_str, + fom_regex=r"Final Summary::Reference version of ComputeMG used.*=(?P.*)", + group_name="msg", + units="", + ) + + figure_of_merit( + "ComputeWAXPBYMsg", + log_file=log_str, + fom_regex=r"Final Summary::Reference version of ComputeWAXPBY used.*=(?P.*)", + group_name="msg", + units="", + ) + + figure_of_merit( + "HPCG 2.4 Rating", + log_file=log_str, + fom_regex=r"Final Summary::HPCG 2\.4 rating.*=(?P[0-9]+\.*[0-9]*)", + group_name="rating", + units="", + ) + def _make_experiments(self, workspace, app_inst=None): + super()._make_experiments(workspace) -class Hpcg(HpcgBase): + input_path = os.path.join( + self.expander.expand_var_name("experiment_run_dir"), "hpcg.dat" + ) - tags = ['synthetic', - 'conjugate-gradient','solver','sparse-linear-algebra', - 'large-scale', - 'mpi','network-point-to-point', - 'c++','openmp'] + with open(input_path, "w+") as f: + f.write("HPCG benchmark input file\n") + f.write( + "Sandia National Laboratories; University of Tennessee, Knoxville\n" + ) + f.write(self.expander.expand_var_name("matrix_size") + "\n") + f.write(self.expander.expand_var_name("iterations") + "\n") diff --git a/repo/hpcg/package.py b/repo/hpcg/package.py new file mode 100644 index 000000000..78e641a71 --- /dev/null +++ b/repo/hpcg/package.py @@ -0,0 +1,79 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import os +import platform + +from spack.package import * + + +class Hpcg(CMakePackage): + """HPCG is a software package that performs a fixed number of multigrid + preconditioned (using a symmetric Gauss-Seidel smoother) conjugate gradient + (PCG) iterations using double precision (64 bit) floating point values.""" + + #homepage = "https://www.hpcg-benchmark.org" + #url = "https://www.hpcg-benchmark.org/downloads/hpcg-3.1.tar.gz" + git = "https://github.com/daboehme/hpcg.git" + + version("develop", branch="master") + #version("3.1", sha256="33a434e716b79e59e745f77ff72639c32623e7f928eeb7977655ffcaade0f4a4") + version("caliper", branch="caliper-support") + + variant("openmp", default=True, description="Enable OpenMP support") + variant("caliper", default=False, description="Enable Caliper support") + + depends_on("mpi@1.1:") + depends_on("caliper", when="+caliper") + depends_on("adiak", when="+caliper") + + """ + patch( + "https://github.com/daboehme/hpcg/commit/114602d458d1034faa52b71e4c15aba9b3a17698.patch?full_index=1", + #sha256="b13c74454a2166767e3cde77b0f1d080522828122defc8477cc0b9919dcc231a", + sha256="1200e257da66c1824cc19f37f5df12d8b34ad7f738dd978d119ade0ac14da802", + when="%gcc@9:", + ) + patch( + "https://github.com/daboehme/hpcg/commit/114602d458d1034faa52b71e4c15aba9b3a17698.patch?full_index=1", + #sha256="b13c74454a2166767e3cde77b0f1d080522828122defc8477cc0b9919dcc231a", + sha256="1200e257da66c1824cc19f37f5df12d8b34ad7f738dd978d119ade0ac14da802", + when="%aocc", + ) + patch( + "https://github.com/daboehme/hpcg/commit/114602d458d1034faa52b71e4c15aba9b3a17698.patch?full_index=1", + #sha256="b13c74454a2166767e3cde77b0f1d080522828122defc8477cc0b9919dcc231a", + sha256="1200e257da66c1824cc19f37f5df12d8b34ad7f738dd978d119ade0ac14da802", + when="%arm", + ) + patch( + "https://github.com/daboehme/hpcg/commit/114602d458d1034faa52b71e4c15aba9b3a17698.patch?full_index=1", + #sha256="b13c74454a2166767e3cde77b0f1d080522828122defc8477cc0b9919dcc231a", + sha256="1200e257da66c1824cc19f37f5df12d8b34ad7f738dd978d119ade0ac14da802", + when="%oneapi", + ) + patch( + "https://github.com/daboehme/hpcg/commit/114602d458d1034faa52b71e4c15aba9b3a17698.patch?full_index=1", + #sha256="b13c74454a2166767e3cde77b0f1d080522828122defc8477cc0b9919dcc231a", + sha256="1200e257da66c1824cc19f37f5df12d8b34ad7f738dd978d119ade0ac14da802", + when="%intel", + ) + patch( + "https://github.com/daboehme/hpcg/commit/114602d458d1034faa52b71e4c15aba9b3a17698.patch?full_index=1", + #sha256="b13c74454a2166767e3cde77b0f1d080522828122defc8477cc0b9919dcc231a", + sha256="1200e257da66c1824cc19f37f5df12d8b34ad7f738dd978d119ade0ac14da802", + when="%clang", + ) + """ + + def cmake_args(self): + build_targets = ["all", "docs"] + install_targets = ["install", "docs"] + args = [ + "-DHPCG_ENABLE_MPI=TRUE", + self.define_from_variant("-DHPCG_ENABLE_CALIPER=TRUE", "caliper"), + self.define_from_variant("-DHPCG_ENABLE_OPENMP=TRUE", "openmp"), + ] + return args From 7e42340a0c76a962d089145cfdaad3e25e20babe Mon Sep 17 00:00:00 2001 From: august-knox Date: Thu, 2 Jan 2025 16:48:19 -0800 Subject: [PATCH 03/13] initial commit for hpcg --- experiments/hpcg/experiment.py | 93 +++++++++++++++++----------------- repo/hpcg/application.py | 4 +- repo/hpcg/package.py | 43 ++-------------- 3 files changed, 51 insertions(+), 89 deletions(-) diff --git a/experiments/hpcg/experiment.py b/experiments/hpcg/experiment.py index a0b2b5f70..f3bf4f149 100644 --- a/experiments/hpcg/experiment.py +++ b/experiments/hpcg/experiment.py @@ -6,14 +6,15 @@ from benchpark.error import BenchparkError from benchpark.directives import variant from benchpark.experiment import Experiment -from benchpark.openmp import OpenMPExperiment from benchpark.scaling import StrongScaling +from benchpark.scaling import WeakScaling from benchpark.expr.builtin.caliper import Caliper class Hpcg( Experiment, - OpenMPExperiment, + StrongScaling, + WeakScaling, Caliper, ): @@ -25,62 +26,60 @@ class Hpcg( ) variant( "version", - default="3.1", + default="caliper", values=("3.1", "develop", "caliper"), description="app version", ) def compute_applications_section(self): - # TODO: Replace with conflicts clause - scaling_modes = { - "single_node": self.spec.satisfies("+single_node"), - } - - scaling_mode_enabled = [key for key, value in scaling_modes.items() if value] - if len(scaling_mode_enabled) != 1: - print(scaling_mode_enabled) - raise BenchparkError( - f"Only one type of scaling per experiment is allowed for application package {self.name}" - ) - if self.spec.satisfies("+single_node"): - self.add_experiment_variable( - "mx", '104', True - ) + problem_sizes = {"mx": 104, "my": 104, "mz": 104} + num_procs = {"x": 1, "y": 1, "z": 1} + n_resources = 1 - self.add_experiment_variable( - "my", '104', True - ) - - self.add_experiment_variable( - "mz", '104', True - ) - self.add_experiment_variable( - "matrix_size", '{mx} {my} {mz}', False - ) - self.add_experiment_variable( - "iterations", '60', False - ) + if self.spec.satisfies("+single_node"): + for k,v in problem_sizes.items(): + self.add_experiment_variable(k, v, True) + - self.add_experiment_variable( - "n_threads_per_proc", ['8', '16'], True - ) - - self.add_experiment_variable( - "n_ranks_per_node", '1', False - ) - self.add_experiment_variable( - "n_nodes", '1', False + elif self.spec.satisfies("+strong"): + scaled_variables = self.generate_strong_scaling_params( + {tuple(num_procs.keys()): list(num_procs.values())}, + int(self.spec.variants["scaling-factor"][0]), + int(self.spec.variants["scaling-iterations"][0]), ) - - #self.add_experiment_variable( - # "env_name", 'hpcg-omp', False - #) - - self.matrix_experiment_variables('n_threads_per_proc') + n_resources = [ + x*y*z for x,y,z in zip( + *(scaled_variables[p] for p in num_procs if p in scaled_variables) + ) + ] + for k, v in problem_sizes.items(): + self.add_experiment_variable(k, v, True) + + elif self.spec.satisfies("+weak"): + scaled_variables = self.generate_weak_scaling_params( + {tuple(num_procs.keys()): list(num_procs.values())}, + {tuple(problem_sizes.keys()): list(problem_sizes.values())}, + int(self.spec.variants["scaling-factor"][0]), + int(self.spec.variants["scaling-iterations"][0]), + ) + n_resources = [ + x*y*z for x,y,z in zip( + *(scaled_variables[p] for p in num_procs if p in scaled_variables) + ) + ] + for k, v in scaled_variables.items(): + if k in problem_sizes: + self.add_experiment_variable(k, v, True) + + self.add_experiment_variable("n_ranks", n_resources, True) + self.add_experiment_variable("n_threads_per_proc", 1, True) + self.add_experiment_variable("matrix_size", '{mx} {my} {mz}', False) + + self.add_experiment_variable("iterations", '60', False) def compute_spack_section(self): # get package version @@ -98,5 +97,5 @@ def compute_spack_section(self): # self.add_spack_spec(system_specs["blas"]) self.add_spack_spec( - self.name, [f"hpcg@{app_version}", system_specs["compiler"]] + self.name, [f"hpcg@{app_version} +openmp", system_specs["compiler"]] ) diff --git a/repo/hpcg/application.py b/repo/hpcg/application.py index 110718e1f..b4e7f4431 100644 --- a/repo/hpcg/application.py +++ b/repo/hpcg/application.py @@ -22,7 +22,7 @@ class Hpcg(ExecutableApplication): executable("execute", "xhpcg", use_mpi=True) - executable("move-log", "mv HPCG-Benchmark*.txt {out_file}", use_mpi=False) + executable("move-log", "mv {experiment_run_dir}/HPCG-Benchmark*.txt {out_file}", use_mpi=False) workload("standard", executables=["execute", "move-log"]) @@ -42,7 +42,7 @@ class Hpcg(ExecutableApplication): workload_variable( "out_file", - default="{experiment_run_dir}/hpcg_result.out", + default="{experiment_run_dir}/{experiment_name}.out", description="Output file for results", workloads=["standard"], ) diff --git a/repo/hpcg/package.py b/repo/hpcg/package.py index 78e641a71..7406511ec 100644 --- a/repo/hpcg/package.py +++ b/repo/hpcg/package.py @@ -29,51 +29,14 @@ class Hpcg(CMakePackage): depends_on("caliper", when="+caliper") depends_on("adiak", when="+caliper") - """ - patch( - "https://github.com/daboehme/hpcg/commit/114602d458d1034faa52b71e4c15aba9b3a17698.patch?full_index=1", - #sha256="b13c74454a2166767e3cde77b0f1d080522828122defc8477cc0b9919dcc231a", - sha256="1200e257da66c1824cc19f37f5df12d8b34ad7f738dd978d119ade0ac14da802", - when="%gcc@9:", - ) - patch( - "https://github.com/daboehme/hpcg/commit/114602d458d1034faa52b71e4c15aba9b3a17698.patch?full_index=1", - #sha256="b13c74454a2166767e3cde77b0f1d080522828122defc8477cc0b9919dcc231a", - sha256="1200e257da66c1824cc19f37f5df12d8b34ad7f738dd978d119ade0ac14da802", - when="%aocc", - ) - patch( - "https://github.com/daboehme/hpcg/commit/114602d458d1034faa52b71e4c15aba9b3a17698.patch?full_index=1", - #sha256="b13c74454a2166767e3cde77b0f1d080522828122defc8477cc0b9919dcc231a", - sha256="1200e257da66c1824cc19f37f5df12d8b34ad7f738dd978d119ade0ac14da802", - when="%arm", - ) - patch( - "https://github.com/daboehme/hpcg/commit/114602d458d1034faa52b71e4c15aba9b3a17698.patch?full_index=1", - #sha256="b13c74454a2166767e3cde77b0f1d080522828122defc8477cc0b9919dcc231a", - sha256="1200e257da66c1824cc19f37f5df12d8b34ad7f738dd978d119ade0ac14da802", - when="%oneapi", - ) - patch( - "https://github.com/daboehme/hpcg/commit/114602d458d1034faa52b71e4c15aba9b3a17698.patch?full_index=1", - #sha256="b13c74454a2166767e3cde77b0f1d080522828122defc8477cc0b9919dcc231a", - sha256="1200e257da66c1824cc19f37f5df12d8b34ad7f738dd978d119ade0ac14da802", - when="%intel", - ) - patch( - "https://github.com/daboehme/hpcg/commit/114602d458d1034faa52b71e4c15aba9b3a17698.patch?full_index=1", - #sha256="b13c74454a2166767e3cde77b0f1d080522828122defc8477cc0b9919dcc231a", - sha256="1200e257da66c1824cc19f37f5df12d8b34ad7f738dd978d119ade0ac14da802", - when="%clang", - ) - """ def cmake_args(self): build_targets = ["all", "docs"] install_targets = ["install", "docs"] args = [ "-DHPCG_ENABLE_MPI=TRUE", - self.define_from_variant("-DHPCG_ENABLE_CALIPER=TRUE", "caliper"), - self.define_from_variant("-DHPCG_ENABLE_OPENMP=TRUE", "openmp"), + self.define_from_variant("HPCG_ENABLE_CALIPER", "caliper"), + self.define_from_variant("HPCG_ENABLE_OPENMP", "openmp"), ] + return args From 4d194a307c0da42ea5b2d74fe24a399978958004 Mon Sep 17 00:00:00 2001 From: august-knox Date: Thu, 2 Jan 2025 16:51:32 -0800 Subject: [PATCH 04/13] dryrun --- .github/workflows/run.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index bf32a3d2b..5325930d9 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -585,4 +585,16 @@ jobs: --workspace-dir "workspace/osu-micro-benchmarks-mpi-only/$system_id/workspace" \ --disable-progress-bar \ --disable-logger \ - workspace setup --dry-run \ No newline at end of file + workspace setup --dry-run + + - name: Dry run dynamic hpcg/openmp with dynamic CTS ruby + run: | + ./bin/benchpark experiment init --dest=hpcg hpcg + ./bin/benchpark setup ./osu-micro-benchmarks-mpi-only ./ruby-system workspace/ + system_id=$(./bin/benchpark system id ./ruby-system) + . workspace/setup.sh + ramble \ + --workspace-dir "workspace/hpcg/$system_id/workspace" \ + --disable-progress-bar \ + --disable-logger \ + workspace setup --dry-run From f50ae3afaaf4c23f8380fb14ea62fbf9dd821d40 Mon Sep 17 00:00:00 2001 From: august-knox Date: Thu, 2 Jan 2025 16:57:23 -0800 Subject: [PATCH 05/13] adding tags --- repo/hpcg/application.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/repo/hpcg/application.py b/repo/hpcg/application.py index b4e7f4431..de1c10395 100644 --- a/repo/hpcg/application.py +++ b/repo/hpcg/application.py @@ -18,7 +18,11 @@ class Hpcg(ExecutableApplication): maintainers("douglasjacobsen") - + tags = ['synthetic', + 'conjugate-gradient','solver','sparse-linear-algebra', + 'large-scale', + 'mpi','network-point-to-point', + 'c++','openmp'] executable("execute", "xhpcg", use_mpi=True) From 22d96195345362365607106b2d24287ec6e28733 Mon Sep 17 00:00:00 2001 From: august-knox Date: Thu, 2 Jan 2025 17:00:50 -0800 Subject: [PATCH 06/13] updating licenses --- repo/hpcg/application.py | 9 +++------ repo/hpcg/package.py | 6 +++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/repo/hpcg/application.py b/repo/hpcg/application.py index de1c10395..2fcf1e720 100644 --- a/repo/hpcg/application.py +++ b/repo/hpcg/application.py @@ -1,10 +1,7 @@ -# Copyright 2022-2024 The Ramble Authors +# Copyright 2023 Lawrence Livermore National Security, LLC and other +# Benchpark Project Developers. See the top-level COPYRIGHT file for details. # -# Licensed under the Apache License, Version 2.0 or the MIT license -# , at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. +# SPDX-License-Identifier: Apache-2.0 import os from ramble.appkit import * diff --git a/repo/hpcg/package.py b/repo/hpcg/package.py index 7406511ec..34e62c698 100644 --- a/repo/hpcg/package.py +++ b/repo/hpcg/package.py @@ -1,7 +1,7 @@ -# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. +# 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 OR MIT) +# SPDX-License-Identifier: Apache-2.0 import os import platform From db08cbf573319ec8d09302556e2d3b1638cd3170 Mon Sep 17 00:00:00 2001 From: august-knox Date: Fri, 3 Jan 2025 09:39:35 -0800 Subject: [PATCH 07/13] lint --- experiments/hpcg/experiment.py | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/experiments/hpcg/experiment.py b/experiments/hpcg/experiment.py index f3bf4f149..d203807de 100644 --- a/experiments/hpcg/experiment.py +++ b/experiments/hpcg/experiment.py @@ -18,7 +18,6 @@ class Hpcg( Caliper, ): - variant( "workload", default="standard", @@ -37,14 +36,10 @@ def compute_applications_section(self): num_procs = {"x": 1, "y": 1, "z": 1} n_resources = 1 - - if self.spec.satisfies("+single_node"): - for k,v in problem_sizes.items(): + for k, v in problem_sizes.items(): self.add_experiment_variable(k, v, True) - - elif self.spec.satisfies("+strong"): scaled_variables = self.generate_strong_scaling_params( {tuple(num_procs.keys()): list(num_procs.values())}, @@ -52,7 +47,8 @@ def compute_applications_section(self): int(self.spec.variants["scaling-iterations"][0]), ) n_resources = [ - x*y*z for x,y,z in zip( + x * y * z + for x,y,z in zip( *(scaled_variables[p] for p in num_procs if p in scaled_variables) ) ] @@ -67,7 +63,8 @@ def compute_applications_section(self): int(self.spec.variants["scaling-iterations"][0]), ) n_resources = [ - x*y*z for x,y,z in zip( + x * y * z + for x,y,z in zip( *(scaled_variables[p] for p in num_procs if p in scaled_variables) ) ] @@ -77,9 +74,9 @@ def compute_applications_section(self): self.add_experiment_variable("n_ranks", n_resources, True) self.add_experiment_variable("n_threads_per_proc", 1, True) - self.add_experiment_variable("matrix_size", '{mx} {my} {mz}', False) + self.add_experiment_variable("matrix_size", "{mx} {my} {mz}", False) - self.add_experiment_variable("iterations", '60', False) + self.add_experiment_variable("iterations", "60", False) def compute_spack_section(self): # get package version From 8bebc2c705c4a729734ee1e9a048ea4cd6ebee7e Mon Sep 17 00:00:00 2001 From: august-knox Date: Fri, 3 Jan 2025 09:41:54 -0800 Subject: [PATCH 08/13] lint --- experiments/hpcg/experiment.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/experiments/hpcg/experiment.py b/experiments/hpcg/experiment.py index d203807de..4b96224ac 100644 --- a/experiments/hpcg/experiment.py +++ b/experiments/hpcg/experiment.py @@ -39,7 +39,7 @@ def compute_applications_section(self): if self.spec.satisfies("+single_node"): for k, v in problem_sizes.items(): self.add_experiment_variable(k, v, True) - + elif self.spec.satisfies("+strong"): scaled_variables = self.generate_strong_scaling_params( {tuple(num_procs.keys()): list(num_procs.values())}, @@ -48,7 +48,7 @@ def compute_applications_section(self): ) n_resources = [ x * y * z - for x,y,z in zip( + for x, y, z in zip( *(scaled_variables[p] for p in num_procs if p in scaled_variables) ) ] @@ -64,14 +64,14 @@ def compute_applications_section(self): ) n_resources = [ x * y * z - for x,y,z in zip( + for x, y, z in zip( *(scaled_variables[p] for p in num_procs if p in scaled_variables) ) ] for k, v in scaled_variables.items(): if k in problem_sizes: self.add_experiment_variable(k, v, True) - + self.add_experiment_variable("n_ranks", n_resources, True) self.add_experiment_variable("n_threads_per_proc", 1, True) self.add_experiment_variable("matrix_size", "{mx} {my} {mz}", False) From ef18e63fcfb2d0f059dde570b8a5cf480600ea73 Mon Sep 17 00:00:00 2001 From: august-knox Date: Fri, 3 Jan 2025 09:53:34 -0800 Subject: [PATCH 09/13] lint and update dryrun --- .github/workflows/run.yml | 2 +- experiments/hpcg/experiment.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 5325930d9..a01f3fd0f 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -590,7 +590,7 @@ jobs: - name: Dry run dynamic hpcg/openmp with dynamic CTS ruby run: | ./bin/benchpark experiment init --dest=hpcg hpcg - ./bin/benchpark setup ./osu-micro-benchmarks-mpi-only ./ruby-system workspace/ + ./bin/benchpark setup ./hpcg ./ruby-system workspace/ system_id=$(./bin/benchpark system id ./ruby-system) . workspace/setup.sh ramble \ diff --git a/experiments/hpcg/experiment.py b/experiments/hpcg/experiment.py index 4b96224ac..403f5c85b 100644 --- a/experiments/hpcg/experiment.py +++ b/experiments/hpcg/experiment.py @@ -47,7 +47,7 @@ def compute_applications_section(self): int(self.spec.variants["scaling-iterations"][0]), ) n_resources = [ - x * y * z + x * y * z for x, y, z in zip( *(scaled_variables[p] for p in num_procs if p in scaled_variables) ) @@ -63,7 +63,7 @@ def compute_applications_section(self): int(self.spec.variants["scaling-iterations"][0]), ) n_resources = [ - x * y * z + x * y * z for x, y, z in zip( *(scaled_variables[p] for p in num_procs if p in scaled_variables) ) From 7908a4fba2b74d5fe3fae8a607171edb3a842fe1 Mon Sep 17 00:00:00 2001 From: august-knox Date: Fri, 3 Jan 2025 09:56:41 -0800 Subject: [PATCH 10/13] removing unused import --- experiments/hpcg/experiment.py | 1 - 1 file changed, 1 deletion(-) diff --git a/experiments/hpcg/experiment.py b/experiments/hpcg/experiment.py index 403f5c85b..b1cd3a04f 100644 --- a/experiments/hpcg/experiment.py +++ b/experiments/hpcg/experiment.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: Apache-2.0 -from benchpark.error import BenchparkError from benchpark.directives import variant from benchpark.experiment import Experiment from benchpark.scaling import StrongScaling From b89d1e220dafdeb662e561ed83484404464ee911 Mon Sep 17 00:00:00 2001 From: august-knox Date: Mon, 27 Jan 2025 15:34:50 -0800 Subject: [PATCH 11/13] removing old dryruns --- .github/workflows/run.yml | 45 --------------------------------------- 1 file changed, 45 deletions(-) diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 64dbdbba5..0624531e2 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -308,51 +308,6 @@ jobs: run: | pip install -r ./requirements.txt - - name: Dry run dynamic hpcg/openmp with dynamic CTS ruby - run: | - ./bin/benchpark experiment init --dest=hpcg-ruby hpcg - ./bin/benchpark setup ./hpcg-ruby ./ruby-system workspace/ - system_id=$(./bin/benchpark system id ./ruby-system) - . workspace/setup.sh - ramble \ - --workspace-dir "workspace/hpcg-ruby/$system_id/workspace" \ - --disable-progress-bar \ - --disable-logger \ - workspace setup --dry-run - - - name: Dry run dynamic hpcg/openmp with dynamic CTS tioga - run: | - ./bin/benchpark experiment init --dest=hpcg-tioga hpcg - ./bin/benchpark setup ./hpcg-tioga ./tioga-system workspace/ - system_id=$(./bin/benchpark system id ./tioga-system) - . workspace/setup.sh - ramble \ - --workspace-dir "workspace/hpcg-tioga/$system_id/workspace" \ - --disable-progress-bar \ - --disable-logger \ - workspace setup --dry-run - - - name: Dry run dynamic hpcg/openmp with dynamic CTS sierra - run: | - ./bin/benchpark experiment init --dest=hpcg-sierra hpcg - ./bin/benchpark setup ./hpcg-sierra ./sierra-system1 workspace/ - system_id=$(./bin/benchpark system id ./sierra-system1) - . workspace/setup.sh - ramble \ - --workspace-dir "workspace/hpcg-sierra/$system_id/workspace" \ - --disable-progress-bar \ - --disable-logger \ - workspace setup --dry-run - - - name: saxpy/openmp ruby llnl-cluster cluster=ruby compiler=intel - uses: ./.github/actions/dynamic-dry-run - with: - benchmark_name: saxpy - benchmark_mode: openmp - benchmark_spec: saxpy+openmp - system_name: ruby - system_spec: llnl-cluster cluster=ruby compiler=intel - - name: saxpy/openmp dane llnl-cluster cluster=dane uses: ./.github/actions/dynamic-dry-run with: From 69382c3ad378e5d557ecfdac0e655a2bd4528f00 Mon Sep 17 00:00:00 2001 From: august-knox Date: Mon, 27 Jan 2025 15:48:10 -0800 Subject: [PATCH 12/13] fixing new dryruns --- .github/workflows/run.yml | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 0624531e2..95a197ed9 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -308,6 +308,15 @@ jobs: run: | pip install -r ./requirements.txt + - name: saxpy/openmp ruby llnl-cluster cluster=ruby compiler=intel + uses: ./.github/actions/dynamic-dry-run + with: + benchmark_name: saxpy + benchmark_mode: openmp + benchmark_spec: saxpy+openmp + system_name: ruby + system_spec: llnl-cluster cluster=ruby compiler=intel + - name: saxpy/openmp dane llnl-cluster cluster=dane uses: ./.github/actions/dynamic-dry-run with: @@ -722,29 +731,29 @@ jobs: system_name: tioga system_spec: llnl-elcapitan rocm=5.5.1 compiler=cce +gtl - - name: hpcg/rocm caliper=mpi,time tioga llnl-elcapitan rocm=5.5.1 compiler=cce +gtl + - name: hpcg/openmp caliper=mpi,time tioga llnl-elcapitan compiler=cce uses: ./.github/actions/dynamic-dry-run with: benchmark_name: hpcg - benchmark_mode: rocm - benchmark_spec: hpcg+rocm caliper=mpi,time + benchmark_mode: openmp + benchmark_spec: hpcg caliper=mpi,time system_name: tioga - system_spec: llnl-elcapitan rocm=5.5.1 compiler=cce +gtl + system_spec: llnl-elcapitan compiler=cce - - name: hpcg/cuda caliper=cuda,time lassen llnl-sierra cuda=11-8-0 compiler=clang-ibm + - name: hpcg/cuda caliper=time lassen llnl-sierra compiler=clang-ibm uses: ./.github/actions/dynamic-dry-run with: benchmark_name: hpcg - benchmark_mode: cuda - benchmark_spec: hpcg+cuda caliper=cuda,time + benchmark_mode: openmp + benchmark_spec: hpcg caliper=time system_name: lassen - system_spec: llnl-sierra cuda=11-8-0 compiler=clang-ibm + system_spec: llnl-sierra compiler=clang-ibm - name: hpcg/openmp caliper=cuda,time ruby llnl-cluster cluster=ruby compiler=gcc uses: ./.github/actions/dynamic-dry-run with: benchmark_name: hpcg benchmark_mode: openmp - benchmark_spec: hpcg+openmp + benchmark_spec: hpcg system_name: ruby system_spec: llnl-cluster cluster=ruby compiler=gcc From 6f96999b61e617fa7077c7740da2dbb24726a920 Mon Sep 17 00:00:00 2001 From: august-knox Date: Tue, 28 Jan 2025 11:21:24 -0800 Subject: [PATCH 13/13] update caliper import --- experiments/hpcg/experiment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/experiments/hpcg/experiment.py b/experiments/hpcg/experiment.py index b1cd3a04f..ee52ef8a7 100644 --- a/experiments/hpcg/experiment.py +++ b/experiments/hpcg/experiment.py @@ -7,7 +7,7 @@ from benchpark.experiment import Experiment from benchpark.scaling import StrongScaling from benchpark.scaling import WeakScaling -from benchpark.expr.builtin.caliper import Caliper +from benchpark.caliper import Caliper class Hpcg(