SCM-NV / qmflows

This library tackles the construction and efficient execution of computational chemistry workflows
Other
44 stars 9 forks source link

Status Change #56

Closed sgu800 closed 7 years ago

sgu800 commented 7 years ago

Dear All,

I am querying for status to be successful (status == successful) in my workflow to print results. But I found that for some reason instead of status == successful, it is writing status ==copied after workflow execution and it obviously not print the results for me.

Many thanks in advance, Satesh

jhidding commented 7 years ago

Hi Satesh, I need a bit more detail here.

felipeZ commented 7 years ago

We are defining the Result class like:

class Result:
    """
    Class containing the result associated with a quantum chemistry simulation.
    """
    def __init__(self, settings, molecule, job_name, plams_dir=None,
                 work_dir=None, properties=None, status='done'):

The last attribute called status depends on the Plams status. This status could be: successful, crash, copied or failed. When a Workflow finishes successfully all the job.status are successful. But when I job is retrieve by noodles the new status is changed to copied by Plams.

ridderl commented 7 years ago

That's weird. If noodles retrieves the result, there should not be a call to plams, right? So how come the status is being changed?

felipeZ commented 7 years ago

When you retrieve the property using the rkf or t21 file from the cache.json the method _prepare from plams.Job class is somehow invoked. This method changes the status.

ridderl commented 7 years ago

It is still weird, because as I understand it, the plams.job status is not read anymore after getting the property. It is about the qmworks.Result.status which is now properly serialized, therefore read from the cache, and not from plams.

Satesh, where exactly were you querying the status from?

felipeZ commented 7 years ago

I was doing it with Satesh and we are printing the results inside the getattr method for the Result class in qmworks.

ridderl commented 7 years ago

Clear. I'm still curious how this happens :-)

jhidding commented 7 years ago

I'm still clueless what happens here. The more bugs we get like this, I get more frustrated, because it has nothing to do with the project, but with stupid design errors in plams.