SimGrid  3.20
Versatile Simulation of Distributed Systems
Main MSG simulation Functions

Detailed Description

How to setup and control your simulation.

The basic workflow is the following (check the MSG examples for details).

  1. Initialize the library with MSG_init
  2. Create a platform (usually by parsing a file with MSG_create_environment)
  3. Register the functions that your processes are supposed to run with MSG_function_register (and maybe MSG_function_register_default)
  4. Launch your processes from a deployment file with MSG_launch_application
  5. Run the simulation with MSG_main

Macros

#define MSG_init(argc, argv)
 Initialize the MSG internal data. More...
 

Functions

void MSG_init_nocheck (int *argc, char **argv)
 Initialize MSG with less verifications You should use the MSG_init() function instead. More...
 
void MSG_config (const char *key, const char *value)
 set a configuration variable More...
 
enum  msg_error_t {
  MSG_OK = 0, MSG_TIMEOUT = 1, MSG_TRANSFER_FAILURE = 2, MSG_HOST_FAILURE = 4,
  MSG_TASK_CANCELED = 8
}
 Return code of most MSG functions. More...
 

Macro Definition Documentation

◆ MSG_init

Enumeration Type Documentation

◆ msg_error_t

Return code of most MSG functions.

Enumerator
MSG_OK 

Everything is right.

Keep on going this way !

MSG_TIMEOUT 

nothing good happened before the timer you provided elapsed

MSG_TRANSFER_FAILURE 

There has been a problem during you task transfer.

Either the network is down or the remote host has been shutdown.

MSG_HOST_FAILURE 

System shutdown.

The host on which you are running has just been rebooted. Free your datastructures and return now !

MSG_TASK_CANCELED 

Canceled task.

This task has been canceled by somebody!

Function Documentation

◆ MSG_init_nocheck()

void MSG_init_nocheck ( int *  argc,
char **  argv 
)

Initialize MSG with less verifications You should use the MSG_init() function instead.

Failing to do so may turn into PEBKAC some day. You've been warned.

◆ MSG_config()

void MSG_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: MSG_config("host/model","ptask_L07");