# recording_manager.py¶

RecordingManager class definition.

class openmdao.recorders.recording_manager.RecordingManager[source]

Bases: object

Object that routes function calls to all attached recorders.

Attributes
_recorderslist of CaseRecorder

All of the recorders attached to the current object.

rankint

Rank of the iteration coordinate.

_has_serial_recordersbool

True if any of the recorders managed by this object are serial recorders.

__getitem__(index)[source]

Get a particular recorder in the manager.

Parameters
indexint

an index into _recorders.

Returns
recorderCaseRecorder

a recorder from _recorders

__init__()[source]

init.

__iter__()[source]

Iterate.

Returns
iterCaseRecorder

a recorder from _recorders.

append(recorder)[source]

Parameters
recorderCaseRecorder

Recorder instance to be added to the manager.

has_recorders()[source]

Are there any recorders managed by this RecordingManager.

Returns
True/False: bool

True if RecordingManager is managing at least one recorder.

record_derivatives(recording_requester, data, metadata)[source]

Call record_derivatives on all recorders.

Parameters
recording_requesterobject

The object that needs an iteration of itself recorded.

Dictionary containing derivatives keyed by ‘of,wrt’ to be recorded.

record_iteration(recording_requester, data, metadata)[source]

Call record_iteration on all recorders.

Parameters
recording_requesterobject

The object that needs an iteration of itself recorded.

Dictionary containing desvars, objectives, constraints, responses, and System vars.

record_metadata(recording_requester)[source]

Parameters
recording_requesterobject

The object that needs its metadata recorded.

shutdown()[source]

Shut down and remove all recorders.

startup(recording_requester)[source]

Run startup on each recorder in the manager.

Parameters
recording_requesterobject

The object that needs an iteration of itself recorded.

openmdao.recorders.recording_manager.record_model_options(problem, run_number)[source]

Record the options for all systems and solvers in the model.

Parameters
problemProblem

The problem for which all its system and solver options are to be recorded.

run_numberint or None

Number indicating which run the metadata is associated with. Zero or None for the first run, 1 for the second, etc.

openmdao.recorders.recording_manager.record_system_options(problem)[source]

Record the system options for all systems in the model.

Parameters
problemProblem

The problem for which all its systems’ options are to be recorded.

openmdao.recorders.recording_manager.record_viewer_data(problem)[source]

Record model viewer data for all recorders that have that option enabled.

We don’t want to collect the viewer data if it’s not needed though, so first we’ll find all recorders that need the data (if any) and then record it for those recorders.

Parameters
problemProblem

The problem for which model viewer data is to be recorded.