-/** @addtogroup MSG_examples
- *
- * @example app-pingpong/app-pingpong.c
- *
- * - <b>Ping-Pong: app-pingpong/app-pingpong.c</b>. It's hard to think of a simpler example. The tesh file
- * laying in the directory is instructive concerning the way to pass options to the simulators (see \ref options).
- */
-
XBT_LOG_NEW_DEFAULT_CATEGORY(mag_app_pingpong,"Messages specific for this msg example");
static int pinger(int argc, char *argv[])
XBT_LOG_NEW_DEFAULT_CATEGORY(mag_app_pingpong,"Messages specific for this msg example");
static int pinger(int argc, char *argv[])
XBT_INFO("Pong -> %s", argv[1]);
xbt_assert(MSG_host_by_name(argv[1]) != NULL, "Unknown host %s. Stopping Now! ", argv[1]);
XBT_INFO("Pong -> %s", argv[1]);
xbt_assert(MSG_host_by_name(argv[1]) != NULL, "Unknown host %s. Stopping Now! ", argv[1]);
msg_task_t ping_task = NULL;
int a = MSG_task_receive(&ping_task, MSG_host_get_name(MSG_host_self()));
xbt_assert(a == MSG_OK, "Unexpected behavior");
msg_task_t ping_task = NULL;
int a = MSG_task_receive(&ping_task, MSG_host_get_name(MSG_host_self()));
xbt_assert(a == MSG_OK, "Unexpected behavior");
MSG_task_destroy(ping_task);
XBT_INFO(" Ping time (latency bound) %e", communication_time);
MSG_task_destroy(ping_task);
XBT_INFO(" Ping time (latency bound) %e", communication_time);
double time = MSG_get_clock();
msg_task_t pong_task = MSG_task_create("large communication (bandwidth bound)", 0.0, 1e9, NULL);
pong_task->data = xbt_new(double, 1);
double time = MSG_get_clock();
msg_task_t pong_task = MSG_task_create("large communication (bandwidth bound)", 0.0, 1e9, NULL);
pong_task->data = xbt_new(double, 1);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
"\tExample: %s ../../platform/small_platform.xml app-pingpong_d.xml\n", argv[0], argv[0]);
xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
"\tExample: %s ../../platform/small_platform.xml app-pingpong_d.xml\n", argv[0], argv[0]);