This module allows running CREDO jobs using various approaches - e.g. via MPI locally, via PBS scripts in a queueing system, or via grid submission.
A simple class for recording meta info about a job, such as walltime, memory usage, etc.
Simulated time the model ran for.
Returns a useful string about the platform, for printing.
Writes information about this class into an existing, open XML doc node
Class used for running ModelRun instances. This is an abstract base class, user code will need to choose a concrete implementation. Is designed to allow both serial, and parallel non-blocking job submission and reporting.
Determines that for a given job runner, whether suites should be run in non-blocking mode by default, or
List of PerformanceProfiler that will be applied to report on any ModelRuns that this JobRunner is used for.
Profiler that will be used to provide “default” results in the JobMetaInfo.
Attach relevant performance information to the jobMI (JobMetaInfo), such as time use, memory use, etc
Attach provenance info relevant to the platform used to run the job to the JobMetaInfo object.
Block on a modelRun until the result is completed ... requires appropriate info to be passed in the jobMetaInfo object.
Blocks on each ModelRun in a Suite, given a list of JobMetaInfos for each run.
Run the specified modelRun, and return the ModelResult.
Parameters: |
|
---|---|
Returns: | A ModelResult recording the results of the run. |
Run each ModelRun in the suite - with optional extra cmd line opts. Will also write XML records of each ModelRun and ModelResult in the suite.
Input arguments same as for runModel(), except those listed below:
Parameters: |
|
---|---|
Returns: | a reference to the resultsList containing all the ModelResults generated. |
Does any necessary setup checks to run models.
By default, does nothing - sub-classes need to override.
Submit the job to be run. TODO: comment on parameters ... Returns: a jobMetaInfo (that can later be attached ... )
Submits each modelRun in a suite to be run, and returns a list of all jobMetaInfos for the submitted jobs.
Bases: exceptions.Exception
Base class of ModelRunError exception hierarchy.
Bases: credo.jobrunner.api.ModelRunError
An Exception for when Models fail to run due to being unable to launch the run process in some way.
command used to launch the job.
Bases: credo.jobrunner.api.ModelRunError
An Exception for when Models fail to run.
Bases: credo.jobrunner.api.ModelRunRegularError
An Exception for when Models fail to run due to timing out.
maximum time to run that the model exceeded, in seconds.
Class to use to attach to JobRunner instances, which will then profile performance of each ModelRun ran by given JobRunner.
This is an abstract base class, user code will have to select a concrete instantiation.
Do any necessary setup functions.
Bases: credo.jobrunner.api.JobMetaInfo
Bases: credo.jobrunner.api.JobRunner
Save the given runCommand to a file in output directory.
See credo.jobrunner.api.JobRunner.submit().
Bases: credo.jobrunner.api.JobMetaInfo
Bases: credo.jobrunner.api.JobRunner
A JobRunner to submit CREDO jobs via creating PBS script files, and submitting these via command-line utils like qsub.
Note
this module is currently still in development, and needs tuning for different HPC machines.
See credo.jobrunner.api.JobRunner.submit().
Bases: credo.jobrunner.api.PerformanceProfiler
A performance profiler that uses the Unix ‘time’ command.
Format elements to be used in determining what gets profiled.
Return the format string to use, given a list of format elements, using standard separators, so it can be parsed later on.
Parameters: | fmtEls – a list of Tuples, of form (nameStr, fmtItem) - where nameStr is the name of the entry to return, and fmtItem is the ‘resource specifier’ character as specified in ‘man time’. e.g. [(“runTime”, “E”)] - where “E” is the specifier for Elapsed time |
---|
Get a dictionary of results, contained in the given resFName, formatted in the standard way as done by getFmtString.
Get the prefix for a run that will apply the time command.
Do “man time” for more info.
Parameters: |
|
---|