Skip to content

Commit 23d5d84

Browse files
author
Michael Sippel
authored
Merge pull request #17 from ComputationalRadiationPhysics/doc-readmeUpdate
README: Update Motivation
2 parents 0a43772 + e5acca1 commit 23d5d84

File tree

1 file changed

+42
-22
lines changed

1 file changed

+42
-22
lines changed

README.md

Lines changed: 42 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,46 @@
55
[![License](https://img.shields.io/badge/license-MPL--2.0-blue.svg)](https://www.mozilla.org/en-US/MPL/2.0/)
66
<hr>
77

8-
RedGrapes is a C++14 framework for declaratively creating and scheduling task-graphs, based on high-level resource descriptions.
8+
RedGrapes is a C++14 framework for declaratively creating and scheduling task-graphs, based on a high-level resource description.
99

1010
### Motivation
11-
Writing scalable software using bare threads is hard and error-prone, especially if the workload depends on input parameters and asynchronous operations further complicating the program flow.
12-
For this reason the decoupling of processing stages from their execution is useful because it allows to dynamically schedule them. This is typically done with task-graphs, which are directed acyclic graphs (DAGs), whose vertices are some sort of computation and the edges denote the execution precedence order.
13-
This execution precedence results from the dataflow between the tasks, which gets
14-
complex pretty fast and may also be dynamic which makes it nearly impossible to
15-
manually write explicit task dependencies. So ideally these would be derived
16-
from some sort of high-level description of the dataflow. The goal of this
17-
project is to provide a task-based programming framework, where the task-graph
18-
gets created declaratively.
11+
12+
Modern compute nodes concurrently perform computational tasks over various memory resource pools, cores, and accelerator devices.
13+
In order to achieve high scalability in such a compute node, communication and computation tasks need to be overlapped extensively.
14+
15+
Up until now, software developers that took up to this challenge had to juggle data and in-node execution dependencies manually, which is a tedious and error-prone process.
16+
Real-world workloads that depend on states at runtime and asynchronous communication models complicate the program flow even further.
17+
18+
For this reason, one should decouple aforementioned computational tasks from their execution model altogether.
19+
A typical approach involves task-graphs, which are directed acyclic graphs (DAGs), whose vertices are some sort of computation (or communication) and the edges denote the execution precedence order.
20+
The execution precedence arises from the order in which those tasks were declared by the programmer but also have to take into account the data dependencies between the tasks.
21+
22+
Consequently, **RedGrapes** provides you with a light-weight, application-level, task-based C++ programming framework.
23+
Herein, a task-graph is generated declaratively from access to resources and order of your code, just as in serial programming.
1924

2025
### Concept
21-
The Program is divided into *tasks*. Those are the smallest unit the scheduler operates with.
22-
Because C++ is mainly a sequential language, the dataflow description is based on *resources* which represent some state shared between tasks. Each task has an annotation how the resources are accessed. Which *access modes* are possible is dependent on the type of the resource. A simple example would be read/write, but also array accesses or composite types could be used. A resource can be associated with a specific *acces mode* forming a *resource access*, of which two can then be used to check if they are conflicting. So each task carries in its *task-properties* a list of
23-
resource-accesses.
24-
If two tasks have conflicting resource-accesses, the first created task is executed
25-
first. So the order of the tasks remains virtually.
26-
When tasks are created, their resource-access-list is compared against the previous
27-
enqueued tasks and corresponding dependencies are created in the task-graph.
28-
The resulting task-graph can then be easily scheduled across parallel threads.
26+
27+
The program shall be divided into **tasks**.
28+
A task is can be a sub-step in a computational solver, the exchange of data between two memory resource pools, or anything else.
29+
Tasks are the smallest unit the RedGrapes scheduler operates with.
30+
Data dependencies are described via **resources**, which are accessed and potentially manipulated by tasks.
31+
32+
Each task has an annotation how the resources are accessed.
33+
Therein allowed **access modes** depend on the type of the resource.
34+
A simple example would be read/write, but also more complex operations are possible, e.g. on arrays or just a sub view.
35+
A *resource* can be associated with a specific *access mode* forming a **resource access**. These instances of a *resource access* can then be pairwise tested wheter they are conflicting and thereby creating a data-dependency (e.g. two writes to the same resource).
36+
So each task carries a list of these resource-accesses in its so-called **task-properties**.
37+
If two tasks have conflicting resource-accesses, the first created task is executed first.
38+
This is exactly the behaviour that one would also achieve when programming serially, without hints given via resources.
39+
40+
When tasks are created, their resource-access list is compared against the previous enqueued tasks and corresponding dependencies are created in the task-graph.
41+
The resulting task-graph is read by a scheduling algorithm that executes individual tasks, e.g. across parallel threads.
2942

3043
### Example
44+
3145
See [examples](examples) for examples covering more features.
3246

33-
```c++
47+
```cpp
3448
#include <cassert>
3549
#include <redGrapes/manager.hpp>
3650
#include <redGrapes/resource/ioresource.hpp>
@@ -68,16 +82,20 @@ int main()
6882
```
6983

7084
## Documentation
71-
RedGrapes is documented using in-code doxygen comments and reStructured-Text-files (in [docs/source](docs/source)), built with Sphinx.
85+
86+
RedGrapes is documented using in-code doxygen comments and reStructured-text files (in [docs/source](docs/source)), build with Sphinx.
7287

7388
* [Getting Started](docs/source/tutorial/index.rst)
7489
* [Components](docs/source/components.rst)
7590

7691
## License
92+
7793
This Project is free software, licensed under the [Mozilla MPL 2.0 license](LICENSE).
7894

79-
## Authors
80-
RedGrapes is based on the high-level ideas described in a [whitepaper by Huebl, Widera, Matthes](docs/2017_02_ResourceManagerDraft.pdf), members of the [Computational Radiation Physics Group](https://hzdr.de/crp) at [HZDR](https://www.hzdr.de/).
95+
## Author Contributions
96+
97+
RedGrapes is developed by members of the [Computational Radiation Physics Group](https://hzdr.de/crp) at [HZDR](https://www.hzdr.de/).
98+
Its conceptual design is based on a [whitepaper by A. Huebl, R. Widera, and M. Matthes (2017)](docs/2017_02_ResourceManagerDraft.pdf).
8199

82100
* [Michael Sippel](https://github.com/michaelsippel): library design & implementation
83101
* [Dr. Sergei Bastrakov](https://github.com/sbastrakov): supervision
@@ -86,7 +104,9 @@ RedGrapes is based on the high-level ideas described in a [whitepaper by Huebl,
86104
* [Alexander Matthes](https://github.com/theZiz): whitepaper
87105

88106
### Dependencies
89-
Besides the C++14 standard, RedGrapes also depends on the following additional libraries:
107+
108+
RedGrapes requires a compiler supporting the C++14 standard.
109+
RedGrapes further depends on the following libraries:
90110

91111
* [Boost Graph](https://www.boost.org/doc/libs/1_71_0/libs/graph/doc/)
92112
* [optional for C++14](https://github.com/akrzemi1/Optional) by [Andrzej Krzemienski](https://github.com/akrzemi1)

0 commit comments

Comments
 (0)