|
SimGrid
3.14.159
Versatile Simulation of Distributed Systems
|
Functions to create the environment and launch the simulation.
This section describes the functions for initializing SimDag, launching the simulation and exiting SimDag.
Functions | |
| void | SD_init (int *argc, char **argv) |
| Initializes SD internal data. More... | |
| void | SD_config (const char *key, const char *value) |
| set a configuration variable More... | |
| void | SD_create_environment (const char *platform_file) |
| Creates the environment. More... | |
| xbt_dynar_t | SD_simulate (double how_long) |
| Launches the simulation. More... | |
| double | SD_get_clock () |
| Returns the current clock, in seconds. More... | |
| void | SD_exit () |
| Destroys all SD internal data This function should be called when the simulation is over. More... | |
| xbt_dynar_t | SD_daxload (const char *filename) |
| loads a DAX file describing a DAG More... | |
| xbt_dynar_t | SD_dotload (const char *filename) |
| xbt_dynar_t | SD_dotload_with_sched (const char *filename) |
| xbt_dynar_t | SD_PTG_dotload (const char *filename) |
| void SD_init | ( | int * | argc, |
| char ** | argv | ||
| ) |
Initializes SD internal data.
This function must be called before any other SD function. Then you should call SD_create_environment().
| argc | argument number |
| argv | argument list |
| void SD_config | ( | const char * | key, |
| const char * | value | ||
| ) |
set a configuration variable
Do –help on any simgrid binary to see the list of currently existing configuration variables, and see Section Configure SimGrid.
Example: SD_config("host/model","default");
| void SD_create_environment | ( | const char * | platform_file | ) |
Creates the environment.
The environment (i.e. the hosts and the links) is created with the data stored in the given XML platform file.
| platform_file | name of an XML file describing the environment to create |
The XML file follows this DTD:
\include simgrid.dtd
Here is a small example of such a platform:
\include small_platform.xml
| xbt_dynar_t SD_simulate | ( | double | how_long | ) |
Launches the simulation.
The function will execute the SD_RUNNABLE runnable tasks. If how_long is positive, then the simulation will be stopped either when time reaches how_long or when a watch point is reached. A non-positive value for how_long means no time limit, in which case the simulation will be stopped either when a watch point is reached or when no more task can be executed. Then you can call SD_simulate() again.
| how_long | maximum duration of the simulation (a negative value means no time limit) |
| double SD_get_clock | ( | ) |
Returns the current clock, in seconds.
| void SD_exit | ( | ) |
Destroys all SD internal data This function should be called when the simulation is over.
Don't forget to destroy too.
| xbt_dynar_t SD_daxload | ( | const char * | filename | ) |
loads a DAX file describing a DAG
See https://confluence.pegasus.isi.edu/display/pegasus/WorkflowGenerator for more details.
| xbt_dynar_t SD_dotload | ( | const char * | filename | ) |
| xbt_dynar_t SD_dotload_with_sched | ( | const char * | filename | ) |
| xbt_dynar_t SD_PTG_dotload | ( | const char * | filename | ) |