Unverified Commit 365166fe authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

print warning messages about calls to self only once

parent 34b02345
Loading
Loading
Loading
Loading
+50 −10
Original line number Diff line number Diff line
@@ -200,7 +200,11 @@ int MPI_Request_free(MPI_Request *request)
int MPI_Send(const void *buf, int count, MPI_Datatype datatype,
             int dest, int tag, MPI_Comm comm)
{
  static int callcount=0;
  if (callcount == 0) {
    printf("MPI Stub WARNING: Should not send message to self\n");
    ++callcount;
  }
  return 0;
}

@@ -209,7 +213,11 @@ int MPI_Send(const void *buf, int count, MPI_Datatype datatype,
int MPI_Isend(const void *buf, int count, MPI_Datatype datatype,
              int source, int tag, MPI_Comm comm, MPI_Request *request)
{
  static int callcount=0;
  if (callcount == 0) {
    printf("MPI Stub WARNING: Should not send message to self\n");
    ++callcount;
  }
  return 0;
}

@@ -218,7 +226,11 @@ int MPI_Isend(const void *buf, int count, MPI_Datatype datatype,
int MPI_Rsend(const void *buf, int count, MPI_Datatype datatype,
              int dest, int tag, MPI_Comm comm)
{
  static int callcount=0;
  if (callcount == 0) {
    printf("MPI Stub WARNING: Should not rsend message to self\n");
    ++callcount;
  }
  return 0;
}

@@ -227,7 +239,11 @@ int MPI_Rsend(const void *buf, int count, MPI_Datatype datatype,
int MPI_Recv(void *buf, int count, MPI_Datatype datatype,
             int source, int tag, MPI_Comm comm, MPI_Status *status)
{
  static int callcount=0;
  if (callcount == 0) {
    printf("MPI Stub WARNING: Should not recv message from self\n");
    ++callcount;
  }
  return 0;
}

@@ -236,7 +252,11 @@ int MPI_Recv(void *buf, int count, MPI_Datatype datatype,
int MPI_Irecv(void *buf, int count, MPI_Datatype datatype,
              int source, int tag, MPI_Comm comm, MPI_Request *request)
{
  static int callcount=0;
  if (callcount == 0) {
    printf("MPI Stub WARNING: Should not recv message from self\n");
    ++callcount;
  }
  return 0;
}

@@ -244,7 +264,11 @@ int MPI_Irecv(void *buf, int count, MPI_Datatype datatype,

int MPI_Wait(MPI_Request *request, MPI_Status *status)
{
  static int callcount=0;
  if (callcount == 0) {
    printf("MPI Stub WARNING: Should not wait on message from self\n");
    ++callcount;
  }
  return 0;
}

@@ -252,7 +276,11 @@ int MPI_Wait(MPI_Request *request, MPI_Status *status)

int MPI_Waitall(int n, MPI_Request *request, MPI_Status *status)
{
  static int callcount=0;
  if (callcount == 0) {
    printf("MPI Stub WARNING: Should not wait on message from self\n");
    ++callcount;
  }
  return 0;
}

@@ -261,7 +289,11 @@ int MPI_Waitall(int n, MPI_Request *request, MPI_Status *status)
int MPI_Waitany(int count, MPI_Request *request, int *index,
                MPI_Status *status)
{
  static int callcount=0;
  if (callcount == 0) {
    printf("MPI Stub WARNING: Should not wait on message from self\n");
    ++callcount;
  }
  return 0;
}

@@ -272,7 +304,11 @@ int MPI_Sendrecv(const void *sbuf, int scount, MPI_Datatype sdatatype,
                 MPI_Datatype rdatatype, int source, int rtag,
                 MPI_Comm comm, MPI_Status *status)
{
  static int callcount=0;
  if (callcount == 0) {
    printf("MPI Stub WARNING: Should not send message to self\n");
    ++callcount;
  }
  return 0;
}

@@ -280,7 +316,11 @@ int MPI_Sendrecv(const void *sbuf, int scount, MPI_Datatype sdatatype,

int MPI_Get_count(MPI_Status *status, MPI_Datatype datatype, int *count)
{
  static int callcount=0;
  if (callcount == 0) {
    printf("MPI Stub WARNING: Should not get count of message to self\n");
    ++callcount;
  }
  return 0;
}