/* example of sequential Unix write into a common file */ #include "mpi.h" #include #define BUFSIZE 100 int main(int argc, char *argv[]) { int i, myrank, numprocs, buf[BUFSIZE]; MPI_Status status; FILE *myfile; MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &myrank); MPI_Comm_size(MPI_COMM_WORLD, &numprocs); for (i=0; i