Skip to content

Commit 7fe783a

Browse files
committed
improving documentation
1 parent b44f9a0 commit 7fe783a

3 files changed

Lines changed: 77 additions & 0 deletions

File tree

docs/source/dev_api_wfbench.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,13 @@ wfcommons.wfbench.bench
1313
:show-inheritance:
1414
:private-members:
1515
:noindex:
16+
17+
wfcommons.wfbench.translator.abstract_translator
18+
------------------------------------------------
19+
20+
.. automodule:: wfcommons.wfbench.translator.abstract_translator
21+
:members:
22+
:undoc-members:
23+
:show-inheritance:
24+
:private-members:
25+
:noindex:

docs/source/generating_workflow_benchmarks.rst

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,62 @@ generating workflow benchmarks.::
3333

3434
Translating 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"))

docs/source/user_api_wfbench.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,11 @@ wfcommons.wfbench.bench
1414
:undoc-members:
1515
:show-inheritance:
1616

17+
18+
wfcommons.wfbench.translator.abstract_translator
19+
------------------------------------------------
20+
21+
.. automodule:: wfcommons.wfbench.translator.abstract_translator
22+
:members:
23+
:undoc-members:
24+
:show-inheritance:

0 commit comments

Comments
 (0)