@@ -33,3 +33,62 @@ generating workflow benchmarks.::
3333
3434Translating Specifications into Benchmark Codes
3535-----------------------------------------------
36+
37+ WfCommons provides a collection of translators for executing the benchmarks as actual
38+ workflow applications. Below, we provide illustrative examples on how to generate
39+ workflow benchmakrs for the currently supported workflow systems.
40+
41+ The :class: `~wfcommons.wfbench.translator.abstract_translator.Translator ` class is
42+ the foundation for each translator class. This class takes as input either a
43+ :class: `~wfcommons.common.workflow.Workflow ` object or a path to a workflow benchmark
44+ description in :ref: `json-format-label `.
45+
46+ Pegasus
47+ +++++++
48+
49+ `Pegasus <http://pegasus.isi.edu >`_ orchestrates the execution of complex scientific
50+ workflows by providing a platform to define, organize, and automate computational
51+ tasks and data dependencies. Pegasus handles the complexity of large-scale workflows
52+ by automatically mapping tasks onto distributed computing resources, such as clusters,
53+ grids, or clouds. Below, we provide an example on how to generate workflow benchmark
54+ for running with Pegasus:::
55+
56+ import pathlib
57+
58+ from wfcommons import BlastRecipe
59+ from wfcommons.wfbench import WorkflowBenchmark, PegasusTranslator
60+
61+ # create a workflow benchmark object to generate specifications based on a recipe
62+ benchmark = WorkflowBenchmark(recipe=BlastRecipe, num_tasks=500)
63+
64+ # generate a specification based on performance characteristics
65+ benchmark.create_benchmark(pathlib.Path("/tmp/"), cpu_work=100, data=10, percent_cpu=0.6)
66+
67+ # generate a Pegasus workflow
68+ translator = PegasusTranslator(benchmark.workflow)
69+ translator.translate(output_file_name=pathlib.Path("/tmp/benchmark-workflow.py"))
70+
71+ Swift/T
72+ +++++++
73+
74+ `Swift/T <http://swift-lang.org/Swift-T/ >`_ is an advanced workflow system designed
75+ specifically for high-performance computing (HPC) environments. It dynamically manages
76+ task dependencies and resource allocation, enabling efficient utilization of HPC
77+ systems. It provides a seamless interface to diverse tools, libraries, and scientific
78+ applications, making it easy to integrate existing codes into workflows. Below, we
79+ provide an example on how to generate workflow benchmark for running with Swift/T:::
80+
81+ import pathlib
82+
83+ from wfcommons import BlastRecipe
84+ from wfcommons.wfbench import WorkflowBenchmark, SwiftTTranslator
85+
86+ # create a workflow benchmark object to generate specifications based on a recipe
87+ benchmark = WorkflowBenchmark(recipe=BlastRecipe, num_tasks=500)
88+
89+ # generate a specification based on performance characteristics
90+ benchmark.create_benchmark(pathlib.Path("/tmp/"), cpu_work=100, data=10, percent_cpu=0.6)
91+
92+ # generate a Swift/T workflow
93+ translator = SwiftTTranslator(benchmark.workflow)
94+ translator.translate(output_file_name=pathlib.Path("/tmp/benchmark-workflow.swift"))
0 commit comments