Skip to content

Commit

Permalink
Fixes arguments in ProcessRequest for MPI_Test
Browse files Browse the repository at this point in the history
Change-Id: I2b16a2d9cd13395698dd62717f3f5cecc516efdf
  • Loading branch information
gllort committed Jul 5, 2019
1 parent 5e3d1ca commit b29c116
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/tracer/wrappers/MPI/mpi_wrapper_p2p_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,6 +824,16 @@ int MPI_Improbe_C_Wrapper (int source, int tag, MPI_Comm comm, int *flag, MPI_Me
#endif /* MPI3 */


void copyRequests_C (int count, MPI_Request *array_of_requests, MPI_Request *copy, char *where)
{
if (count > MAX_WAIT_REQUESTS)
{
fprintf (stderr, "PANIC! Number of requests in %s (%d) exceeds tha maximum supported (%d). Please increase the value of MAX_WAIT_REQUESTS and recompile Extrae.\n", where, count, MAX_WAIT_REQUESTS);
}
memcpy (copy, array_of_requests, count * sizeof(MPI_Request));
}


/******************************************************************************
*** MPI_Test_C_Wrapper
******************************************************************************/
Expand All @@ -850,7 +860,7 @@ int Bursts_MPI_Test_C_Wrapper (MPI_Request *request, int *flag, MPI_Status *stat

if (ierror == MPI_SUCCESS && *flag)
{
ProcessRequest (MPI_Test_end_time, *request, status);
ProcessRequest (MPI_Test_end_time, save_req, status);
}

/*
Expand Down Expand Up @@ -894,7 +904,7 @@ int Normal_MPI_Test_C_Wrapper (MPI_Request *request, int *flag, MPI_Status *stat

MPI_Test_end_time = TIME;

ProcessRequest (MPI_Test_end_time, *request, status);
ProcessRequest (MPI_Test_end_time, save_req, status);

TRACE_MPIEVENT (MPI_Test_end_time, MPI_TEST_EV, EVT_END, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY);

Expand Down Expand Up @@ -934,15 +944,6 @@ int MPI_Test_C_Wrapper (MPI_Request *request, int *flag, MPI_Status *status)
return ret;
}

void copyRequests_C (int count, MPI_Request *array_of_requests, MPI_Request *copy, char *where)
{
if (count > MAX_WAIT_REQUESTS)
{
fprintf (stderr, "PANIC! Number of requests in %s (%d) exceeds tha maximum supported (%d). Please increase the value of MAX_WAIT_REQUESTS and recompile Extrae.\n", where, count, MAX_WAIT_REQUESTS);
}
memcpy (copy, array_of_requests, count * sizeof(MPI_Request));
}

/******************************************************************************
*** MPI_Testall_C_Wrapper
******************************************************************************/
Expand Down

0 comments on commit b29c116

Please sign in to comment.