wrench::SimulationOutput Class Reference

A class that contains post-mortem simulation-generated data. More...

#include <SimulationOutput.h>

Public Member Functions

void dumpWorkflowExecutionJSON (Workflow *workflow, std::string file_path, bool generate_host_utilization_layout=false)
 Writes WorkflowTask execution history for each task to a file, formatted as a JSON array. The JSON array has the following format: More...
 
void dumpWorkflowGraphJSON (wrench::Workflow *workflow, std::string file_path)
 Writes a JSON graph representation of the Workflow to a file. A node is added for each WorkflowTask and WorkflowFile. A WorkflowTask will have the type "task" and a WorkflowFile will have the type "file". A directed link is added for each dependency in the Workflow. More...
 
template<class T >
std::vector
< SimulationTimestamp< T > * > 
getTrace ()
 Retrieve a copy of a simulation output trace once the simulation has completed. More...
 

Detailed Description

A class that contains post-mortem simulation-generated data.

Member Function Documentation

void wrench::SimulationOutput::dumpWorkflowExecutionJSON ( Workflow workflow,
std::string  file_path,
bool  generate_host_utilization_layout = false 
)

Writes WorkflowTask execution history for each task to a file, formatted as a JSON array. The JSON array has the following format:

   [
     {
         task_id: <string>,
         execution_host: {
             hostname: <string>,
             flop_rate: <double>,
             memory: <double>,
             cores: <unsigned_long>
         },
         num_cores_allocated: <unsigned_long>,
         vertical_position: <unsigned_long>,
         whole_task: { start: <double>, end: <double> },
         read:       { start: <double>, end: <double> },
         compute:    { start: <double>, end: <double> },
         write:      { start: <double>, end: <double> },
         failed: <double>,
         terminated: <double>
     }, . . .
   ]

If generate_host_utilization_layout is set to true, a recursive function searches for a possible host utilization layout where tasks are assumed to use contiguous numbers of cores on their execution hosts. Note that each ComputeService does not enforce this, and such a layout may not exist for some workflow executions. In this situation, the function will go through the entire search space until all possible layouts are evaluated. For a large Workflow, this may take a very long time.

If a host utilization layout is able to be generated, the 'vertical_position' values will be set for each task run, and the task can be plotted as a rectangle on a graph where the y-axis denotes the number of cores - 1, and the x-axis denotes the workflow execution timeline. The vertical_position specifies the bottom of the rectangle. num_cores_allocated specifies the height of the rectangle.

Parameters
workflowa pointer to the Workflow
file_paththe path to write the file
generate_host_utilization_layoutboolean specifying whether or not you would like a possible host utilization layout to be generated
Exceptions
std::invalid_argument
void wrench::SimulationOutput::dumpWorkflowGraphJSON ( wrench::Workflow workflow,
std::string  file_path 
)

Writes a JSON graph representation of the Workflow to a file. A node is added for each WorkflowTask and WorkflowFile. A WorkflowTask will have the type "task" and a WorkflowFile will have the type "file". A directed link is added for each dependency in the Workflow.

{
     nodes: [
         {
             type: <"task">,
             id: <string>,
             flops: <double>,
             min_cores: <unsigned_long>,
             max_cores: <unsigned_long>,
             parallel_efficiency: <double>,
             memory: <double>,
         },
         {
             type: <"file">,
             id: <string>,
             size: <double>
         }, . . .
     ],
     links: [
         {
             source: <string>,
             target: <string>
         }, . . .
     ]
 }
 
Parameters
workflowa pointer to the workflow
file_paththe path to write the file
Exceptions
std::invalid_argument
template<class T >
std::vector<SimulationTimestamp<T> *> wrench::SimulationOutput::getTrace ( )
inline

Retrieve a copy of a simulation output trace once the simulation has completed.

Template Parameters
aparticular SimulationTimestampXXXX class (defined in SimulationTimestampTypes.h)
Returns
a vector of pointers to SimulationTimestampXXXX instances

The documentation for this class was generated from the following files:
  • /home/wrench/wrench/include/wrench/simulation/SimulationOutput.h
  • /home/wrench/wrench/src/wrench/simulation/SimulationOutput.cpp