/* example of parallel MPI write into a single file */ #include "mpi.h" #include #define BUFSIZE 100 int main(int argc, char *argv[]) { int i, myrank, buf[BUFSIZE]; MPI_File thefile; MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &myrank); for (i=0; i