From 1414f5b14427117af6814246eac31ce6a483b1b8 Mon Sep 17 00:00:00 2001 From: Bob Date: Thu, 16 Jul 2026 13:23:15 -0600 Subject: [PATCH 1/2] Add stress-ng app definition --- .../applications/stress-ng/application.py | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 var/ramble/repos/builtin/applications/stress-ng/application.py diff --git a/var/ramble/repos/builtin/applications/stress-ng/application.py b/var/ramble/repos/builtin/applications/stress-ng/application.py new file mode 100644 index 000000000..df3aa4f89 --- /dev/null +++ b/var/ramble/repos/builtin/applications/stress-ng/application.py @@ -0,0 +1,119 @@ +# Copyright 2022-2026 The Ramble Authors +# +# 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. + +from ramble.appkit import * + + +class StressNg(ExecutableApplication): + """Stress-ng is a system stress-testing utility""" + + name = "stress-ng" + + maintainers("robertbird") + + tags("system-utility", "micro-benchmark") + + version("0.12.06", "Version 0.12.06 of stress-ng", preferred=True) + + with when("package_manager_family=spack"): + define_compiler("gcc", pkg_spec="gcc") + + software_spec( + "stress-ng-{application::stress-ng::version}", + pkg_spec="stress-ng@{application::stress-ng::version}", + compiler="gcc", + ) + + required_package("stress-ng") + + executable( + "run-stress", + "{stress_ng_bin} --{stressor} {workers} --timeout {timeout} {extra_args} --metrics-brief", + use_mpi=False, + output_capture=OUTPUT_CAPTURE.ALL, + ) + + workload("cpu", executable="run-stress") + workload("matrix", executable="run-stress") + workload("vecmath", executable="run-stress") + + workload_variable( + "stress_ng_bin", + default="stress-ng", + description="Path to stress-ng binary", + workloads=["cpu", "matrix", "vecmath"], + ) + workload_variable( + "stressor", + description="Stressor name", + workload_defaults={ + "cpu": "cpu", + "matrix": "matrix", + "vecmath": "vecmath", + }, + ) + workload_variable( + "workers", + default="0", + description="Number of workers (0 for all)", + workloads=["cpu", "matrix", "vecmath"], + ) + workload_variable( + "timeout", + default="60s", + description="Stressor timeout duration", + workloads=["cpu", "matrix", "vecmath"], + ) + workload_variable( + "extra_args", + description="Extra arguments", + workload_defaults={ + "cpu": "", + "matrix": "--matrix-method mult", + "vecmath": "", + }, + ) + workload_variable( + "cpu_list", + default="", + description="Taskset core list", + workloads=["cpu", "matrix", "vecmath"], + ) + workload_variable( + "matrix_method", + default="all", + description="Matrix method", + workload="matrix", + ) + + success_criteria( + "successful_run", + mode="string", + match=r"(?s).*successful run completed", + ) + + metrics_regex = ( + r"stress-ng: (info|metrc):\s+\[[0-9]+\]\s+(?Pcpu|matrix|cache|[\w\-]+)\s+" + + r"(?P[0-9]+)\s+(?P[0-9\.]+)\s+(?P[0-9\.]+)\s+" + + r"(?P[0-9\.]+)\s+(?P[0-9\.]+)\s+" + + r"(?P[0-9\.]+)" + ) + + figure_of_merit( + "Bogo Ops", + fom_regex=metrics_regex, + group_name="bogo_ops", + units="", + ) + + figure_of_merit( + "Bogo Ops/s (Real Time)", + fom_regex=metrics_regex, + group_name="bogo_ops_per_s_real", + units="ops/s", + ) From cff82a9074d29338bce8f4029ec193400d99e453 Mon Sep 17 00:00:00 2001 From: Bob Date: Wed, 22 Jul 2026 12:34:43 -0600 Subject: [PATCH 2/2] Address reviewer feedback --- .../builtin/applications/stress-ng/application.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/var/ramble/repos/builtin/applications/stress-ng/application.py b/var/ramble/repos/builtin/applications/stress-ng/application.py index df3aa4f89..b53c560fe 100644 --- a/var/ramble/repos/builtin/applications/stress-ng/application.py +++ b/var/ramble/repos/builtin/applications/stress-ng/application.py @@ -74,16 +74,10 @@ class StressNg(ExecutableApplication): description="Extra arguments", workload_defaults={ "cpu": "", - "matrix": "--matrix-method mult", + "matrix": "--matrix-method {matrix_method}", "vecmath": "", }, ) - workload_variable( - "cpu_list", - default="", - description="Taskset core list", - workloads=["cpu", "matrix", "vecmath"], - ) workload_variable( "matrix_method", default="all", @@ -108,7 +102,8 @@ class StressNg(ExecutableApplication): "Bogo Ops", fom_regex=metrics_regex, group_name="bogo_ops", - units="", + units="ops", + fom_type=FomType.MEASURE, ) figure_of_merit( @@ -116,4 +111,5 @@ class StressNg(ExecutableApplication): fom_regex=metrics_regex, group_name="bogo_ops_per_s_real", units="ops/s", + fom_type=FomType.THROUGHPUT, )