Welcome to AiiDA WorkGraph’s documentation!
Provides the third workflow component: WorkGraph
, to design flexible node-based workflows using AiiDA.
In AiiDA, there are two workflow components: workfunction and WorkChain. Workfunction is easy to implement but it does not support automatic checkpointing, which is important for long-running calculations. Workchain supports automatic checkpointing but it is difficult to implement and also not as flexible as the workfunction. AiiDA-WorkGraph provides the third component: WorkGraph. It is easy to implement and supports automatic checkpointing. It is also flexible and can be used to design complex workflows.
Here is a detailed comparison between the WorkGraph
with two AiiDA built-in workflow components. Check this blog post for more details.
Aspect |
WorkFunction |
WorkChain |
WorkGraph |
---|---|---|---|
Use Case |
Short-running jobs |
Long-running jobs |
Long-running jobs |
Checkpointing |
|
Yes |
Yes |
Execution order |
|
|
Directed Acyclic Graph |
Non-blocking |
|
Yes |
Yes |
Implementation |
Easy |
|
Easy |
Dynamic |
|
|
Yes |
Ready to Use |
Yes |
|
Yes |
Subprocesses Handling |
|
Launches & waits |
Launches & waits |
Flow Control |
All |
if, while |
if, while, match |
Termination |
|
ExitCode |
ExitCode |
Data Passing |
Direct passing |
Context |
Link & Context |
Output Recording |
Limited support |
Out & validates |
Out |
Port Exposing |
Limited support |
Manual & automatic |
Manual |