hpcflow.sdk.submission.run_file_resolver.RunMetaDataFileResolver#

class hpcflow.sdk.submission.run_file_resolver.RunMetaDataFileResolver(jobscripts)#

Bases: object

Class to resolve how to assign a submission’s runs to files that can be safely written to, given the concurrency of the submission’s jobscripts.

Methods

build_execution_unit_graph

Build the element-expanded jobscript graph, where nodes are represented by a JobscriptUnit, and edges by the sets of units: successors and predecessors.

get_jobscript_units

get_metadata_file_mapping

get_reachability

For each execution unit, which other execution units must occur downstream of it?

get_unit_run_IDs

Retrieve the run IDs associated with a JobscriptUnit.

maximum_matching

What's the maximum number of execution units we can link together into reusable-file chains?

resolve

topological_sort

Sort nodes such that all dependencies precede their dependents.

Attributes

Parameters:

jobscripts (list[Jobscript])

build_execution_unit_graph()#

Build the element-expanded jobscript graph, where nodes are represented by a JobscriptUnit, and edges by the sets of units: successors and predecessors.

static get_jobscript_units(js)#
Parameters:

js (Jobscript)

get_metadata_file_mapping()#
static get_reachability(successors, topo_order)#

For each execution unit, which other execution units must occur downstream of it?

get_unit_run_IDs(unit)#

Retrieve the run IDs associated with a JobscriptUnit.

Parameters:

unit (JobscriptUnit)

static maximum_matching(reachable)#

What’s the maximum number of execution units we can link together into reusable-file chains?

property num_files: int#
resolve()#
static topological_sort(successors, predecessors)#

Sort nodes such that all dependencies precede their dependents.