Skip to content

Commit

Permalink
Guards the definition of SaveMessage and ProcessMessage only under MPI3
Browse files Browse the repository at this point in the history
Change-Id: I77e3e50b0b4ee17a3e1756ab4c5a22ae56326e9c
  • Loading branch information
gllort committed Jun 12, 2019
1 parent fd84931 commit e091838
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 24 deletions.
3 changes: 2 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

ChangeLog
[ + added, - removed, * changed ]
* 11Mar2019 Fixes bug in MPI_Wait where the input request is not copied for later processing
* 12Jun2019 Guards the definition of SaveMessage and ProcessMessage only under MPI3
* 11Jun2019 Fixes bug in MPI_Wait where the input request is not copied for later processing
* 25Apr2019 Fixes race conditions between thread creations and PEBS samples
* 17Apr2019 Fixes bug in pebs sampling store misses identification
* 02Apr2019 Adds support for changing num_threads in OpenMP parallel constructs
Expand Down
48 changes: 27 additions & 21 deletions src/tracer/wrappers/MPI/mpi_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -2936,20 +2936,6 @@ void SaveRequest(MPI_Request request, MPI_Comm comm)
}
}

void SaveMessage(MPI_Message message, MPI_Comm comm)
{
if (message != MPI_MESSAGE_NULL)
{
xtr_hash_data_t hash_msg;

hash_msg.key = MPI_MESSAGE_TO_HASH_KEY(message);
hash_msg.commid = comm;
getCommunicatorGroup(comm, &hash_msg.group);

xtr_hash_add (&requests, &hash_msg);
}
}

void ProcessRequest(iotimer_t ts, MPI_Request request, MPI_Status *status)
{
if (request != MPI_REQUEST_NULL)
Expand Down Expand Up @@ -3000,6 +2986,31 @@ void ProcessRequest(iotimer_t ts, MPI_Request request, MPI_Status *status)
}
}

void CancelRequest(MPI_Request request)
{
if (request != MPI_REQUEST_NULL)
{
xtr_hash_remove(&requests, MPI_REQUEST_TO_HASH_KEY(request));
}
}

#if defined(MPI3)

void SaveMessage(MPI_Message message, MPI_Comm comm)
{
if (message != MPI_MESSAGE_NULL)
{
xtr_hash_data_t hash_msg;

hash_msg.key = MPI_MESSAGE_TO_HASH_KEY(message);
hash_msg.commid = comm;
getCommunicatorGroup(comm, &hash_msg.group);

xtr_hash_add (&requests, &hash_msg);
}
}


MPI_Comm ProcessMessage(MPI_Message message, MPI_Request *request)
{
if (message != MPI_MESSAGE_NULL)
Expand Down Expand Up @@ -3032,11 +3043,6 @@ MPI_Comm ProcessMessage(MPI_Message message, MPI_Request *request)
return MPI_COMM_NULL;
}

void CancelRequest(MPI_Request request)
{
if (request != MPI_REQUEST_NULL)
{
xtr_hash_remove(&requests, MPI_REQUEST_TO_HASH_KEY(request));
}
}
#endif /* MPI3 */


6 changes: 4 additions & 2 deletions src/tracer/wrappers/MPI/mpi_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ enum

int getMsgSizeFromCountAndDatatype(int count, MPI_Datatype datatype);

void SaveMessage(MPI_Message message, MPI_Comm comm);
MPI_Comm ProcessMessage(MPI_Message message, MPI_Request *request);
void SaveRequest(MPI_Request request, MPI_Comm comm);
void ProcessRequest(iotimer_t ts, MPI_Request request, MPI_Status *status);
void CancelRequest(MPI_Request request);
#if defined(MPI3)
void SaveMessage(MPI_Message message, MPI_Comm comm);
MPI_Comm ProcessMessage(MPI_Message message, MPI_Request *request);
#endif /* MPI3 */

void Trace_MPI_Communicator (MPI_Comm newcomm, UINT64 time, int trace);
void Trace_MPI_InterCommunicator (MPI_Comm newcomm, MPI_Comm local_comm,
Expand Down

0 comments on commit e091838

Please sign in to comment.