Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix a bug in concurrent modif of a collection that was revealed by GLIBCXX_DEBUG
[simgrid.git] / teshsuite / smpi / mpich3-test / pt2pt / scancel.c
index 23e1bb464c6eedcd12467cb11e9758b5b110fe79..0c3e3aa5258f1a88b7264c147c534f4aaa6cb460 100644 (file)
@@ -7,6 +7,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "mpitest.h"
+#include "xbt/log.h"
 
 /*
 static char MTEST_Descrip[] = "Test of various send cancel calls";
@@ -15,7 +16,7 @@ static char MTEST_Descrip[] = "Test of various send cancel calls";
 int main(int argc, char *argv[])
 {
     int errs = 0;
-    int rank, size, source, dest;
+    int rank, size, dest;
     MPI_Comm comm;
     MPI_Status status;
     MPI_Request req;
@@ -28,12 +29,12 @@ int main(int argc, char *argv[])
     int cs, flag, n;
 
     MTest_Init(&argc, &argv);
+    xbt_log_control_set("smpi_kernel.thr:critical");
 
     comm = MPI_COMM_WORLD;
     MPI_Comm_rank(comm, &rank);
     MPI_Comm_size(comm, &size);
 
-    source = 0;
     dest = size - 1;
 
     MTestPrintfMsg(1, "Starting scancel test\n");
@@ -83,7 +84,7 @@ int main(int argc, char *argv[])
             }
         }
         MPI_Barrier(comm);
-
+#ifdef TEST_IRSEND
         if (rank == 0) {
             char *bsendbuf;
             int bsendbufsize;
@@ -143,7 +144,7 @@ int main(int argc, char *argv[])
 
         /* Because this test is erroneous, we do not perform it unless
          * TEST_IRSEND is defined.  */
-#ifdef TEST_IRSEND
+
         /* We avoid ready send to self because an implementation
          * is free to detect the error in delivering a message to
          * itself without a pending receive; we could also check