The basic workflow is the following (check the \ref MSG_examples for
details).
- -# Initialize the library with #MSG_global_init
+ -# Initialize the library with #MSG_init
-# Create a platform (usually by parsing a file with
#MSG_create_environment)
-# Register the functions that your processes are supposed to run with
msg_task_usage.
\li <tt>masterslave.c</tt>: a C file with the main function, i.e.
- the MSG initialization (MSG_global_init()), the platform
+ the MSG initialization (MSG_init()), the platform
creation (e.g. with MSG_create_environment()), the
deployment phase (e.g. with MSG_function_register() and
MSG_launch_application()) and the call to
extern xbt_cfg_t _surf_cfg_set;
int main(int argc, char *argv[]) {
- MSG_global_init(&argc, argv);
+ MSG_init(&argc, argv);
xbt_cfg_set_parse(_surf_cfg_set,"Item:Value");
\verbatim
int main (int argc, char **argv)
{
- MSG_global_init (&argc, &argv);
+ MSG_init (&argc, &argv);
//(... after deployment ...)
MSG_error_t res = MSG_OK;
bool_printed = 0;
- MSG_global_init(&argc, argv);
+ MSG_init(&argc, argv);
if (argc < 3) {
printf("Usage: %s platform_file deployment_file\n", argv[0]);
exit(1);
{
xbt_assert(msg_global,
- "MSG_global_init_args has to be called before MSG_launch_application.");
+ "MSG_init has to be called before MSG_launch_application.");
SIMIX_launch_application(file);
smx_mutex_t simcall_mutex_init(void)
{
if(!simix_global) {
- fprintf(stderr,"You must run MSG_global_init or gras_init before using MSG or GRAS\n"); // I would have loved using xbt_die but I can't since it is not initialized yet... :)
+ fprintf(stderr,"You must run MSG_init or gras_init before using MSG or GRAS\n"); // I would have loved using xbt_die but I can't since it is not initialized yet... :)
abort();
}
smx_simcall_t simcall = SIMIX_simcall_mine();