SimGrid: Trace-driven simulations

SimGrid 3.10 Versatile Simulation of Distributed Systems

- Home page
- Online documentation
- Dev's Corner

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
Trace-driven simulations
MSG

This section describes the functions allowing to build trace-driven simulations. More...

## Functions
msg_error_t | MSG_action_trace_run (char *path)
| A trace loader.

## Detailed Description

This section describes the functions allowing to build trace-driven simulations.

This is very handy when you want to test an algorithm or protocol that does nothing unless it receives some events from outside. For example, a P2P protocol reacts to requests from the user, but does nothing if there is no such event.

In such situations, SimGrid allows to write your protocol in your C file, and the events to react to in a separate text file. Declare a function handling each of the events that you want to accept in your trace files, register them using xbt_replay_action_register in your main, and then use MSG_action_trace_run to launch the simulation. You can either have one trace file containing all your events, or a file per simulated process.

Check the examples in examples/msg/actions/actions.c for details.

## Function Documentation

msg_error_t MSG_action_trace_run | ( | char * | path | ) |

A trace loader.

If path!=NULL, load a trace file containing actions, and execute them. Else, assume that each process gets the path in its deployment file