Skip to content

Commit fa51390

Browse files
committed
Merge branch 'main' into streamflow_translator
2 parents c65019d + 16fdb56 commit fa51390

File tree

112 files changed

+3534
-1737
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+3534
-1737
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
10+
python-version: [ "3.11", "3.12", "3.13" ]
1111
steps:
1212
- uses: actions/checkout@v4
1313

@@ -18,15 +18,26 @@ jobs:
1818

1919
- name: Install dependencies
2020
run: |
21+
sudo apt-get update
2122
sudo apt-get install -y python3-sphinx sphinx-rtd-theme-common
2223
pip install sphinx_rtd_theme recommonmark pytest pytest-cov
24+
pip install --upgrade setuptools
25+
26+
- name: Install utilities for testing
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install stress-ng
30+
sudo apt-get install graphviz libgraphviz-dev
31+
pip install docker
32+
pip install pygraphviz
33+
pip install pydot
2334
2435
- name: Check package install
2536
run: |
26-
pip install -e .
37+
pip install .
2738
2839
- name: Run tests
29-
run: pytest -m unit --cov=wfcommons tests/
40+
run: python3 -m pytest -s -v -m unit --cov=wfcommons tests/
3041

3142
- name: Upload coverage
3243
if: github.ref == 'refs/heads/main'

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,8 @@ bin/gpu_benchmark
5555
/wfcommons/wfc-1.3_to_dask/out
5656
/wfcommons/wfc-1.3_to_dask/htmlcov
5757

58+
# Coverage stuff
59+
.coverage
60+
coverage.xml
61+
5862
test/

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
graft wfcommons/wfchef/recipes/rnaseq/microstructures/**
2+
graft wfcommons/wfchef/recipes/rnaseq/microstructures
3+
graft wfcommons/wfchef/recipes/rnaseq
14
graft wfcommons/wfchef/recipes/epigenomics/microstructures/**
25
graft wfcommons/wfchef/recipes/epigenomics/microstructures
36
graft wfcommons/wfchef/recipes/epigenomics

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This Python package provides a collection of tools for:
2121
## Installation
2222

2323
WfCommons is available on [PyPI](https://pypi.org/project/wfcommons).
24-
WfCommons requires Python3.9+ and has been tested on Linux and macOS.
24+
WfCommons requires Python3.11+ and has been tested on Linux and MacOS.
2525

2626
### Installation using pip
2727

bin/wfbench

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ def begin_flowcept(args):
341341
bundle_exec_id=args.workflow_id,
342342
start_persistence=False, save_workflow=False)
343343
f.start()
344-
t = FlowceptTask(workflow_id=args.workflow_id, used={**args.__dict__})
344+
t = FlowceptTask(task_id=f"{args.workflow_id}_{args.name}", workflow_id=args.workflow_id, used={**args.__dict__})
345345
return f, t
346346

347347

@@ -457,7 +457,11 @@ def main():
457457
if args.time:
458458
time.sleep(int(args.time))
459459
for proc in procs:
460-
os.killpg(os.getpgid(proc.pid), signal.SIGTERM)
460+
if isinstance(proc, multiprocessing.Process):
461+
if proc.is_alive():
462+
proc.terminate()
463+
elif isinstance(proc, subprocess.Popen):
464+
proc.terminate()
461465
else:
462466
for proc in procs:
463467
if isinstance(proc, subprocess.Popen):

docs/source/dev_api_wfbench.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ wfcommons.wfbench.bench
1515
:noindex:
1616

1717
wfcommons.wfbench.translator.nextflow
18-
------------------------------------
18+
-------------------------------------
1919

2020
.. automodule:: wfcommons.wfbench.translator.nextflow
2121
:members:

docs/source/generating_workflow_benchmarks.rst

Lines changed: 58 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,32 @@ description in :ref:`json-format-label`.
8888
to execute memory-intensive threads. Therefore, it is crucial to ensure that
8989
:code:`stress-ng` is installed on all worker nodes.
9090

91+
92+
Dask
93+
++++++++
94+
`Dask <https://www.dask.org/>`_ is an open-source library for parallel computing
95+
in Python. It makes it possible to easily implement and execute workflows local machines, HPC cluster schedulers, and cloud-based
96+
and container-based environments. Below, we provide an example on how to generate
97+
workflow benchmark for running with Dask::
98+
99+
import pathlib
100+
101+
from wfcommons import BlastRecipe
102+
from wfcommons.wfbench import WorkflowBenchmark, DaskTranslator
103+
104+
# create a workflow benchmark object to generate specifications based on a recipe
105+
benchmark = WorkflowBenchmark(recipe=BlastRecipe, num_tasks=500)
106+
107+
# generate a specification based on performance characteristics
108+
benchmark.create_benchmark(pathlib.Path("/tmp/"), cpu_work=100, data=10, percent_cpu=0.6)
109+
110+
# generate a Dask workflow
111+
translator = DaskTranslator(benchmark.workflow)
112+
translator.translate(output_folder=pathlib.Path("./dask-wf/""))
113+
91114
Nextflow
92115
++++++++
116+
93117
`Nextflow <https://www.nextflow.io/>`_ is a workflow management system that enables
94118
the development of portable and reproducible workflows. It supports deploying workflows
95119
on a variety of execution platforms including local, HPC schedulers, and cloud-based
@@ -117,29 +141,16 @@ workflow benchmark for running with Nextflow::
117141
that depend on another instance of the same abstract task. Thus, the translator
118142
fails when you try to translate a workflow with iterations.
119143

120-
Dask
121-
++++++++
122-
`Dask <https://www.dask.org/>`_ is an open-source library for parallel computing
123-
in Python. It makes it possible to easily implement and execute workflows local machines, HPC cluster schedulers, and cloud-based
124-
and container-based environments. Below, we provide an example on how to generate
125-
workflow benchmark for running with Dask::
126-
127-
import pathlib
128-
129-
from wfcommons import BlastRecipe
130-
from wfcommons.wfbench import WorkflowBenchmark, DaskTranslator
131-
132-
# create a workflow benchmark object to generate specifications based on a recipe
133-
benchmark = WorkflowBenchmark(recipe=BlastRecipe, num_tasks=500)
134-
135-
# generate a specification based on performance characteristics
136-
benchmark.create_benchmark(pathlib.Path("/tmp/"), cpu_work=100, data=10, percent_cpu=0.6)
137-
138-
# generate a Dask workflow
139-
translator = DaskTranslator(benchmark.workflow)
140-
translator.translate(output_folder=pathlib.Path("./dask-wf/""))
141-
144+
.. note::
145+
146+
If you plan to run Nextflow on an HPC system using Slurm, we **strongly
147+
recommend** using the `HyperQueue <https://github.com/It4innovations/hyperqueue>`_
148+
executor. HyperQueue efficiently distributes workflow tasks across all allocated
149+
compute nodes, improving scalability and resource utilization.
142150

151+
The :class:`~wfcommons.wfbench.translator.nextflow.NextflowTranslator`
152+
class includes functionality to automatically generate a Slurm script
153+
template for running the workflow on HPC systems.
143154

144155
Pegasus
145156
+++++++
@@ -175,6 +186,31 @@ for running with Pegasus::
175186
the :code:`lock_files_folder` parameter when using
176187
:meth:`~wfcommons.wfbench.bench.WorkflowBenchmark.create_benchmark`.
177188

189+
PyCOMPSs
190+
++++++++
191+
192+
`PyCOMPSs <https://compss.bsc.es/>`_ is a programming model and runtime that
193+
enables the parallel execution of Python applications on distributed computing
194+
infrastructures. It allows developers to define tasks using simple Python
195+
decorators, automatically handling task scheduling, data dependencies, and
196+
resource management.. Below, we provide an example on how to generate workflow
197+
benchmark for running with PyCOMPSs::
198+
199+
import pathlib
200+
201+
from wfcommons import CyclesRecipe
202+
from wfcommons.wfbench import WorkflowBenchmark, PyCompssTranslator
203+
204+
# create a workflow benchmark object to generate specifications based on a recipe
205+
benchmark = WorkflowBenchmark(recipe=CyclesRecipe, num_tasks=200)
206+
207+
# generate a specification based on performance characteristics
208+
benchmark.create_benchmark(pathlib.Path("/tmp/"), cpu_work=500, data=1000, percent_cpu=0.8)
209+
210+
# generate a PyCOMPSs workflow
211+
translator = PyCompssTranslator(benchmark.workflow)
212+
translator.translate(output_folder=pathlib.Path("./pycompss-wf/"))
213+
178214
Swift/T
179215
+++++++
180216

docs/source/generating_workflows.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ synthetic workflow instances. The current list of available workflow recipes inc
2525
- :class:`~wfcommons.wfchef.recipes.epigenomics.recipe.EpigenomicsRecipe`: :code:`from wfcommons.wfchef.recipes import EpigenomicsRecipe`
2626
- :class:`~wfcommons.wfchef.recipes.genome.recipe.GenomeRecipe`: :code:`from wfcommons.wfchef.recipes import GenomeRecipe`
2727
- :class:`~wfcommons.wfchef.recipes.montage.recipe.MontageRecipe`: :code:`from wfcommons.wfchef.recipes import MontageRecipe`
28+
- :class:`~wfcommons.wfchef.recipes.rnaseq.recipe.RnaseqRecipe`: :code:`from wfcommons.wfchef.recipes import RnaseqRecipe`
2829
- :class:`~wfcommons.wfchef.recipes.seismology.recipe.SeismologyRecipe`: :code:`from wfcommons.wfchef.recipes import SeismologyRecipe`
2930
- :class:`~wfcommons.wfchef.recipes.soykb.recipe.SoykbRecipe`: :code:`from wfcommons.wfchef.recipes import SoykbRecipe`
3031
- :class:`~wfcommons.wfchef.recipes.srasearch.recipe.SrasearchRecipe`: :code:`from wfcommons.wfchef.recipes import SrasearchRecipe`

docs/source/images/wfcommons.png

2.01 MB
Loading

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ representative synthetic workflow instances, and generating realistic
1010
workflow benchmark specifications.
1111

1212
.. figure:: images/wfcommons.png
13-
:scale: 80 %
13+
:scale: 70 %
1414
:align: center
1515

1616
The WfCommons conceptual architecture.

0 commit comments

Comments
 (0)