SimGrid  3.19.1
Versatile Simulation of Distributed Systems

Detailed Description

Functions to create the environment and launch the simulation.

This section describes the functions for initializing SimDag, launching the simulation and exiting SimDag.

Macros

#define SD_init(argc, argv)
 

Functions

void SD_init_nocheck (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...
 
void SD_simulate (double how_long)
 Launches the simulation. More...
 
void SD_simulate_with_update (double how_long, xbt_dynar_t changed_tasks_dynar)
 
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)
 

Macro Definition Documentation

◆ SD_init

#define SD_init (   argc,
  argv 
)
Value:
do { \
SD_init_nocheck(argc, argv); \
} while (0)
void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Op MPI_Win win void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Aint MPI_Info void baseptr void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Comm int keyval MPI_Comm int void attr_value void int MPI_Datatype int MPI_Comm comm MPI_Comm int int int int MPI_Comm comm_cart MPI_Comm int int int int coords MPI_Comm int int int int dest MPI_Comm MPI_Comm int result MPI_Comm MPI_Group MPI_Comm newcomm MPI_Comm comm int keyval MPI_Comm int void int flag MPI_Comm MPI_Group group MPI_Comm int void attribute_val MPI_Comm int int MPI_Comm comm_out void void void MPI_Datatype int MPI_Aint MPI_Win win int int errorclass int flag void baseptr void int MPI_Datatype void int int MPI_Datatype int MPI_Comm comm MPI_Status MPI_Datatype int count char int resultlen void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Win win void void MPI_Datatype int MPI_Aint MPI_Op MPI_Win win MPI_Group MPI_Group MPI_Group newgroup MPI_Group group MPI_Group MPI_Group MPI_Group newgroup MPI_Group int int MPI_Group newgroup MPI_Group int size MPI_Group MPI_Group MPI_Group newgroup MPI_Info char key MPI_Info info MPI_Info int nkeys MPI_Info char int int flag int flag int char *** argv
Definition: smpi_mpi.cpp:131
#define SIMGRID_VERSION_MAJOR
Define the version numbers of the used header files.
Definition: simgrid_config.h:14
#define SIMGRID_VERSION_MINOR
Definition: simgrid_config.h:15
void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Op MPI_Win win void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Aint MPI_Info void baseptr void int MPI_Datatype void int MPI_Datatype MPI_Comm comm MPI_Comm int keyval MPI_Comm int void attr_value void int MPI_Datatype int MPI_Comm comm MPI_Comm int int int int MPI_Comm comm_cart MPI_Comm int int int int coords MPI_Comm int int int int dest MPI_Comm MPI_Comm int result MPI_Comm MPI_Group MPI_Comm newcomm MPI_Comm comm int keyval MPI_Comm int void int flag MPI_Comm MPI_Group group MPI_Comm int void attribute_val MPI_Comm int int MPI_Comm comm_out void void void MPI_Datatype int MPI_Aint MPI_Win win int int errorclass int flag void baseptr void int MPI_Datatype void int int MPI_Datatype int MPI_Comm comm MPI_Status MPI_Datatype int count char int resultlen void int MPI_Datatype int MPI_Aint int MPI_Datatype MPI_Win win void void MPI_Datatype int MPI_Aint MPI_Op MPI_Win win MPI_Group MPI_Group MPI_Group newgroup MPI_Group group MPI_Group MPI_Group MPI_Group newgroup MPI_Group int int MPI_Group newgroup MPI_Group int size MPI_Group MPI_Group MPI_Group newgroup MPI_Info char key MPI_Info info MPI_Info int nkeys MPI_Info char int int flag int flag int * argc
Definition: smpi_mpi.cpp:131
#define SIMGRID_VERSION_PATCH
Definition: simgrid_config.h:16

Function Documentation

◆ SD_init_nocheck()

void SD_init_nocheck ( 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().

Parameters
argcargument number
argvargument list
See also
SD_create_environment(), SD_exit()

◆ SD_config()

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")

◆ SD_create_environment()

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.

Parameters
platform_filename of an XML file describing the environment to create
See also
Hosts, Links

The XML file follows this DTD:

\include simgrid.dtd

Here is a small example of such a platform:

\include small_platform.xml

◆ SD_simulate()

void 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.

Parameters
how_longmaximum duration of the simulation (a negative value means no time limit)
Returns
a dynar of SD_task_t whose state has changed.
See also
SD_task_schedule(), SD_task_watch()

◆ SD_simulate_with_update()

void SD_simulate_with_update ( double  how_long,
xbt_dynar_t  changed_tasks_dynar 
)

◆ SD_get_clock()

double SD_get_clock ( )

Returns the current clock, in seconds.

◆ SD_exit()

void SD_exit ( )

Destroys all SD internal data This function should be called when the simulation is over.

Don't forget to destroy too.

See also
SD_init(), SD_task_destroy()

◆ SD_daxload()

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.

◆ SD_dotload()

xbt_dynar_t SD_dotload ( const char *  filename)

◆ SD_dotload_with_sched()

xbt_dynar_t SD_dotload_with_sched ( const char *  filename)

◆ SD_PTG_dotload()

xbt_dynar_t SD_PTG_dotload ( const char *  filename)