diff --git a/test/Bench.c b/test/Bench.c index b0df5a4..1b8d9ab 100644 --- a/test/Bench.c +++ b/test/Bench.c @@ -15,21 +15,29 @@ #define FILENAME "testio" /* normally 64 steps for real benchmark */ -#define NSTEPS 5 +/* #define NSTEPS 5 */ + /* normally 51e6 for real benchmark */ #define NPARTICLES 51e4 #define NTRIALS 3 /* -bench - +bench */ int main(int argc,char *argv[]){ - printf("Start benchmarks...\n"); + + 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; @@ -37,6 +45,7 @@ int main(int argc,char *argv[]){ double starttime,curtime, endtime; int nparticles = atoi(argv[1]); + int nsteps = atoi(argv[2]); double *x,*y,*z,*px,*py,*pz; typedef double *ddouble; @@ -49,7 +58,6 @@ int main(int argc,char *argv[]){ H5PartFile *f; #endif char newfilename[128]; - char lastfilename[128]; FILE *fd; MPI_File file; MPI_Offset foffset; @@ -72,8 +80,6 @@ int main(int argc,char *argv[]){ data[4]=py=(double*)malloc(sizeof(double)*(size_t)localnp); data[5]=pz=(double*)malloc(sizeof(double)*(size_t)localnp); - - /* printf("about to call create subarray with nparticles=%u localnp=%u offset=%u\n", nparticles,localnp,offset); */ @@ -86,9 +92,10 @@ int main(int argc,char *argv[]){ &chunktype); MPI_Type_commit(&chunktype); MPI_Info_create(&info); + MPI_Info_set(info, "IBM_largeblock_io", "true" ); if(rank==0) printf("Nprocs=%u Particles=%u*6attribs*sizeof(double) Particles/proc=%u Nsteps=%u Ntrials=%u\n", - nprocs,nparticles,localnp,NSTEPS,NTRIALS); + nprocs,nparticles,localnp,nsteps,NTRIALS); for(trial=0;trial