]> AND Public Git Repository - simgrid.git/blobdiff - examples/smpi/reduce.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add msg-pmm to the list of tests to run, and fill up pmm.tesh.
[simgrid.git] / examples / smpi / reduce.c
index bd4e151f2422f8934e1592fea06f3055ffc9d878..2946edc930724128f7484ca767fb0864882dabad 100644 (file)
@@ -43,8 +43,8 @@ static int ibm_test(int rank, int size)
     if (rank == root) {
       for (k = 0; k < j; k++) {
         if (in[k] != k * size) {
-          printf("bad answer (%d) at index %d of %d (should be %d)", in[k], k,
-                 j, k * size);
+          printf("bad answer (%d) at index %d of %d (should be %d)", in[k],
+                 k, j, k * size);
           success = 0;
           break;
         }
@@ -81,7 +81,8 @@ int main(int argc, char **argv)
 
   //printf("[%d] has value %d\n", rank, value);
   MPI_Reduce(&value, &sum, 1, MPI_INT, MPI_SUM, root, MPI_COMM_WORLD);
-  MPI_Reduce(&value, &sum_mirror, 1, MPI_INT, MPI_SUM, root, MPI_COMM_WORLD);
+  MPI_Reduce(&value, &sum_mirror, 1, MPI_INT, MPI_SUM, root,
+             MPI_COMM_WORLD);
 
   MPI_Reduce(&value, &min, 1, MPI_INT, MPI_MIN, root, MPI_COMM_WORLD);
   MPI_Reduce(&value, &max, 1, MPI_INT, MPI_MAX, root, MPI_COMM_WORLD);