43 int nproc = mpi->
nproc;
48 if (nproc%N_IORanks==0) GroupSize = nproc/N_IORanks;
51 printf(
"Note: in MPICreateIOGroups() - Number of ");
52 printf(
"ranks (nproc) is not divisible by number ");
53 printf(
"of IO ranks (N_IORanks). Readjusting number ");
54 printf(
"of IO ranks to fix this.\n");
58 printf(
"Number of IO Ranks: %d\n",N_IORanks);
76 MPI_Group WorldGroup, IOGroup;
77 FileIORanks = (
int*) calloc (N_IORanks,
sizeof(
int));
78 for (i=0; i<N_IORanks; i++) FileIORanks[i] = i*GroupSize;
79 MPI_Comm_group(mpi->
world,&WorldGroup);
80 MPI_Group_incl(WorldGroup,N_IORanks,FileIORanks,&IOGroup);
82 MPI_Group_free(&IOGroup);
83 MPI_Group_free(&WorldGroup);
MPI related function definitions.
int MPICreateIOGroups(void *m)
Structure of MPI-related variables.