Package schrodinger :: Package application :: Package desmond :: Module extend_fep :: Class RestartWorkflow
[hide private]
[frames] | no frames]

Class RestartWorkflow

object --+    
         |    
  Workflow --+
             |
            RestartWorkflow

This class will create a workflow for running restart jobs

Instance Methods [hide private]
 
__init__(self, work_list, prep_only=False, force=False)
x.__init__(...) initializes x; see help(type(x)) for signature
 
inspectCheckpointFile(self)
This will set the initialized flag of a workunit.
bool
stageOne(self)
Remove units that are properly initialized since they do not need to be restarted.
 
stageTwo(self)
Examine granularity of restart, for now we just restart the leg that has failed.
 
prepareMae(self, wu)
First check if it is in stage 3 dir if not try to copy it from stage 2 dir If checkpoint is completely missing we have to try and start from stage 2 this happens if the file system chokes
bool
createCleanMsj(self, wu)
This is a bit complicated due to adding the ability to extend simulations multiple times.
 
processWorkList(self, remote_pert_dir)

Inherited from Workflow: crunch, initPrepDir, multisimLogPresent, prepForRemoteRun, preparePerturbDir, stageThree

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, work_list, prep_only=False, force=False)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • work_list - List containg Workunit objects to be sent to jobDJ
  • prep_only - This option can be used to prepare the launch file only
  • force - If set this will ignore the fact that a log is not present in the cwd and launch the job
Overrides: object.__init__

inspectCheckpointFile(self)

 

This will set the initialized flag of a workunit. If it does not have a checkpoint_fn it will be initialized to False. If the checkpoint file indicates that a stage has failed the initialized falg gets toggled.

stageOne(self)

 

Remove units that are properly initialized since they do not need to be restarted. Return True if we have units to work on so we are gaurenteed to have at least one valid work unit to process if stageOne passes. @return : We return True if we successfully prepared a job, False otherwise

Returns: bool

stageTwo(self)

 

Examine granularity of restart, for now we just restart the leg that has failed. In the future the else branch can handle more fine grain restart.

prepareMae(self, wu)

 

First check if it is in stage 3 dir if not try to copy it from stage 2 dir If checkpoint is completely missing we have to try and start from stage 2 this happens if the file system chokes

Parameters:
  • wu (Workunit) - a workunit for which we create a new msj

createCleanMsj(self, wu)

 

This is a bit complicated due to adding the ability to extend simulations multiple times. If we do not find the _extention.msj then we will use the original msj otherwise we will use the extension msj.

Parameters:
  • wu (Workunit) - a workunit for which we create a new msj
Returns: bool
True upon successful generation of the msj