Skip to main content

Graph decyclify algorithm implementation as in Sandnes & Sinnen paper (2004) in Python

Project description

decyclify

CI codecov

Graph decyclify algorithm implementation as in Sandnes & Sinnen paper (2004) in Python.

"A new strategy for multiprocessor scheduling of cyclic task graphs", link to article in Research Gate.

See open issues for current status of the project.

Graph with cycles

Graph without cycles

decyclify algorithm

The algorithm uses two matrices, D and C.

D is the intraiteration dependencies matrix. It represents the dependencies in the graph within a cycle.

Intra-iteration matrix

C is the interiteration dependencies matrix. It represents the dependencies in the graph between cycles.

Inter-iteration matrix

Node Iterators

This is not part of the paper. Here we show how the algorithm can be used to first remove the cycles. Next, we use the matrices to decide how to traverse the graph.

Graph unrolling

The first iterator, the CycleIterator simply goes through all the tasks in the cycles and executes them in order. The decyclify function is used to avoid repeating a node due to a cycle.

The second iterator available is the TasksIterator. With this, for each cycle it returns the next tasks available, as well as any tasks in the next cycles that can be returned.

A task is considered ready to be returned when its sibling in the previous cycle has been executed, and after its inter-cycle dependency (if any) has been satisfied as well.

It should be possible to use these iterators, or create new ones, and apply it to tools such as workflow managers that support only DAG scheduling, to schedule an infinite graph, via graph-unrolling. The next cycle is simply an integer counter incremented, but could be an ISO8601 date-time function.

NOTE: this part of the project was a summer holidays project, and is in need of documentation, more tests, code review, etc. Feel free to submit pull requests.

Changelog

0.1 (2020-12-29)

  • Added a couple of node iterators. With these, it is possible to iterate the graph per cycle, or per task. This latter enables a task to start as soon as its sibling in a previous cycle has been executed, as long as there are no inter-cycle dependencies.
  • #3 Implemented the algorithm to unroll a graph using the Decyclify algorithm
  • #10 Create intraiteration matrix (D) and interiteration matrix (C)
  • #2 Graph input
  • #1 Build and packaging

License

Licensed under the Apache License. See LICENSE for more.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

decyclify-0.1.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

decyclify-0.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file decyclify-0.1.tar.gz.

File metadata

  • Download URL: decyclify-0.1.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.3

File hashes

Hashes for decyclify-0.1.tar.gz
Algorithm Hash digest
SHA256 7d270c57e3c3f3ad4ff1547876955f6853799fb8b4e8fae74de8155b7b115d18
MD5 631f03c55831422773763cee971a1632
BLAKE2b-256 f60b901598131c4d8dd30082b8c539cfff1f3a8791ba8d154201bb572720f379

See more details on using hashes here.

File details

Details for the file decyclify-0.1-py3-none-any.whl.

File metadata

  • Download URL: decyclify-0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.3

File hashes

Hashes for decyclify-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d2150a3141e7c0a646c66c0c140a8d21897d830df3c47ae5ab71cd0888681763
MD5 e4517791fc676504fa6e65746f6a69a0
BLAKE2b-256 fc210a8c88c552d1c7372de840889f93ccbe319010f0442b4c9759a09574e2a3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page