PPT Slide
int *mpi_io_ptr;
int io_rank;
int flag;
MPI_Attr_get(MPI_COMM_WORLD,MPI_IO, &mpi_io_ptr, &flag);
if (flag == 0) {
/* attribute not cached */
io_rank = MPI_PROC_NULL;
} else if (*mpi_io_ptr == MPI_PROC_NULL) {
io_rank = MPI_PROC_NULL;
} else if (*mpi_io_ptr == MPI_ANY_SOURCE) {
io_rank = 0;
} else {
MPI_Allreduce(mpi_io_ptr,&io_rank,1,MPI_INT,MPI_MIN,MPI_COMM_WORLD);
}
Previous slide
Back to first slide
View graphic version