Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix printf statements.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 28 Nov 2012 22:40:35 +0000 (23:40 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 28 Nov 2012 22:40:35 +0000 (23:40 +0100)
teshsuite/smpi/mpich-test/pt2pt/structlb.c
teshsuite/smpi/mpich-test/pt2pt/testtypes.c
teshsuite/smpi/mpich-test/pt2pt/typelb.c

index a28d295..4e54094 100644 (file)
@@ -23,8 +23,8 @@ int main( int argc, char **argv)
     MPI_Type_ub(tmptype, &ub);
     MPI_Type_extent(tmptype, &extent);
 #ifdef DEBUG
-    printf("tmptype: size: %d lb: %ld ub: %ld ex: %ld\n", size, lb, ub, 
-          extent);
+    printf("tmptype: size: %d lb: %ld ub: %ld ex: %ld\n",
+           size, (long)lb, (long)ub, (long)extent);
 #endif
        
     blockcnt[0] = 1;
@@ -38,13 +38,13 @@ int main( int argc, char **argv)
     MPI_Type_ub(newtype, &ub);
     MPI_Type_extent(newtype, &extent);
 #ifdef DEBUG
-    printf("newtype: size: %ld lb: %ld ub: %ld ex: %d\n", size, lb, ub, 
-          extent);
+    printf("newtype: size: %d lb: %ld ub: %ld ex: %ld\n",
+           size, (long)lb, (long)ub, (long)extent);
 #endif 
     if (size != 1 || lb != 2 || ub != 3 || extent != 1) {
-           printf ("lb = %ld (should be 2), ub = %ld (should be 3) extent = %ld should be 1, size = %d (should be 1)\n", lb, ub, extent, size) ;
-    }
-    else {
+        printf("lb = %ld (should be 2), ub = %ld (should be 3) extent = %ld should be 1, size = %d (should be 1)\n",
+               (long)lb, (long)ub, (long)extent, size);
+    else {
        printf( " No Errors\n" );
     }
     MPI_Type_free(&tmptype);
index be04181..c87788e 100644 (file)
@@ -11,21 +11,21 @@ int main( int argc, char **argv )
 
 
   MPI_Type_extent(MPI_INT, &i_extent);
-  printf("MPI_Type_extent (MPI_INT) = %ld\n", i_extent);
+  printf("MPI_Type_extent (MPI_INT) = %ld\n", (long)i_extent);
 
   MPI_Type_size(MPI_INT, &i_size);
   printf("MPI_Type_size (MPI_INT) = %d\n", i_size);
 
 
   MPI_Type_extent(MPI_UNSIGNED, &i_extent);
-  printf("MPI_Type_extent (MPI_UNSIGNED) = %ld\n", i_extent);
+  printf("MPI_Type_extent (MPI_UNSIGNED) = %ld\n", (long)i_extent);
 
   MPI_Type_size(MPI_UNSIGNED, &i_size);
   printf("MPI_Type_size (MPI_UNSIGNED) = %d\n", i_size);
 
 #if defined(HAVE_LONG_DOUBLE)
   MPI_Type_extent(MPI_LONG_DOUBLE, &i_extent);
-  printf("MPI_Type_extent (MPI_LONG_DOUBLE) = %ld\n", i_extent);
+  printf("MPI_Type_extent (MPI_LONG_DOUBLE) = %ld\n", (long)i_extent);
 
   MPI_Type_size(MPI_LONG_DOUBLE, &i_size);
   printf("MPI_Type_size (MPI_LONG_DOUBLE) = %d\n", i_size);
index 1da6964..edcb2bb 100644 (file)
@@ -26,13 +26,14 @@ main( int argc, char **argv)
        
        /* Check that the results are correct */
 #ifdef DEBUG
-       printf("lb=%ld, ub=%ld, extent=%ld\n", lb, ub, extent);
+       printf("lb=%ld, ub=%ld, extent=%ld\n",
+               (long)lb, (long)ub, (long)extent);
        printf("Should be lb=4, ub=5, extent=1\n");
 #endif
        if (lb != 4 || ub != 5 || extent != 1) {
-           printf ("lb = %ld (should be 4), ub = %ld (should be 5) extent = %ld should be 1\n", lb, ub, extent) ;
-       }
-       else {
+            printf("lb = %ld (should be 4), ub = %ld (should be 5) extent = %ld should be 1\n",
+                   (long)lb, (long)ub, (long)extent) ;
+       else {
            printf( " No Errors\n" );
        }