/*****Communication Requests*****/
XBT_INLINE XBT_PUBLIC(void) SIMIX_communication_cancel(smx_comm_t comm);
+XBT_PUBLIC(void) SIMIX_communication_destroy(smx_comm_t comm);
XBT_PUBLIC(double) SIMIX_communication_get_remains(smx_comm_t comm);
XBT_PUBLIC(void *) SIMIX_communication_get_data(smx_comm_t comm);
void SIMIX_network_copy_data(smx_comm_t comm);
smx_comm_t SIMIX_communication_new(smx_comm_type_t type);
-void SIMIX_communication_destroy(smx_comm_t comm);
static inline void SIMIX_communication_use(smx_comm_t comm);
static inline void SIMIX_communication_wait_for_completion(smx_comm_t comm, double timeout);
static inline void SIMIX_rdv_push(smx_rdv_t rdv, smx_comm_t comm);
// data is null if receiver waits before sender enters the rdv
if(data == MPI_REQUEST_NULL || data->complete == 0) {
SIMIX_network_wait((*request)->pair, -1.0);
+ } else {
+ SIMIX_communication_destroy((*request)->pair);
}
finish_wait(request, status);
}
data = (MPI_Request)SIMIX_communication_get_data(requests[i]->pair);
if(data != MPI_REQUEST_NULL && data->complete == 1) {
index = i;
+ SIMIX_communication_destroy(requests[index]->pair); // always succeeds (but cleans the simix layer)
break;
}
}