Skip to content

Commit

Permalink
#156: some minor edits to WRENCH 102 contents
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfsilva committed Apr 24, 2020
1 parent 5ed6123 commit b59179a
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 102 deletions.
24 changes: 12 additions & 12 deletions doc/wrench_101.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ header file:

The state of a WRENCH simulation is defined by the `wrench::Simulation`
class. A simulator must create an instance of this class and initialize it
with the `wrench::Simulation::init()` method. The bare-metal-chain
with the `wrench::Simulation::init()` member function. The bare-metal-chain
simulator does this as follows:

~~~~~~~~~~~~~{.cpp}
wrench::Simulation simulation;
simulation.init(&argc, argv);
~~~~~~~~~~~~~

Note that this method takes in the command-line arguments passed to the main
Note that this member function takes in the command-line arguments passed to the main
function of the simulator. This is so that it can parse WRENCH-specific and
[SimGrid-specific](https://simgrid.org/doc/latest/Configuring_Simgrid.html)
command-line arguments. (Recall that WRENCH is based on
Expand All @@ -82,7 +82,7 @@ an extensive SimGrid help message.
## Step 2: Instantiate a simulated platform # {#wrench-101-simulator-1000ft-step-2}

This is done with the `wrench::Simulation::instantiatePlatform()`
method which takes as argument a [SimGrid virtual platform description
member function which takes as argument a [SimGrid virtual platform description
file](https://simgrid.org/doc/latest/platform.html). Any SimGrid
simulation, and thus any WRENCH simulation, must be provided with the
description of the simulated hardware platform (compute hosts, clusters
Expand Down Expand Up @@ -142,7 +142,7 @@ simulation.instantiatePlatform(argv[2]);

While the previous step defines the hardware platform, this step defines
what software services run on that hardware.
The `wrench::Simulation::add()` method is used
The `wrench::Simulation::add()` member function is used
to add services to the simulation. Each class of service is created with a
particular constructor, which also specifies host(s) on which the service
is to be started. Typical kinds of services include compute services,
Expand Down Expand Up @@ -205,7 +205,7 @@ are located (and is often required - see Step #4 hereafter).

Every WRENCH simulator simulates the execution of a workflow, and thus
must create an instance of the `wrench::Workflow` class. This class has
methods to manually create tasks and files and add them to the workflow.
member functions to manually create tasks and files and add them to the workflow.
For instance, the bare-metal-chain simulator does this as follows:

~~~~~~~~~~~~~{.cpp}
Expand Down Expand Up @@ -235,7 +235,7 @@ The above creates a "chain" workflow (hence the name of the simulator), in which
output from one task is input to the next task. The number of tasks is obtained
from a command-line argument.

The `wrench::Workflow` class also provides methods to import workflows from
The `wrench::Workflow` class also provides member functions to import workflows from
workflow description files in standard
[JSON format](https://github.com/workflowhub/workflow-schema) and
[DAX format](http://workflowarchive.org).
Expand Down Expand Up @@ -295,10 +295,10 @@ This call checks the simulation setup, and blocks until the WMS terminates.
## Step 7: Process simulation output # {#wrench-101-simulator-1000ft-step-7}

Once `wrench::Simulation::launch()` has returned, simulation output can be
processed programmatically. The `wrench::Simulation::getOutput()` method
processed programmatically. The `wrench::Simulation::getOutput()` member function
returns an instance of class `wrench::SimulationOutput`.
Note that there are methods to configure the type and amount of output generated
(see the `wrench::SimulationOutput::enable*Timestamps()` methods).
Note that there are member functions to configure the type and amount of output generated
(see the `wrench::SimulationOutput::enable*Timestamps()` member functions).
The bare-metal-chain simulator does minimal output processing as:

~~~~~~~~~~~~~{.cpp}
Expand All @@ -308,7 +308,7 @@ for (auto const &item : trace) {
~~~~~~~~~~~~~

Specifically, class `wrench::SimulationOutput` has a templated
`wrench::SimulationOutput::getTrace()` method to retrieve traces for
`wrench::SimulationOutput::getTrace()` member function to retrieve traces for
various information types. The first line of code above returns a
`std::vector` of time-stamped task completion events.
The second line of code iterates through this vector and prints task
Expand All @@ -323,7 +323,7 @@ which provides accounting for computing time and dissipated energy in
the simulated platform. SimGrid's energy plugin requires host `pstate`
definitions (levels of performance, CPU frequency) in the
[XML platform description file](https://simgrid.org/doc/latest/platform.html).
The `wrench::Simulation::getEnergyConsumed()` method returns energy consumed
The `wrench::Simulation::getEnergyConsumed()` member function returns energy consumed
by all hosts in the platform. **Important:** The energy plugin is NOT
enabled by default in WRENCH simulations. To enable it, pass the
`--activate-energy` command line option to the simulator. See
Expand All @@ -333,7 +333,7 @@ description file that defines host power consumption profiles).

Another option altogether is to dump all simulation output to a JSON file.
This is done with the `wrench::SimulationOutput::dump*JSON()`
methods. See the documentation of each method to see the structure of the
member functions. See the documentation of each member function to see the structure of the
JSON output, in case you want to parse/process the JSON yourself.
Alternately, you can run the installed `wrench-dashboard` tool, which
provides interactive visualization/inspection of simulation output.
Expand Down
Loading

0 comments on commit b59179a

Please sign in to comment.