Smart way to export all nodes linked to a workchain

Hi everyone

I have a big workchain that runs some other workchains. I have been running it on a different workstation and now I want to have those results in my own, inlcuding all inputs, outputs and everything in between. Basically I want to have everything in the provenance graph of the workchain I built.

Following the section about how to share data How to share data — AiiDA 2.5.1 documentation I guess I can simply travel the provenance graph of my workchain and add those nodes to a group in order to export them.

I have two questions about this:

  1. Are the links between nodes conserved when they are exported?

  2. Is there a quicker and smarter way of adding all the nodes to a group as required? I know I can travel through the provenance graph, but I would not be surprised if there is something already implemented or a smarter way to achieve what I want.

Thanks in advance

Jaime

If you simply do verdi archive create -N WORKCHAIN_PK and pass the pk of the workchain, the entire call stack of the workchain will be included in the export archive. AiiDA will always automatically export a “consistent” and “complete” part of the provenance graph following “traversal rules”. That is to say, even if you pass an output of a CalcJobNode as a only argument to verdi archive create -N, by default it will also include the CalcJobNode that created it and all its inputs.

1 Like

I’ll just drop the relevant section in the documentation here:

https://aiida.readthedocs.io/projects/aiida-core/en/latest/topics/provenance/consistency.html#consistency

Especially the examples at the bottom may be illustrative. Note that these “traversal rules” are just defaults that can be overridden, see verdi archive create --help.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.