Commit d4fcadbc authored by James Dinan's avatar James Dinan
Browse files

Renamed MPI_MUTEX_TAG to MPIX_MUTEX_TAG

Fixed misuse of MPI_ namespace in the mutex library.

Reviewer: none
parent ff1d777a
......@@ -88,7 +88,7 @@ int MPIX_Mutex_lock(MPIX_Mutex hdl, int mutex, int proc)
if (already_locked) {
MPI_Status status;
debug_print("waiting for notification [proc = %d, mutex = %d]\n", proc, mutex);
MPI_Recv(NULL, 0, MPI_BYTE, MPI_ANY_SOURCE, MPI_MUTEX_TAG + mutex, hdl->comm, &status);
MPI_Recv(NULL, 0, MPI_BYTE, MPI_ANY_SOURCE, MPIX_MUTEX_TAG + mutex, hdl->comm, &status);
}
debug_print("lock acquired [proc = %d, mutex = %d]\n", proc, mutex);
......
......@@ -85,7 +85,7 @@ int MPIX_Mutex_unlock(MPIX_Mutex hdl, int mutex, int proc)
int p = (rank + i) % nproc;
if (buf[p] == 1) {
debug_print("notifying %d [proc = %d, mutex = %d]\n", p, proc, mutex);
MPI_Send(NULL, 0, MPI_BYTE, p, MPI_MUTEX_TAG + mutex, hdl->comm);
MPI_Send(NULL, 0, MPI_BYTE, p, MPIX_MUTEX_TAG + mutex, hdl->comm);
break;
}
}
......
......@@ -10,7 +10,7 @@
#include <mpi.h>
#include <mpitypedefs.h>
#define MPI_MUTEX_TAG 100
#define MPIX_MUTEX_TAG 100
#ifdef ENABLE_DEBUG
#define debug_print(...) do { printf(__VA_ARGS__); } while (0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment