#include #include #include #include #include "H5Part.h" #ifdef PARALLEL_IO /* This regression test is used to ensure parallel I/O is working correctly and that Views are working for parallel reads. */ int main(int argc,char *argv[]){ const int sz=5000; double *x,*y,*z; h5part_int64_t *id; char name[64]; H5PartFile *file; int i,t,nt,nds; int nprocs,myproc; hid_t gid; MPI_Comm comm=MPI_COMM_WORLD; MPI_Init(&argc,&argv); MPI_Comm_size(comm,&nprocs); MPI_Comm_rank(comm,&myproc); x=(double*)malloc(sz*nprocs*sizeof(double)); y=(double*)malloc(sz*nprocs*sizeof(double)); z=(double*)malloc(sz*nprocs*sizeof(double)); id=(h5part_int64_t*)malloc(sz*nprocs*sizeof(h5part_int64_t)); /* parallel file creation */ file=H5PartOpenFileParallel("parttest.h5",H5PART_WRITE,comm); if(!file) { perror("File open failed: exiting!"); exit(0); } for(t=0;t<5;t++){ MPI_Barrier(comm); for(i=0;i