Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
first commit to add the mpich-test suite to smpi tesh suite. Obviously all tests...
[simgrid.git] / teshsuite / smpi / mpich-test / coll / redtst.c
1 #include "mpi.h"
2 #include <stdio.h>
3 #include "test.h"
4
5 int main( int argc, char **argv )
6 {
7   int rank, value, result;
8
9   MPI_Init (&argc, &argv);
10   MPI_Comm_rank (MPI_COMM_WORLD, &rank);
11
12   value = (rank == 0) ? 3 : 6;
13   MPI_Allreduce (&value, &result, 1, MPI_INT, MPI_BOR, MPI_COMM_WORLD);
14   if (rank == 0) printf ("Result of 3 BOR 6 is %d, result of 3|6 is %d\n", 
15                          result, 3|6);
16
17   Test_Waitforall( );
18   MPI_Finalize ();
19
20   return 0;
21 }