Changeset 694
- Timestamp:
- 10/28/09 00:16:03 (4 weeks ago)
- Location:
- trunk/test/mcoll_perf
- Files:
-
- 1 added
- 4 modified
-
Makefile.in (modified) (2 diffs)
-
go (modified) (2 diffs)
-
mcoll_perf.c (modified) (1 diff)
-
single_mcoll_perf_non_record.c (added)
-
single_mcoll_perf_record.c (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/mcoll_perf/Makefile.in
r666 r694 10 10 CFLAGS = @CFLAGS@ $(INCLUDES) 11 11 12 SRCS = mcoll_perf.c single_mcoll_perf_record.c 12 SRCS = mcoll_perf.c single_mcoll_perf_record.c single_mcoll_perf_non_record.c 13 13 OBJS = $(SRCS:.c=.o) 14 PROGS = mcoll_perf single_mcoll_perf_record 14 PROGS = mcoll_perf single_mcoll_perf_record single_mcoll_perf_non_record 15 15 LDFLAGS = -L$(LIBDIR) -L../common @LDFLAGS@ 16 16 LIBS = -lpnetcdf -ltestutils @LIBS@ … … 25 25 single_mcoll_perf_record: single_mcoll_perf_record.o 26 26 $(CC) -g -o $@ $@.o $(LDFLAGS) $(LIBS) 27 single_mcoll_perf_record: single_mcoll_perf_non_record.o 28 $(CC) -g -o $@ $@.o $(LDFLAGS) $(LIBS) 27 29 28 30 clean: -
trunk/test/mcoll_perf/go
r658 r694 1 mpiexec -n 4 mcoll_perf 32 4 1 3 1 -fname /pvfs2/kgao/mvars/test1 1 mpiexec -n 4 mcoll_perf 32 4 1 3 1 -fname /pvfs2/kgao/mvars/test1 //combine multiple variable write options in one collective write 2 2 3 3 … … 19 19 ! 1: record variables 20 20 21 mpiexec -n 4 single_mcoll_perf 32 4 1 3 -fname /pvfs2/kgao/mvars/test1 21 mpiexec -n 4 single_mcoll_perf_record 32 4 1 3 -fname /pvfs2/kgao/mvars/test1 //multiple write operations of single record variable 22 mpiexec -n 4 single_mcoll_perf_non_record 32 4 1 3 -fname /pvfs2/kgao/mvars/test1 //multiple write operations of single non-record variable 22 23 23 24 argv[1] length ! global array size in X, Y and Z 24 25 array_of_gsizes[0] = array_of_gsizes[1] = array_of_gsizes[2] = length; 25 argv[2] n vars! number of write26 argv[2] ntimes ! number of write 26 27 argv[3] k_loop ! number of loop for test 27 28 argv[4] mvar_flag ! 0: original ncmpi_put_vara_all -
trunk/test/mcoll_perf/mcoll_perf.c
r691 r694 329 329 } 330 330 331 file_size = 1024+nvars*array_of_gsizes[0]*array_of_gsizes[1]*array_of_gsizes[2]*sizeof(int);332 write_bw = file_size/new_run_tim[top]/1024.0/1024.0;333 331 fprintf(stderr, "mvar nvars:%d, Global array size %d x %d x %d integers, local array size: %d x %d x%d, filesize:%d\n", nvars, array_of_gsizes[0], array_of_gsizes[1], array_of_gsizes[2],sizes[0], sizes[1], sizes[2], file_size); 334 fprintf(stderr, "%dx%dx%d, %d: nvars:%d, loop:%d, k:%d, open_t = %f, def_t =%f, write_t = %f sec,run_t = %f sec , filesize: %ld, bandwidth = %f Mbytes/sec\n", sizes[0], sizes[1], sizes[2],mvar_flag, nvars, k_loop, top, new_open_tim[top], new_def_tim[top], new_write_tim[top], new_run_tim[top],file_size, write_bw);332 fprintf(stderr, "%dx%dx%d, %d: nvars:%d, loop:%d, k:%d, open_t = %f, def_t =%f, write_t = %f sec,run_t = %f sec\n", sizes[0], sizes[1], sizes[2],mvar_flag, nvars, k_loop, top, new_open_tim[top], new_def_tim[top], new_write_tim[top], new_run_tim[top]); 335 333 } 336 334 -
trunk/test/mcoll_perf/single_mcoll_perf_record.c
r691 r694 49 49 MPI_Offset *bufcount_list; 50 50 int ndims = 3; 51 int n vars = 10;51 int ntimes = 10; 52 52 int k, k_loop; 53 53 MPI_Datatype *datatype_list; … … 63 63 array_of_gsizes[0] = array_of_gsizes[1] = array_of_gsizes[2] = length; 64 64 65 n vars = atoi(argv[2]);65 ntimes = atoi(argv[2]); 66 66 k_loop = atoi(argv[3]); 67 67 mvar_flag = atoi(argv[4]); … … 105 105 order = MPI_ORDER_C; 106 106 107 buf = (int **)malloc(n vars*sizeof(int*));107 buf = (int **)malloc(ntimes*sizeof(int*)); 108 108 if (buf == NULL){ 109 109 printf("buf malloc error\n"); 110 110 return 0; 111 111 } 112 varid = (int *)malloc(n vars*sizeof(int));112 varid = (int *)malloc(ntimes*sizeof(int)); 113 113 if (varid == NULL){ 114 114 printf("varid malloc error\n"); 115 115 return 0; 116 116 } 117 bufcount_list = (MPI_Offset *)malloc(n vars*sizeof(MPI_Offset));117 bufcount_list = (MPI_Offset *)malloc(ntimes*sizeof(MPI_Offset)); 118 118 if (bufcount_list == NULL){ 119 119 printf("bufcount_list malloc error\n"); 120 120 return 0; 121 121 } 122 starts_list = (MPI_Offset **)malloc(n vars*sizeof(MPI_Offset *));122 starts_list = (MPI_Offset **)malloc(ntimes*sizeof(MPI_Offset *)); 123 123 if (starts_list== NULL){ 124 124 printf("starts_list malloc error\n"); 125 125 return 0; 126 126 } 127 count_list = (MPI_Offset **)malloc(n vars*sizeof(MPI_Offset *));127 count_list = (MPI_Offset **)malloc(ntimes*sizeof(MPI_Offset *)); 128 128 if (count_list == NULL){ 129 129 printf("count_list malloc error\n"); 130 130 return 0; 131 131 } 132 datatype_list = (MPI_Datatype*)malloc(n vars*sizeof(MPI_Datatype));132 datatype_list = (MPI_Datatype*)malloc(ntimes*sizeof(MPI_Datatype)); 133 133 if (datatype_list == NULL){ 134 134 printf("count_list malloc error\n"); … … 136 136 } 137 137 138 array_of_requests = (NCMPI_Request *)malloc(n vars*sizeof(struct NCMPI_Req));138 array_of_requests = (NCMPI_Request *)malloc(ntimes*sizeof(struct NCMPI_Req)); 139 139 140 140 new_open_tim = (double *)malloc(k_loop*sizeof(double)); … … 159 159 } 160 160 161 for (i=0; i<n vars; i++) {161 for (i=0; i<ntimes; i++) { 162 162 starts_list[i] = (MPI_Offset *)malloc(ndims*sizeof(MPI_Offset)); 163 163 if (starts_list[i] == NULL){ … … 203 203 204 204 /* mput */ 205 for (i=0; i<n vars; i++) {205 for (i=0; i<ntimes; i++) { 206 206 starts_list[i][0] = array_of_starts[0]+i*array_of_gsizes[0]; 207 207 count_list[i][0] = length; … … 215 215 216 216 srand(mynod+1); 217 for(i=0; i<n vars;i++){217 for(i=0; i<ntimes;i++){ 218 218 buf[i] = (int *) malloc(bufcount * sizeof(int)); 219 219 if (buf[i] == NULL){ … … 234 234 235 235 for (k=0; k<k_loop; k++){ 236 sprintf(filename, "%s.%d.%d.%d.%d.nc", pathname, length, n vars, mvar_flag, k);236 sprintf(filename, "%s.%d.%d.%d.%d.nc", pathname, length, ntimes, mvar_flag, k); 237 237 MPI_Barrier(MPI_COMM_WORLD); 238 238 start_time = MPI_Wtime(); … … 250 250 sprintf(varname, "var_%d", 0); 251 251 ncmpi_def_var(ncid, varname, NC_INT, ndims, dimids, &varid[0]); 252 for (i=1; i<n vars; i++){252 for (i=1; i<ntimes; i++){ 253 253 varid[i]=varid[0]; 254 254 } … … 264 264 them */ 265 265 if (mvar_flag == 0) { 266 for (i=0; i<n vars; i++){266 for (i=0; i<ntimes; i++){ 267 267 status = ncmpi_put_vara_all(ncid, varid[i], 268 268 starts_list[i], count_list[i], … … 272 272 } 273 273 if (mvar_flag == 1) { 274 // status = ncmpi_put_mvara_all(ncid, n vars, varid,275 status = ncmpi_put_mvara_all(ncid, n vars, varid,274 // status = ncmpi_put_mvara_all(ncid, ntimes, varid, 275 status = ncmpi_put_mvara_all(ncid, ntimes, varid, 276 276 starts_list, count_list, 277 277 (void **)buf, bufcount_list, datatype_list); … … 279 279 } 280 280 if (mvar_flag == 2) { 281 for (i=0; i<n vars; i++){281 for (i=0; i<ntimes; i++){ 282 282 status = ncmpi_iput_vara_all(ncid, varid[i], 283 283 starts_list[i], count_list[i], … … 288 288 } 289 289 if (mvar_flag == 3) { 290 for (i=0; i<n vars; i++){290 for (i=0; i<ntimes; i++){ 291 291 status = ncmpi_iput_vara_all(ncid, varid[i], 292 292 starts_list[i], count_list[i], … … 294 294 TEST_HANDLE_ERR(status); 295 295 } 296 ncmpi_waitall(n vars, array_of_requests);296 ncmpi_waitall(ntimes, array_of_requests); 297 297 } 298 298 … … 321 321 } 322 322 323 file_size = 1024+nvars*array_of_gsizes[0]*array_of_gsizes[1]*array_of_gsizes[2]*sizeof(int); 324 write_bw = file_size/new_run_tim[top]/1024.0/1024.0; 325 fprintf(stderr, "mvar nvars:%d, Global array size %d x %d x %d integers, local array size: %d x %d x%d, filesize:%d\n", nvars, array_of_gsizes[0], array_of_gsizes[1], array_of_gsizes[2],sizes[0], sizes[1], sizes[2], file_size); 326 fprintf(stderr, "%dx%dx%d, %d: nvars:%d, loop:%d, k:%d, open_t = %f, def_t =%f, write_t = %f sec,run_t = %f sec, filesize: %ld, bandwidth = %f Mbytes/sec\n", sizes[0], sizes[1], sizes[2],mvar_flag, nvars, k_loop, top, new_open_tim[top], new_def_tim[top], new_write_tim[top], new_run_tim[top],file_size, write_bw); 327 } 328 323 fprintf(stderr, "one record variable ntimes:%d, Global array size (%d x %d) x %d x %d integers, local array size: %d x %d x%d, filesize:%d\n", ntimes, array_of_gsizes[0], ntimes, array_of_gsizes[1], array_of_gsizes[2],sizes[0], sizes[1], sizes[2], file_size); 324 fprintf(stderr, "%dx%dx%d, %d: ntimes:%d, loop:%d, k:%d, open_t = %f, def_t =%f, write_t = %f sec,run_t = %f sec\n", sizes[0], sizes[1], sizes[2],mvar_flag, ntimes, k_loop, top, new_open_tim[top], new_def_tim[top], new_write_tim[top], new_run_tim[top]); 325 } 326 327 329 328 /* 330 329 int nkeys; … … 353 352 free(new_run_tim); 354 353 355 for (i=0; i<n vars; i++){354 for (i=0; i<ntimes; i++){ 356 355 free(buf[i]); 357 356 free(starts_list[i]);
![(please configure the [header_logo] section in trac.ini)](/projects/parallel-netcdf/chrome/common/trac_banner.png)