Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix umpire issues : MPI_Comm cannot be safely put inside an int
authordegomme <augustin.degomme@unibas.ch>
Mon, 28 Nov 2016 13:35:21 +0000 (14:35 +0100)
committerdegomme <augustin.degomme@unibas.ch>
Mon, 28 Nov 2016 13:35:21 +0000 (14:35 +0100)
Fix/Ignore some warnings as well

45 files changed:
teshsuite/smpi/isp/umpire/CMakeLists.txt
teshsuite/smpi/isp/umpire/any_src-wait-deadlock2.c
teshsuite/smpi/isp/umpire/bcast-deadlock.c
teshsuite/smpi/isp/umpire/change-send-buffer-exhaustive.c
teshsuite/smpi/isp/umpire/change-send-buffer-type-exhaustive.c
teshsuite/smpi/isp/umpire/change-send-buffer.c
teshsuite/smpi/isp/umpire/collective-misorder-allreduce.c
teshsuite/smpi/isp/umpire/collective-misorder.c
teshsuite/smpi/isp/umpire/collective-misorder2.c
teshsuite/smpi/isp/umpire/comm-bcast-deadlock.c
teshsuite/smpi/isp/umpire/comm-deadlock.c
teshsuite/smpi/isp/umpire/comm-dup-no-free.c
teshsuite/smpi/isp/umpire/comm-simple.c
teshsuite/smpi/isp/umpire/comm-split-no-free.c
teshsuite/smpi/isp/umpire/comm-translate-ranks.c
teshsuite/smpi/isp/umpire/deadlock-config.c
teshsuite/smpi/isp/umpire/errhandler-no-error.c
teshsuite/smpi/isp/umpire/errhandler-no-free.c
teshsuite/smpi/isp/umpire/group-no-error-exhaustive.c
teshsuite/smpi/isp/umpire/group-no-free-exhaustive.c
teshsuite/smpi/isp/umpire/hello.c
teshsuite/smpi/isp/umpire/lost-request-waitall.c
teshsuite/smpi/isp/umpire/no-error-interleaved-isend.c
teshsuite/smpi/isp/umpire/no-error-persistent-all-completions.c
teshsuite/smpi/isp/umpire/no-error-persistent-test.c
teshsuite/smpi/isp/umpire/no-error-persistent-testpartial.c
teshsuite/smpi/isp/umpire/no-error-persistent-waitpartial.c
teshsuite/smpi/isp/umpire/no-error-persistent.c
teshsuite/smpi/isp/umpire/no-error-vector-isend.c
teshsuite/smpi/isp/umpire/op-no-error.c
teshsuite/smpi/isp/umpire/op-no-free.c
teshsuite/smpi/isp/umpire/partial-recv-exhaustive.c
teshsuite/smpi/isp/umpire/partial-recv-persistent.c
teshsuite/smpi/isp/umpire/partial-recv-persistent2.c
teshsuite/smpi/isp/umpire/partial-recv-persistent3.c
teshsuite/smpi/isp/umpire/partial-recv-persistent4.c
teshsuite/smpi/isp/umpire/partial-recv.c
teshsuite/smpi/isp/umpire/pt2pt-byte-int-mismatch.c
teshsuite/smpi/isp/umpire/remote_group-no-error.c
teshsuite/smpi/isp/umpire/type-commit-twice.c
teshsuite/smpi/isp/umpire/type-no-error-exhaustive-with-isends.c
teshsuite/smpi/isp/umpire/type-no-error-exhaustive.c
teshsuite/smpi/isp/umpire/type-no-error.c
teshsuite/smpi/isp/umpire/type-no-free-exhaustive.c
teshsuite/smpi/isp/umpire/type-no-free.c

index 3eda492..d881695 100644 (file)
@@ -208,7 +208,7 @@ if(enable_smpi AND enable_model-checking AND enable_smpi_ISP_testsuite)
   foreach (test ${umpire_tests_passing} ${umpire_tests_deadlock} ${umpire_tests_problematic} )
     add_executable(${test} ${test}.c)
     target_link_libraries(${test} simgrid)
-    set_source_files_properties(${test}.c PROPERTIES COMPILE_FLAGS "-Wno-error")
+    set_source_files_properties(${test}.c PROPERTIES COMPILE_FLAGS "-Wno-error -Wno-return-type")
     set(umpire_tesh ${umpire_tesh} ${test})
     set(files_to_clean ${files_to_clean} ${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh)
   endforeach(test)
index 40d3ccd..e3503a1 100644 (file)
@@ -40,7 +40,7 @@ main (int argc, char **argv)
 
       MPI_Irecv (buf1, buf_size, MPI_INT, 
                 MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
-      printf("Proc 0:  Request number - %d\n",req);
+      printf("Proc 0:  Request number - %p\n",req);
       
       MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
        
@@ -49,7 +49,7 @@ main (int argc, char **argv)
       MPI_Send (buf0, buf_size, MPI_INT, 1, 0, MPI_COMM_WORLD);
 
       MPI_Wait (&req, &status);
-      printf("Proc 0:  Request number after wait test- %d\n",req);
+      printf("Proc 0:  Request number after wait test- %p\n",req);
     }
   else if (rank == 1)
     {
@@ -57,7 +57,7 @@ main (int argc, char **argv)
 
       MPI_Irecv (buf1, buf_size, MPI_INT, 
                 MPI_ANY_SOURCE, 0, MPI_COMM_WORLD, &req);
-      printf("Proc 1:  Request number - %d\n",req);
+      printf("Proc 1:  Request number - %p\n",req);
 
       MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
 
@@ -66,7 +66,7 @@ main (int argc, char **argv)
       MPI_Send (buf1, buf_size, MPI_INT, 0, 0, MPI_COMM_WORLD);
 
       MPI_Wait (&req, &status);
-      printf("Proc 1:  Request number after wait test- %d\n",req);
+      printf("Proc 1:  Request number after wait test- %p\n",req);
     }
 
   MPI_Barrier (MPI_COMM_WORLD);
index eb1d7ba..6798490 100644 (file)
@@ -10,7 +10,7 @@ int
 main (int argc, char **argv)
 {
   int rank;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int buf0[buf_size];
index 3b1945d..661ba0a 100644 (file)
@@ -24,7 +24,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int bbuf[(BUF_SIZE + MPI_BSEND_OVERHEAD) * 2 * NUM_BSEND_TYPES];
index 06735db..f95139a 100644 (file)
@@ -52,7 +52,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int i, j, k, basic_extent;
index 5a85ace..4d21ed5 100644 (file)
@@ -18,7 +18,7 @@ main (int argc, char **argv)
   int rank = -1;
   int tag1 = 0;
   int tag2 = 0;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int buf0[128];
index 5611247..66d774b 100644 (file)
@@ -18,7 +18,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int sbuf[buf_size];
index b5e0b5b..4cade73 100644 (file)
@@ -18,7 +18,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int buf0[buf_size];
index 403c493..a6da78d 100644 (file)
@@ -18,7 +18,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int buf0[buf_size];
index 8c1b86c..342e3b0 100644 (file)
@@ -17,7 +17,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   MPI_Comm inverted_comm;
index dcc2289..30b297e 100644 (file)
@@ -17,7 +17,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   MPI_Comm nc1;
index b497948..2042d21 100644 (file)
@@ -19,7 +19,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   MPI_Comm newcomm;
index 274769a..d5946a7 100644 (file)
@@ -17,7 +17,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   MPI_Comm newcomm;
@@ -45,7 +45,7 @@ main (int argc, char **argv)
 
     MPI_Comm_size (newcomm, &nsize);
     MPI_Comm_rank (newcomm, &nrank);
-    printf ("world task %d/%d/%d maps to new comm task %d/%d/%d\n",
+    printf ("world task %p/%d/%d maps to new comm task %p/%d/%d\n",
            comm, nprocs, rank, newcomm, nsize, nrank);
 
     if (nrank == 0)
@@ -55,7 +55,7 @@ main (int argc, char **argv)
 
     MPI_Bcast (&dat, 1, MPI_INT, 0, newcomm);
 
-    printf ("world task %d/%d/%d maps to new comm task %d/%d/%d --> %d\n",
+    printf ("world task %p/%d/%d maps to new comm task %p/%d/%d --> %d\n",
            comm, nprocs, rank, newcomm, nsize, nrank, dat);
   }
 
index cd9fb8a..bfcaaa5 100644 (file)
@@ -17,7 +17,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   MPI_Comm newcomm;
index f3d09bd..c6e54ca 100644 (file)
@@ -17,7 +17,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   MPI_Comm newcomm;
@@ -45,7 +45,7 @@ main (int argc, char **argv)
 
     MPI_Comm_size (newcomm, &nsize);
     MPI_Comm_rank (newcomm, &nrank);
-    printf ("world task %d/%d/%d maps to new comm task %d/%d/%d\n",
+    printf ("world task %p/%d/%d maps to new comm task %p/%d/%d\n",
            comm, nprocs, rank, newcomm, nsize, nrank);
   }
 
index 0b9b410..497c9d3 100644 (file)
@@ -5,6 +5,7 @@
 
 #define buf_size 32000
 
+int
 main (int argc, char **argv)
 {
   int nprocs = -1;
index fdb3053..10239d4 100644 (file)
@@ -41,7 +41,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   int i;
   char processor_name[128];
   int namelen = 128;
index 3870ad5..2d55368 100644 (file)
@@ -41,7 +41,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   int i;
   char processor_name[128];
   int namelen = 128;
index a2bdbd3..01e7b75 100644 (file)
@@ -22,7 +22,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int i;
index be2f596..d2c9a74 100644 (file)
@@ -22,7 +22,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int i;
index fa0e706..20832d3 100644 (file)
    hello.c -- simple hello world app
 
  */
-
+#include <stdio.h>
 #ifndef lint
 static char *rcsid = "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/hello.c,v 1.2 2000/12/04 19:09:46 bronis Exp $";
 #endif
 
 #include "mpi.h"
 
+int
 main (int argc, char **argv)
 {
   int nprocs = -1;
index cf7da83..4a6051b 100644 (file)
@@ -14,7 +14,7 @@ static char *rcsid =
 
 #define buf_size 128
 
-mydelay ()                     /* about 6 seconds */
+int mydelay ()                 /* about 6 seconds */
 {
   int i;
   int val;
@@ -32,7 +32,7 @@ main (int argc, char **argv)
   int rank = -1;
   int tag1 = 31;
   int tag2 = 32;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int buf0[buf_size];
index 762ce39..e40a9c4 100644 (file)
@@ -19,7 +19,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int buf[buf_size];
index 03267e3..eb77c9c 100644 (file)
@@ -20,7 +20,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int buf[BUF_SIZE * 2];
index 1fac72d..930178c 100644 (file)
@@ -19,7 +19,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int buf[BUF_SIZE * 2];
index 9f0323e..fd2a82e 100644 (file)
@@ -19,7 +19,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int buf[BUF_SIZE * 2];
index d64207b..1ff4276 100644 (file)
@@ -19,7 +19,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int buf[BUF_SIZE * 2];
index 10f502d..8b157b3 100644 (file)
@@ -19,7 +19,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int buf[BUF_SIZE * 2];
index e217177..0c1fc09 100644 (file)
@@ -19,7 +19,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int buf[buf_size];
index 1cf7bb7..6f4cf31 100644 (file)
@@ -44,7 +44,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   int i;
   char processor_name[128];
   int namelen = 128;
index 21cd5ae..f611504 100644 (file)
@@ -44,7 +44,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   int i;
   char processor_name[128];
   int namelen = 128;
index f942daa..03bcddd 100644 (file)
@@ -27,7 +27,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int bbuf[(BUF_SIZE + MPI_BSEND_OVERHEAD) * 2 * NUM_BSEND_TYPES];
index c97dfb5..81fbd8a 100644 (file)
@@ -21,7 +21,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int buf[BUF_SIZE * 2 + SLOP];
index 25786ea..336da22 100644 (file)
@@ -21,7 +21,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int buf[BUF_SIZE * 2 + SLOP];
index 547ace9..ef15c1c 100644 (file)
@@ -21,7 +21,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int buf[BUF_SIZE * 2 + SLOP];
index d63c5b5..1a7f292 100644 (file)
@@ -21,7 +21,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int buf[BUF_SIZE * 2 + SLOP];
index 669021d..59835fb 100644 (file)
@@ -39,11 +39,13 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
-  int i, basic_extent;
-  int blocklens[3], displs[3];
+  int i;
+  MPI_Aint basic_extent;
+  int blocklens[3];
+  MPI_Aint displs[3];
   MPI_Datatype structtypes[3]; 
   MPI_Datatype newtype[2]; 
   MPI_Request aReq[2];
@@ -79,13 +81,13 @@ main (int argc, char **argv)
   
   MPI_Type_extent (newtype[0], &basic_extent);
   if (basic_extent != sizeof (test_small_struct_t)) {
-    fprintf (stderr, "(%d): Unexpected extent for small struct\n");
+    fprintf (stderr, "(%d): Unexpected extent for small struct\n", rank);
     MPI_Abort (MPI_COMM_WORLD, 666);
   }
   
   MPI_Type_extent (newtype[1], &basic_extent);
   if (basic_extent != sizeof (test_big_struct_t)) {
-    fprintf (stderr, "(%d): Unexpected extent for big struct\n");
+    fprintf (stderr, "(%d): Unexpected extent for big struct\n", rank);
     MPI_Abort (MPI_COMM_WORLD, 666);
   }
 
index 36c71f5..13fbd55 100644 (file)
@@ -26,7 +26,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int bbuf[(BUF_SIZE + MPI_BSEND_OVERHEAD) * 2 * NUM_BSEND_TYPES];
index 0b01269..a93eff6 100644 (file)
@@ -21,7 +21,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int i;
index 4d25326..76debc3 100644 (file)
@@ -19,7 +19,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   MPI_Datatype newtype;
index b2ceace..8826ce2 100644 (file)
@@ -54,7 +54,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int i, j, k, basic_extent;
index 22e2eb2..6515ea2 100644 (file)
@@ -20,7 +20,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int i;
index 2cac143..35333a1 100644 (file)
@@ -19,7 +19,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   MPI_Datatype newtype, newtype2;
index a321842..7cd7c0c 100644 (file)
@@ -20,7 +20,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   int i;
index 19abfd9..f8dab6e 100644 (file)
@@ -19,7 +19,7 @@ main (int argc, char **argv)
 {
   int nprocs = -1;
   int rank = -1;
-  int comm = MPI_COMM_WORLD;
+  MPI_Comm comm = MPI_COMM_WORLD;
   char processor_name[128];
   int namelen = 128;
   MPI_Datatype newtype;