Skip to content

Commit f08f54e

Browse files
committed
Removed all traces of cpu-benchmark.cpp
1 parent 32963ae commit f08f54e

12 files changed

Lines changed: 32 additions & 176 deletions

File tree

Makefile

Lines changed: 0 additions & 40 deletions
This file was deleted.

bin/cpu-benchmark.cpp

Lines changed: 0 additions & 89 deletions
This file was deleted.

docs/source/generating_workflow_benchmarks.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ recipe to generate a task graph. Once the task graph has been generated, each ta
3535
is set to be an instance of the workflow task benchmark. For each task, the following
3636
values for the parameters of the workflow task benchmark can be specified:
3737

38-
- :code:`cpu_work`: CPU work per workflow task. The :code:`cpu-benchmark` executable
39-
(compiled C++) calculates an increasingly precise value of π up until the specified
40-
total amount of computation (cpu_work) has been performed.
38+
- :code:`cpu_work`: CPU work per workflow task.
4139
- :code:`data`: Individual data volumes for each task in a way that is coherent
4240
with respect to task data dependencies (in the form of a dictionary of input
4341
size files per workflow task type). Alternatively, a total data footprint (in MB)

setup.py

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,33 @@
1616
from setuptools.command.build_ext import build_ext
1717

1818
class Build(build_ext):
19-
"""Customized setuptools build command - builds cpu-benchmark on build."""
19+
"""Customized setuptools build command"""
2020

2121
def run(self):
22-
# Try to build the cpu-benchmark, but make it optional
23-
# This allows installation on Windows where make/g++ may not be available
24-
try:
25-
result = subprocess.call(["make"], stderr=subprocess.DEVNULL, stdout=subprocess.DEVNULL)
26-
if result != 0:
27-
sys.stderr.write("Warning: 'make' build failed. cpu-benchmark will not be available.\n")
28-
sys.stderr.write("This is expected on Windows. To build cpu-benchmark, install make and g++.\n")
29-
except (FileNotFoundError, OSError):
30-
sys.stderr.write("Warning: 'make' is not installed. cpu-benchmark will not be available.\n")
31-
sys.stderr.write("This is expected on Windows. To build cpu-benchmark, install make and g++.\n")
32-
super().run()
22+
pass
23+
# OLD CODE TO build a C++ executable
24+
# # This allows installation on Windows where make/g++ may not be available
25+
# try:
26+
# result = subprocess.call(["make"], stderr=subprocess.DEVNULL, stdout=subprocess.DEVNULL)
27+
# if result != 0:
28+
# sys.stderr.write("Warning: 'make' build failed. cpu-benchmark will not be available.\n")
29+
# sys.stderr.write("This is expected on Windows. To build cpu-benchmark, install make and g++.\n")
30+
# except (FileNotFoundError, OSError):
31+
# sys.stderr.write("Warning: 'make' is not installed. cpu-benchmark will not be available.\n")
32+
# sys.stderr.write("This is expected on Windows. To build cpu-benchmark, install make and g++.\n")
33+
# super().run()
3334

3435
# Conditionally include cpu-benchmark based on platform
3536
data_files = []
36-
if sys.platform != 'win32':
37-
# On Unix-like systems (Linux, macOS, Docker), always try to include it
38-
# The Build class will create it during the build process
39-
data_files.append(('bin', ['bin/cpu-benchmark']))
40-
else:
41-
# On Windows, only include if it exists (e.g., if user manually compiled it)
42-
cpu_benchmark_path = 'bin/cpu-benchmark'
43-
if os.path.exists(cpu_benchmark_path):
44-
data_files.append(('bin', [cpu_benchmark_path]))
37+
# if sys.platform != 'win32':
38+
# # On Unix-like systems (Linux, macOS, Docker), always try to include it
39+
# # The Build class will create it during the build process
40+
# data_files.append(('bin', ['bin/cpu-benchmark']))
41+
# else:
42+
# # On Windows, only include if it exists (e.g., if user manually compiled it)
43+
# cpu_benchmark_path = 'bin/cpu-benchmark'
44+
# if os.path.exists(cpu_benchmark_path):
45+
# data_files.append(('bin', [cpu_benchmark_path]))
4546

4647
setup(
4748
packages=find_packages(),

tests/test_helpers.py

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,8 @@ def _install_WfCommons_on_container(container):
5757
# Cleanup files that came from the host
5858
exit_code, output = container.exec_run("sudo /bin/rm -rf /tmp/WfCommons/build/", user="wfcommons", stdout=True, stderr=True)
5959
exit_code, output = container.exec_run("sudo /bin/rm -rf /tmp/WfCommons/*.egg-info/", user="wfcommons", stdout=True, stderr=True)
60-
# Clean up and force a rebuild of cpu-benchmark (because it may be compiled for the wrong architecture)
61-
exit_code, output = container.exec_run("sudo /bin/rm -rf /tmp/WfCommons/bin/cpu-benchmark.o", user="wfcommons", stdout=True,
62-
stderr=True)
63-
exit_code, output = container.exec_run("sudo /bin/rm -rf /tmp/WfCommons/bin/cpu-benchmark", user="wfcommons", stdout=True,
64-
stderr=True)
6560

66-
# Install WfCommons on the container (to install wfbench and cpu-benchmark really)
61+
# Install WfCommons on the container (to install wfbench really)
6762
exit_code, output = container.exec_run("sudo python3 -m pip install . --break-system-packages",
6863
user="wfcommons",
6964
workdir="/tmp/WfCommons", stdout=True, stderr=True)
@@ -103,22 +98,17 @@ def _start_docker_container(backend, mounted_dir, working_dir, bin_dir, command=
10398
# Installing WfCommons on container
10499
_install_WfCommons_on_container(container)
105100

106-
# Copy over the wfbench and cpu-benchmark executables to where they should go on the container
101+
# Copy over the wfbench executable to where they should go on the container
107102
if bin_dir:
108-
sys.stderr.write(f"[{backend}] Copying wfbench and cpu-benchmark...\n")
103+
sys.stderr.write(f"[{backend}] Copying wfbench...\n")
109104
exit_code, output = container.exec_run(["sh", "-c", "sudo cp -f `which wfbench` " + bin_dir],
110105
user="wfcommons",
111106
stdout=True, stderr=True)
112107
if exit_code != 0:
113108
raise RuntimeError("Failed to copy wfbench script to the bin directory")
114109

115-
exit_code, output = container.exec_run(["sh", "-c", "sudo cp -f `which cpu-benchmark` " + bin_dir],
116-
user="wfcommons",
117-
stdout=True, stderr=True)
118-
if exit_code != 0:
119-
raise RuntimeError("Failed to copy cpu-benchmark executable to the bin directory")
120110
else:
121-
sys.stderr.write(f"[{backend}] Not Copying wfbench and cpu-benchmark...\n")
111+
sys.stderr.write(f"[{backend}] Not Copying wfbench...\n")
122112

123113
container.backend = backend
124114
return container

tests/translators_loggers/test_translators_loggers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def test_translator(self, backend) -> None:
348348
if backend == "pegasus":
349349
parser = PegasusLogsParser(dirpath / "work/wfcommons/pegasus/Blast-Benchmark/run0001/")
350350
elif backend == "taskvine":
351-
parser = TaskVineLogsParser(dirpath / "vine-run-info/most-recent/vine-logs", filenames_to_ignore=["cpu-benchmark","stress-ng", "wfbench"])
351+
parser = TaskVineLogsParser(dirpath / "vine-run-info/most-recent/vine-logs", filenames_to_ignore=["stress-ng", "wfbench"])
352352
elif backend == "makeflow":
353353
parser = MakeflowLogsParser(execution_dir = dirpath, resource_monitor_logs_dir = dirpath / "monitor_data/")
354354
elif backend == "streamflow":

wfcommons/wfbench/translator/abstract_translator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ def _copy_binary_files(self, output_folder: pathlib.Path) -> None:
9494
bin_folder.mkdir(exist_ok=True)
9595

9696
shutil.copy(shutil.which("wfbench"), bin_folder)
97-
shutil.copy(shutil.which("cpu-benchmark"), bin_folder)
9897

9998
def _generate_input_files(self, output_folder: pathlib.Path) -> None:
10099
"""

wfcommons/wfbench/translator/pegasus.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def translate(self, output_folder: pathlib.Path, tasks_priorities: Optional[Dict
6565
" is_stageable=True)\n" \
6666
"transformation.add_env(PATH='/usr/bin:/bin:.')\n" \
6767
"transformation.add_profiles(Namespace.CONDOR, 'request_disk', '10')\n" \
68-
"transformation.add_requirement(t_cpu_benchmark)\n" \
6968
"tc.add_transformations(transformation)\n\n"
7069

7170
# adding tasks

wfcommons/wfbench/translator/taskvine.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ def _add_task(self, task_name: str, parent_task: Optional[str] = None) -> list[s
118118
f_counter = 1
119119
task_script = f"t_{self.task_counter}.add_poncho_package(poncho_pkg)\n" \
120120
f"t_{self.task_counter}.add_input(wfbench, 'wfbench')\n" \
121-
f"t_{self.task_counter}.add_input(cpu_bench, 'cpu-benchmark')\n" \
122121
f"t_{self.task_counter}.add_input(stress_ng, 'stress-ng')\n"
123122
input_spec = "\"["
124123
for file in task.input_files:

wfcommons/wfbench/translator/templates/pegasus_template.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ def which(file):
2222
tc = TransformationCatalog()
2323
rc = ReplicaCatalog()
2424

25-
t_cpu_benchmark = Transformation('cpu-benchmark', site='local',
26-
pfn = os.getcwd() + '/bin/cpu-benchmark', is_stageable=True)
27-
tc.add_transformations(t_cpu_benchmark)
25+
# t_cpu_benchmark = Transformation('cpu-benchmark', site='local',
26+
# pfn = os.getcwd() + '/bin/cpu-benchmark', is_stageable=True)
27+
# tc.add_transformations(t_cpu_benchmark)
2828
transformation_path = os.getcwd() + '/bin/wfbench'
2929

3030
task_output_files = {}

0 commit comments

Comments
 (0)