diff options
Diffstat (limited to 'tools/test/perform')
-rw-r--r-- | tools/test/perform/direct_write_perf.c | 86 | ||||
-rw-r--r-- | tools/test/perform/overhead.c | 6 | ||||
-rw-r--r-- | tools/test/perform/pio_perf.c | 2 | ||||
-rw-r--r-- | tools/test/perform/sio_engine.c | 2 |
4 files changed, 48 insertions, 48 deletions
diff --git a/tools/test/perform/direct_write_perf.c b/tools/test/perform/direct_write_perf.c index f13cd24..20b7237 100644 --- a/tools/test/perform/direct_write_perf.c +++ b/tools/test/perform/direct_write_perf.c @@ -75,7 +75,7 @@ const char *FILENAME[] = { #define NX 100 #define NY 1000 #define NZ 250 -#define CHUNK_NX 1 +#define CHUNK_NX 1 #define CHUNK_NY 1000 #define CHUNK_NZ 250 @@ -108,7 +108,7 @@ void reportTime(struct timeval start, double mbytes) } /* end if */ /*printf("mbytes=%lf, sec=%lf, usec=%lf\n", mbytes, (double)timeval_diff.tv_sec, (double)timeval_diff.tv_usec);*/ - printf("MBytes/second: %lf\n", (double)mbytes/((double)timeval_diff.tv_sec+((double)timeval_diff.tv_usec/(double)1000000.0))); + printf("MBytes/second: %lf\n", (double)mbytes/((double)timeval_diff.tv_sec+((double)timeval_diff.tv_usec/(double)1000000.0))); } /*-------------------------------------------------- @@ -121,7 +121,7 @@ int create_file(hid_t fapl_id) hid_t fapl; hid_t cparms; hid_t dataspace, dataset; - hsize_t dims[RANK] = {NX, NY, NZ}; + hsize_t dims[RANK] = {NX, NY, NZ}; hsize_t chunk_dims[RANK] ={CHUNK_NX, CHUNK_NY, CHUNK_NZ}; unsigned int aggression = 9; /* Compression aggression setting */ int ret; @@ -198,7 +198,7 @@ int create_file(hid_t fapl_id) if(H5Dclose(dataset) < 0) TEST_ERROR; - if(H5Fclose(file) < 0) + if(H5Fclose(file) < 0) TEST_ERROR; if(H5Sclose(dataspace) < 0) @@ -223,7 +223,7 @@ int create_file(hid_t fapl_id) /* Initialize data for chunks */ for(i = 0; i < NX; i++) { p = direct_buf[i] = (unsigned int*)malloc(CHUNK_NY*CHUNK_NZ*sizeof(unsigned int)); - + for(j=0; j < CHUNK_NY*CHUNK_NZ; j++, p++) *p = rand() % 65000; @@ -267,7 +267,7 @@ error: } /*-------------------------------------------------- - * Benchmark the performance of the new function + * Benchmark the performance of the new function * with precompressed data. *-------------------------------------------------- */ @@ -283,8 +283,8 @@ test_direct_write_uncompressed_data(hid_t fapl_id) unsigned filter_mask = 0; hsize_t offset[RANK] = {0, 0, 0}; - struct timeval timeval_start; - + struct timeval timeval_start; + TESTING("H5Dwrite_chunk for uncompressed data"); if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) @@ -301,8 +301,8 @@ test_direct_write_uncompressed_data(hid_t fapl_id) TEST_ERROR; - /* Write the compressed chunk data repeatedly to cover all the chunks in the - * dataset, using the direct writing function. */ + /* Write the compressed chunk data repeatedly to cover all the chunks in the + * dataset, using the direct writing function. */ for(i=0; i<NX; i++) { status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, CHUNK_NY*CHUNK_NZ*sizeof(unsigned int), direct_buf[i]); (offset[0])++; @@ -315,8 +315,8 @@ test_direct_write_uncompressed_data(hid_t fapl_id) H5Pclose(dxpl); H5Fclose(file); - /* Report the performance */ - reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB)); + /* Report the performance */ + reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB)); PASSED(); return 0; @@ -332,7 +332,7 @@ error: /*-------------------------------------------------- - * Benchmark the performance of the new function + * Benchmark the performance of the new function * with precompressed data. *-------------------------------------------------- */ @@ -348,8 +348,8 @@ test_direct_write_compressed_data(hid_t fapl_id) unsigned filter_mask = 0; hsize_t offset[RANK] = {0, 0, 0}; - struct timeval timeval_start; - + struct timeval timeval_start; + TESTING("H5DOwrite_chunk for pre-compressed data"); if((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0) @@ -366,8 +366,8 @@ test_direct_write_compressed_data(hid_t fapl_id) TEST_ERROR; - /* Write the compressed chunk data repeatedly to cover all the chunks in the - * dataset, using the direct writing function. */ + /* Write the compressed chunk data repeatedly to cover all the chunks in the + * dataset, using the direct writing function. */ for(i=0; i<NX; i++) { status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, data_size[i], outbuf[i]); (offset[0])++; @@ -379,9 +379,9 @@ test_direct_write_compressed_data(hid_t fapl_id) H5Dclose(dataset); H5Pclose(dxpl); H5Fclose(file); - - /* Report the performance */ - reportTime(timeval_start, (double)(total_size/MB)); + + /* Report the performance */ + reportTime(timeval_start, (double)(total_size/MB)); PASSED(); return 0; @@ -416,7 +416,7 @@ test_compressed_write(hid_t fapl_id) hsize_t count[RANK]; /* Block count */ hsize_t block[RANK]; /* Block sizes */ - struct timeval timeval_start; + struct timeval timeval_start; TESTING("H5Dwrite with compression enabled"); @@ -443,14 +443,14 @@ test_compressed_write(hid_t fapl_id) stride[0] = stride[1] = stride[2] = 1; count[0] = count[1] = count[2] = 1; block[0] = CHUNK_NX; block[1] = CHUNK_NY; block[2] = CHUNK_NZ; - + for(i=0; i<NX; i++) { /* * Select hyperslab for one chunk in the file */ if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0) TEST_ERROR; - (start[0])++; + (start[0])++; if((status = H5Dwrite(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, direct_buf[i])) < 0) @@ -465,10 +465,10 @@ test_compressed_write(hid_t fapl_id) H5Sclose(mem_space); H5Pclose(dxpl); H5Fclose(file); - - /* Report the performance */ - reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB)); - + + /* Report the performance */ + reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB)); + PASSED(); return 0; @@ -504,7 +504,7 @@ test_no_compress_write(hid_t fapl_id) hsize_t count[RANK]; /* Block count */ hsize_t block[RANK]; /* Block sizes */ - struct timeval timeval_start; + struct timeval timeval_start; TESTING("H5Dwrite without compression"); @@ -531,14 +531,14 @@ test_no_compress_write(hid_t fapl_id) stride[0] = stride[1] = stride[2] = 1; count[0] = count[1] = count[2] = 1; block[0] = CHUNK_NX; block[1] = CHUNK_NY; block[2] = CHUNK_NZ; - + for(i=0; i<NX; i++) { /* * Select hyperslab for one chunk in the file */ if((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0) TEST_ERROR; - (start[0])++; + (start[0])++; if((status = H5Dwrite(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, direct_buf[i])) < 0) @@ -553,10 +553,10 @@ test_no_compress_write(hid_t fapl_id) H5Sclose(mem_space); H5Pclose(dxpl); H5Fclose(file); - - /* Report the performance */ - reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB)); - + + /* Report the performance */ + reportTime(timeval_start, (double)(NX*NY*NZ*sizeof(unsigned int)/MB)); + PASSED(); return 0; @@ -576,13 +576,13 @@ error: * data to a Unix file *-------------------------------------------------- */ -int +int test_unix_write(void) { int file, flag; - ssize_t op_size; + ssize_t op_size; int i; - struct timeval timeval_start; + struct timeval timeval_start; TESTING("Write compressed data to a Unix file"); @@ -595,8 +595,8 @@ test_unix_write(void) if ((file=open(FILENAME[1],flag))== -1) TEST_ERROR; - /* Write the compressed chunk data repeatedly to cover all the chunks in the - * dataset, using the direct writing function. */ + /* Write the compressed chunk data repeatedly to cover all the chunks in the + * dataset, using the direct writing function. */ for(i=0; i<NX; i++) { op_size = write(file, outbuf[i],data_size[i]); if (op_size < 0) @@ -617,14 +617,14 @@ test_unix_write(void) TEST_ERROR; } - /* Report the performance */ - reportTime(timeval_start, (double)(total_size/MB)); + /* Report the performance */ + reportTime(timeval_start, (double)(total_size/MB)); PASSED(); return 0; error: - return 1; + return 1; } /*-------------------------------------------------- @@ -650,7 +650,7 @@ main (void) free(outbuf[i]); free(direct_buf[i]); } - + return 0; } diff --git a/tools/test/perform/overhead.c b/tools/test/perform/overhead.c index 108d9e4..58558a5 100644 --- a/tools/test/perform/overhead.c +++ b/tools/test/perform/overhead.c @@ -217,9 +217,9 @@ test(fill_t fill_style, const double splits[], fspace, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) goto error; if ((fd=HDopen(FILE_NAME_1, O_RDONLY, 0666)) < 0) goto error; - if(FILL_RANDOM==fill_style) + if(FILL_RANDOM==fill_style) had = (int *)calloc((size_t)cur_size[0], sizeof(int)); - + for (i=1; i<=cur_size[0]; i++) { /* Decide which chunk to write to */ @@ -391,7 +391,7 @@ main(int argc, char *argv[]) nerrors += test(FILL_INWARD, splits, FALSE, use_cache); nerrors += test(FILL_OUTWARD, splits, FALSE, use_cache); nerrors += test(FILL_RANDOM, splits, FALSE, use_cache); - } + } else { if (use_cache) usage(argv[0]); nerrors += test(fill_style, splits, TRUE, FALSE); diff --git a/tools/test/perform/pio_perf.c b/tools/test/perform/pio_perf.c index 826e7a9..8146d84 100644 --- a/tools/test/perform/pio_perf.c +++ b/tools/test/perform/pio_perf.c @@ -80,7 +80,7 @@ #define PIO_MPI 0x2 #define PIO_HDF5 0x4 -#ifdef STANDALONE +#ifdef STANDALONE #define DBL_EPSILON 2.2204460492503131e-16 #define H5_DBL_ABS_EQUAL(X,Y) (fabs((X)-(Y)) < DBL_EPSILON) #endif diff --git a/tools/test/perform/sio_engine.c b/tools/test/perform/sio_engine.c index 69409bb..2562ab8 100644 --- a/tools/test/perform/sio_engine.c +++ b/tools/test/perform/sio_engine.c @@ -1322,7 +1322,7 @@ do_cleanupfile(iotype iot, char *filename) } H5Pclose(fapl); break; - + default: /* unknown request */ HDfprintf(stderr, "Unknown IO type request (%d)\n", (int)iot); |