data = smpi_process_remote_data(index);
SIMIX_process_set_data(proc, data);
if (*argc > 2) {
+ free((*argv)[1]);
memmove(&(*argv)[1], &(*argv)[2], sizeof(char *) * (*argc - 2));
(*argv)[(*argc) - 1] = NULL;
}
// 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;
}
}