-// TODO: cheinrich: Move declaration to other file? Rename this function - it's used for PMPI_Wait*?
-static void trace_smpi_recv_helper(MPI_Request* request, MPI_Status* status)
+static void trace_smpi_wait_recv_helper(MPI_Request* request, MPI_Status* status)
{
const simgrid::smpi::Request* req = *request;
// Requests already received are null. Is this request a wait for RECV?
{
const simgrid::smpi::Request* req = *request;
// Requests already received are null. Is this request a wait for RECV?
} else {
// for tracing, save the handle which might get overridden before we can use the helper on it
MPI_Request savedreq = *request;
} else {
// for tracing, save the handle which might get overridden before we can use the helper on it
MPI_Request savedreq = *request;
savedreq->ref();//don't erase the handle in Request::wait, we'll need it later
else
savedreq = MPI_REQUEST_NULL;
savedreq->ref();//don't erase the handle in Request::wait, we'll need it later
else
savedreq = MPI_REQUEST_NULL;
//the src may not have been known at the beginning of the recv (MPI_ANY_SOURCE)
TRACE_smpi_comm_out(my_proc_id);
//the src may not have been known at the beginning of the recv (MPI_ANY_SOURCE)
TRACE_smpi_comm_out(my_proc_id);
*index = simgrid::smpi::Request::waitany(count, requests, status);
if(*index!=MPI_UNDEFINED){
*index = simgrid::smpi::Request::waitany(count, requests, status);
if(*index!=MPI_UNDEFINED){
int retval = simgrid::smpi::Request::waitall(count, requests, status);
for (int i = 0; i < count; i++) {
int retval = simgrid::smpi::Request::waitall(count, requests, status);
for (int i = 0; i < count; i++) {