Beispiel #1
0
/** Main function */
int main(int argc, char *argv[])
{
    MSG_error_t res = MSG_OK;

    /* Argument checking */
    MSG_global_init(&argc, argv);
    if (argc < 3) {
        XBT_CRITICAL("Usage: %s platform_file deployment_file\n", argv[0]);
        XBT_CRITICAL("example: %s msg_platform.xml msg_deployment_suspend.xml\n",
                     argv[0]);
        exit(1);
    }

    /* Simulation setting */
    MSG_create_environment(argv[1]);

    /* Application deployment */
    MSG_function_register("emigrant", emigrant);
    MSG_launch_application(argv[2]);

    /* Run the simulation */
    res = MSG_main();
    XBT_INFO("Simulation time %g", MSG_get_clock());
    if (res == MSG_OK)
        res = MSG_clean();

    if (res == MSG_OK)
        return 0;
    else
        return 1;
}                               /* end_of_main */
Beispiel #2
0
int main(int argc, char *argv[])
{   
    MSG_error_t res = MSG_OK;
    MSG_global_init(&argc, argv);


    if (argc != 3) {
        XBT_CRITICAL("Usage: %s platform_file deployment_file \n",
                argv[0]);
        XBT_CRITICAL
            ("example: %s msg_platform.xml msg_deployment.xml \n",
             argv[0]);
        exit(1);
    }
    res = run(argv[1], argv[2]);

    XBT_INFO("Total simulation time: %le", MSG_get_clock());

    MSG_clean();


    if (res == MSG_OK)
        return 0;
    else
        return 1;
} 
Beispiel #3
0
/** Main function */
int main(int argc, char *argv[])
{
  MSG_error_t res = MSG_OK;

  MSG_global_init(&argc, argv);
  res = test_all();
  MSG_clean();

  if (res == MSG_OK)
    return 0;
  else
    return 1;
}                               /* end_of_main */
/** Main function */
int main(int argc, char *argv[])
{
  MSG_error_t res = MSG_OK;

  MSG_global_init(&argc,argv);
  if (argc < 3) {
     printf ("Usage: %s platform_file deployment_file\n",argv[0]);
     printf ("example: %s msg_platform.xml msg_deployment.xml\n",argv[0]);
     exit(1);
  }
  res = test_all(argv[1],argv[2]);
  MSG_clean();

  if(res==MSG_OK)
    return 0;
  else
    return 1;
} /* end_of_main */
Beispiel #5
0
int main(int argc, char **argv)
{
	int res;
  MSG_global_init(&argc, argv);
  MSG_set_channel_number(MAX_CHANNEL);
  MSG_create_environment(argv[1]);

  MSG_function_register("master", master);
  MSG_function_register("slave", slave);
  surf_parse = surf_parse_bypass_application;
  MSG_launch_application(NULL);

  res = MSG_main();

  XBT_INFO("Simulation time %g", MSG_get_clock());

  MSG_clean();

  if (res == MSG_OK)
    return 0;
  else
    return 1;

}