6 /* Since MPICH is currently the only NBC implementation in existence, just use
7 * this quick-and-dirty #ifdef to decide whether to test the nonblocking
8 * collectives. Eventually we can add a configure option or configure test, or
9 * the MPI-3 standard will be released and these can be gated on a MPI_VERSION
11 #if !defined(USE_STRICT_MPI) && defined(MPICH)
12 #define TEST_NBC_ROUTINES 1
15 int main(int argc, char *argv[])
19 int one = 1, two = 2, isum, sum;
20 MPI_Init(&argc,&argv);
21 MPI_Comm_size(MPI_COMM_WORLD, &size);
22 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
24 #if defined(TEST_NBC_ROUTINES)
25 MPI_Iallreduce(&one,&isum,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD,&request);
26 MPI_Allreduce(&two,&sum,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
27 MPI_Wait(&request,MPI_STATUS_IGNORE);
32 printf(" No errors\n");