#include #include #include #include /* #include */ #include #include #ifndef PARALLEL_IO #define PARALLEL_IO #endif #ifndef DISABLE_H5PART #include "H5hut.h" #endif #define FILENAME "testio" /* normally 64 steps for real benchmark */ /* #define NSTEPS 5 */ /* normally 51e6 for real benchmark */ #define NPARTICLES 51e4 #define NTRIALS 3 /* bench */ int main(int argc,char *argv[]){ if (argc < 3) { printf("Usage: bench \n"); exit(-1); } else { printf("nparticles: %d, nsteps: %d \n", atoi(argv[1]), atoi(argv[2])); } MPI_Info info; int nprocs,rank; int trial; int i,j,n; /* iteration variables */ double starttime,curtime, endtime; int nparticles = atoi(argv[1]); int nsteps = atoi(argv[2]); double *x,*y,*z,*px,*py,*pz; typedef double *ddouble; ddouble data[6]; MPI_Datatype chunktype; int offset; int localnp; char filename[128]; /*= FILENAME; */ #ifndef DISABLE_H5PART h5_file_t *f; #endif char newfilename[128]; FILE *fd; MPI_File file; MPI_Offset foffset; MPI_Comm dcomm = MPI_COMM_WORLD; MPI_Init(&argc,&argv); MPI_Comm_rank(dcomm,&rank); MPI_Comm_size(dcomm,&nprocs); localnp=nparticles/(int64_t)nprocs; for(offset=0,i=0;i