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[])
18 #if defined(TEST_NBC_ROUTINES)
20 int one = 1, two = 2, isum, sum;
22 MPI_Init(&argc,&argv);
23 MPI_Comm_size(MPI_COMM_WORLD, &size);
24 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
26 #if defined(TEST_NBC_ROUTINES)
27 MPI_Iallreduce(&one,&isum,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD,&request);
28 MPI_Allreduce(&two,&sum,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
29 MPI_Wait(&request,MPI_STATUS_IGNORE);
34 printf(" No errors\n");