#include <stdio.h>
#include <mpi.h>
-/* USE_STRICT_MPI may be defined in mpitestconf.h */
#include "mpitestconf.h"
int main(int argc, char **argv)
{
- int rank, size;
+ int rank, size, i;
MPI_Group full_group, half_group;
int range[1][3];
- MPI_Comm __attribute__((unused)) comm;
+ MPI_Comm comm;
MPI_Init(NULL, NULL);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
range[0][2] = 1;
MPI_Group_range_incl(full_group, 1, range, &half_group);
-#if !defined(USE_STRICT_MPI) && defined(MPICH)
if (rank <= size / 2) {
MPI_Comm_create_group(MPI_COMM_WORLD, half_group, 0, &comm);
MPI_Barrier(comm);
MPI_Comm_free(&comm);
}
-#endif /* USE_STRICT_MPI */
MPI_Group_free(&half_group);
MPI_Group_free(&full_group);