int flag = data && data->complete == 1;
if(flag) {
+ SIMIX_communication_destroy((*request)->pair);
finish_wait(request, status);
}
return flag;
if(requests[i] != MPI_REQUEST_NULL) {
data = (MPI_Request)SIMIX_communication_get_data(requests[i]->pair);
if(data != MPI_REQUEST_NULL && data->complete == 1) {
+ SIMIX_communication_destroy(requests[i]->pair);
finish_wait(&requests[i], status);
*index = i;
flag = 1;
// 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;
}
}
int i, count;
count = 0;
- for(i = 0; i < count; i++) {
+ for(i = 0; i < incount; i++) {
if(requests[i] != MPI_REQUEST_NULL) {
data = (MPI_Request)SIMIX_communication_get_data(requests[i]->pair);
if(data != MPI_REQUEST_NULL && data->complete == 1) {
+ SIMIX_communication_destroy(requests[i]->pair);
finish_wait(&requests[i], status != MPI_STATUS_IGNORE ? &status[i] : MPI_STATUS_IGNORE);
indices[count] = i;
count++;