Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve verdi work list and verdi work report #888

Merged

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Nov 2, 2017

Fixes #318

Improvements to verdi work list and verdi work report

Recently another terminal state was added for WorkCalculations to
be able to support aborting running WorkCalculations. With that
the state picture of a WorkCalculation also became a little bit
better defined. A WorkCalculation has three terminal states:

  • FINISHED
  • FAILED
  • ABORTED

These states are set by the corresponding attribute to the node
and are mutually exclusive. If the WorkCalculation is in neither
one of these three terminal states, it can be considered by
inference to be RUNNING.

A node can also be sealed or unsealed. It can only be sealed until
after it has reached one of the three terminal states. If a node
is sealed but is not in a terminal state, the state is inconsistent
and so we print Unknown. This is to prevent from WorkCalculations
during which the code excepted will be incorrectly labeled
as RUNNING, which would confuse the user.

Unfortunately, the current WorkCalculation nodes do not have a well
defined canonical method of checking their 'state' as for example is
the case with JobCalculations. What it does have are several attribute
keys, FAILED, SEALED and FINISHED that can be set. However, there is
no guarantee for example that if neither FAILED nor FINISHED are not
set, that the calculation is still 'running'.

As a temporary convention we only disply calculations who are set to
be SEALED. The -a/--all-states flag, analogous to the verdi calculation list
command, can be toggled to display all work calculations.
The verdi work report command retrieves the log messages attached
to a work calculation node and all the call descendents. For each
level of descendent, the ouput is indented when printed. The new
flag allows to limit the maximum depth to traverse down the
descendents chain.
Recently another terminal state was added for WorkCalculations to
be able to support aborting running WorkCalculations. With that
the state picture of a WorkCalculation also became a little bit
better defined. A WorkCalculation has three terminal states:

 * FINISHED
 * FAILED
 * ABORTED

These states are set by the corresponding attribute to the node
and are mutually exclusive. If the WorkCalculation is in neither
one of these three terminal states, it can be considered by
inference to be RUNNING.

A node can also be sealed or unsealed. It can only be sealed until
after it has reached one of the three terminal states. If a node
is sealed but is not in a terminal state, the state is inconsistent
and so we print Unknown. This is to prevent from WorkCalculations
during which the code excepted will be incorrectly labeled
as RUNNING, which would confuse the user.
@sphuber sphuber merged commit 205fffa into aiidateam:release_v0.10.0rc3 Nov 2, 2017
@sphuber sphuber deleted the fix_318_verdi_work_list branch November 2, 2017 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants