INFO2("Sending \"%s\" to \"%s\"",
todo[i]->name,
slaves[i % slaves_count]->name);
+ if(MSG_host_self()==slaves[i % slaves_count]) {
+ INFO0("Hey ! It's me ! :)");
+ }
MSG_task_put(todo[i], slaves[i % slaves_count],
PORT_22);
INFO0("Send completed");
int a;
a = MSG_task_get(&(task), PORT_22);
if (a == MSG_OK) {
- INFO1("Received \"%s\" ", task->name);
- INFO1("Processing \"%s\" ", task->name);
+ INFO1("Received \"%s\" ", MSG_task_get_name(task));
+ INFO1("Processing \"%s\" ", MSG_task_get_name(task));
MSG_task_execute(task);
- INFO1("\"%s\" done ", task->name);
+ INFO1("\"%s\" done ", MSG_task_get_name(task));
MSG_task_destroy(task);
} else {
INFO0("Hey ?! What's up ? ");
- xbt_assert0(0,"Unexpected behaviour");
+ xbt_assert0(0,"Unexpected behavior");
}
}
INFO0("I'm done. See you!");
int a;
a = MSG_task_get(&(task), PORT_22);
if (a == MSG_OK) {
- INFO1("Received \"%s\" ", task->name);
+ INFO1("Received \"%s\" ", MSG_task_get_name(task));
INFO2("Sending \"%s\" to \"%s\"",
- task->name,
+ MSG_task_get_name(task),
slaves[i % slaves_count]->name);
MSG_task_put(task, slaves[i % slaves_count],
PORT_22);
} else {
INFO0("Hey ?! What's up ? ");
- xbt_assert0(0,"Unexpected behaviour");
+ xbt_assert0(0,"Unexpected behavior");
}
}
}
MSG_main();
- INFO1("Simulation time %g",MSG_getClock());
+ INFO1("Simulation time %g",MSG_get_clock());
} /* end_of_test_all */
/** Main function */
int main(int argc, char *argv[])
{
- MSG_global_init_args(&argc,argv);
+ 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]);