for (i = 4; i < argc; i++) {
slaves[i - 4] = MSG_get_host_by_name(argv[i]);
if (slaves[i - 4] == NULL) {
for (i = 4; i < argc; i++) {
slaves[i - 4] = MSG_get_host_by_name(argv[i]);
if (slaves[i - 4] == NULL) {
for (i = 0; i < number_of_tasks; i++) {
m_task_t task = MSG_task_create("Task", task_comp_size, task_comm_size,
for (i = 0; i < number_of_tasks; i++) {
m_task_t task = MSG_task_create("Task", task_comp_size, task_comm_size,
a = MSG_task_put_with_timeout(task, slaves[i % slaves_count], PORT_22,
10.0);
if (a == MSG_OK) {
a = MSG_task_put_with_timeout(task, slaves[i % slaves_count], PORT_22,
10.0);
if (a == MSG_OK) {
("Gloups. The cpu on which I'm running just turned off!. See you!");
free(task->data);
MSG_task_destroy(task);
free(slaves);
return 0;
} else if (a == MSG_TRANSFER_FAILURE) {
("Gloups. The cpu on which I'm running just turned off!. See you!");
free(task->data);
MSG_task_destroy(task);
free(slaves);
return 0;
} else if (a == MSG_TRANSFER_FAILURE) {
("Mmh. Something went wrong with '%s'. Nevermind. Let's keep going!",
slaves[i % slaves_count]->name);
free(task->data);
MSG_task_destroy(task);
} else if (a == MSG_TIMEOUT) {
("Mmh. Something went wrong with '%s'. Nevermind. Let's keep going!",
slaves[i % slaves_count]->name);
free(task->data);
MSG_task_destroy(task);
} else if (a == MSG_TIMEOUT) {
("Mmh. Got timeouted while speaking to '%s'. Nevermind. Let's keep going!",
slaves[i % slaves_count]->name);
free(task->data);
MSG_task_destroy(task);
} else {
("Mmh. Got timeouted while speaking to '%s'. Nevermind. Let's keep going!",
slaves[i % slaves_count]->name);
free(task->data);
MSG_task_destroy(task);
} else {
("All tasks have been dispatched. Let's tell everybody the computation is over.");
for (i = 0; i < slaves_count; i++) {
m_task_t task = MSG_task_create("finalize", 0, 0, FINALIZE);
("All tasks have been dispatched. Let's tell everybody the computation is over.");
for (i = 0; i < slaves_count; i++) {
m_task_t task = MSG_task_create("finalize", 0, 0, FINALIZE);
("Gloups. The cpu on which I'm running just turned off!. See you!");
MSG_task_destroy(task);
free(slaves);
return 0;
} else if (a == MSG_TRANSFER_FAILURE) {
("Gloups. The cpu on which I'm running just turned off!. See you!");
MSG_task_destroy(task);
free(slaves);
return 0;
} else if (a == MSG_TRANSFER_FAILURE) {
("Mmh. Got timeouted while speaking to '%s'. Nevermind. Let's keep going!",
slaves[i % slaves_count]->name);
MSG_task_destroy(task);
} else {
("Mmh. Got timeouted while speaking to '%s'. Nevermind. Let's keep going!",
slaves[i % slaves_count]->name);
MSG_task_destroy(task);
} else {
xbt_assert2(0, "Unexpected behavior with '%s': %d", slaves[i]->name,
a);
}
}
xbt_assert2(0, "Unexpected behavior with '%s': %d", slaves[i]->name,
a);
}
}
if (MSG_task_get_data(task) == FINALIZE) {
MSG_task_destroy(task);
break;
}
if (time1 < *((double *) task->data))
time1 = *((double *) task->data);
if (MSG_task_get_data(task) == FINALIZE) {
MSG_task_destroy(task);
break;
}
if (time1 < *((double *) task->data))
time1 = *((double *) task->data);
- INFO1("Communication time : \"%f\"", time2 - time1);
- INFO1("Processing \"%s\"", MSG_task_get_name(task));
+ XBT_INFO("Communication time : \"%f\"", time2 - time1);
+ XBT_INFO("Processing \"%s\"", MSG_task_get_name(task));
xbt_assert0(0, "Unexpected behavior");
}
} else if (a == MSG_HOST_FAILURE) {
xbt_assert0(0, "Unexpected behavior");
}
} else if (a == MSG_HOST_FAILURE) {
("Gloups. The cpu on which I'm running just turned off!. See you!");
return 0;
} else if (a == MSG_TRANSFER_FAILURE) {
("Gloups. The cpu on which I'm running just turned off!. See you!");
return 0;
} else if (a == MSG_TRANSFER_FAILURE) {