} else if (a == MSG_HOST_FAILURE) {
INFO0
("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) {
INFO1
("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) {
INFO1
("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 {
INFO0("Hey ?! What's up ? ");
if (a == MSG_HOST_FAILURE) {
INFO0
("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) {
INFO1("Mmh. Can't reach '%s'! Nevermind. Let's keep going!",
{
xbt_ex_t e;
MSG_error_t ret = MSG_OK;
- smx_action_t comm = NULL;
+ volatile smx_action_t comm = NULL;
#ifdef HAVE_TRACING
double start_time = 0;
#endif
comm = SIMIX_req_comm_irecv(mailbox, task, NULL, NULL, NULL);
SIMIX_req_comm_wait(comm, timeout);
(*task)->simdata->comm = comm;
- SIMIX_req_comm_destroy(comm);
DEBUG2("Got task %s from %p",(*task)->name,mailbox);
(*task)->simdata->isused=0;
}
ret = MSG_TIMEOUT;
break;
default:
- xbt_backtrace_display(&e);
- xbt_die(bprintf("Unhandled SIMIX network exception: %s", e.msg));
+ RETHROW;
}
xbt_ex_free(e);
}
+ if (comm != NULL) {
+ SIMIX_req_comm_destroy(comm);
+ }
if (ret != MSG_HOST_FAILURE &&
ret != MSG_TRANSFER_FAILURE && ret != MSG_TIMEOUT) {
MSG_error_t ret = MSG_OK;
simdata_task_t t_simdata = NULL;
m_process_t process = MSG_process_self();
- smx_action_t comm;
+ volatile smx_action_t comm = NULL;
#ifdef HAVE_TRACING
int call_end = 0;
#endif
call_end = TRACE_msg_task_put_start(task); //must be after CHECK_HOST()
#endif
-
/* Prepare the task to send */
t_simdata = task->simdata;
t_simdata->sender = process;
SIMIX_req_set_category(comm, task->category);
#endif
SIMIX_req_comm_wait(comm, timeout);
- SIMIX_req_comm_destroy(comm);
}
CATCH(e) {
ret = MSG_TIMEOUT;
break;
default:
- xbt_die(bprintf("Unhandled SIMIX network exception: %s", e.msg));
+ RETHROW;
}
xbt_ex_free(e);
t_simdata->isused=0;
}
+ if (comm != NULL) {
+ SIMIX_req_comm_destroy(comm);
+ }
+
process->simdata->waiting_task = NULL;
#ifdef HAVE_TRACING
if (call_end)