diff options
Diffstat (limited to 'testpar')
-rw-r--r-- | testpar/t_dset.c | 116 | ||||
-rw-r--r-- | testpar/t_file.c | 2 | ||||
-rw-r--r-- | testpar/t_mdset.c | 16 | ||||
-rw-r--r-- | testpar/t_mpi.c | 23 | ||||
-rw-r--r-- | testpar/t_ph5basic.c | 32 | ||||
-rw-r--r-- | testpar/testphdf5.c | 3 | ||||
-rw-r--r-- | testpar/testphdf5.h | 14 |
7 files changed, 88 insertions, 118 deletions
diff --git a/testpar/t_dset.c b/testpar/t_dset.c index 66bdb01..881ce0a 100644 --- a/testpar/t_dset.c +++ b/testpar/t_dset.c @@ -59,7 +59,7 @@ slab_set(int mpi_rank, int mpi_size, hssize_t start[], hsize_t count[], count[1] = 1; start[0] = mpi_rank*block[0]; start[1] = 0; -if (verbose) printf("slab_set BYROW\n"); +if (VERBOSE_MED) printf("slab_set BYROW\n"); break; case BYCOL: /* Each process takes a block of columns. */ @@ -71,7 +71,7 @@ if (verbose) printf("slab_set BYROW\n"); count[1] = 1; start[0] = 0; start[1] = mpi_rank*block[1]; -if (verbose) printf("slab_set BYCOL\n"); +if (VERBOSE_MED) printf("slab_set BYCOL\n"); break; case ZROW: /* Similar to BYROW except process 0 gets 0 row */ @@ -83,7 +83,7 @@ if (verbose) printf("slab_set BYCOL\n"); count[1] = 1; start[0] = (mpi_rank? mpi_rank*block[0] : 0); start[1] = 0; -if (verbose) printf("slab_set ZROW\n"); +if (VERBOSE_MED) printf("slab_set ZROW\n"); break; case ZCOL: /* Similar to BYCOL except process 0 gets 0 column */ @@ -95,7 +95,7 @@ if (verbose) printf("slab_set ZROW\n"); count[1] = 1; start[0] = 0; start[1] = (mpi_rank? mpi_rank*block[1] : 0); -if (verbose) printf("slab_set ZCOL\n"); +if (VERBOSE_MED) printf("slab_set ZCOL\n"); break; default: /* Unknown mode. Set it to cover the whole dataset. */ @@ -108,10 +108,10 @@ if (verbose) printf("slab_set ZCOL\n"); count[1] = 1; start[0] = 0; start[1] = 0; -if (verbose) printf("slab_set wholeset\n"); +if (VERBOSE_MED) printf("slab_set wholeset\n"); break; } -if (verbose){ +if (VERBOSE_MED){ printf("start[]=(%ld,%ld), count[]=(%lu,%lu), stride[]=(%lu,%lu), block[]=(%lu,%lu), total datapoints=%lu\n", (long)start[0], (long)start[1], (unsigned long)count[0], (unsigned long)count[1], (unsigned long)stride[0], (unsigned long)stride[1], (unsigned long)block[0], (unsigned long)block[1], @@ -175,8 +175,8 @@ int dataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[], hsize_t bl hsize_t i, j; int vrfyerrs; - /* print it if verbose */ - if (verbose) { + /* print it if VERBOSE_MED */ + if (VERBOSE_MED) { printf("dataset_vrfy dumping:::\n"); printf("start(%ld, %ld), count(%lu, %lu), stride(%lu, %lu), block(%lu, %lu)\n", (long)start[0], (long)start[1], (unsigned long)count[0], (unsigned long)count[1], @@ -191,7 +191,7 @@ int dataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[], hsize_t bl for (i=0; i < block[0]; i++){ for (j=0; j < block[1]; j++){ if (*dataset != *original){ - if (vrfyerrs++ < MAX_ERR_REPORT || verbose){ + if (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED){ printf("Dataset Verify failed at [%ld][%ld](row %ld, col %ld): expect %d, got %d\n", (long)i, (long)j, (long)(i+start[0]), (long)(j+start[1]), @@ -202,7 +202,7 @@ int dataset_vrfy(hssize_t start[], hsize_t count[], hsize_t stride[], hsize_t bl } } } - if (vrfyerrs > MAX_ERR_REPORT && !verbose) + if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED) printf("[more errors ...]\n"); if (vrfyerrs) printf("%d errors found in dataset_vrfy\n", vrfyerrs); @@ -245,7 +245,7 @@ dataset_writeInd(char *filename) MPI_Comm comm = MPI_COMM_WORLD; MPI_Info info = MPI_INFO_NULL; - if (verbose) + if (VERBOSE_MED) printf("Independent write test on file %s\n", filename); /* set up MPI parameters */ @@ -327,7 +327,7 @@ dataset_writeInd(char *filename) VRFY((ret >= 0), "H5Dwrite dataset2 succeeded"); /* setup dimensions again to write with zero rows for process 0 */ - if (verbose) + if (VERBOSE_MED) printf("writeInd by some with zero row\n"); slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW); ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); @@ -389,7 +389,7 @@ dataset_readInd(char *filename) MPI_Comm comm = MPI_COMM_WORLD; MPI_Info info = MPI_INFO_NULL; - if (verbose) + if (VERBOSE_MED) printf("Independent read test on file %s\n", filename); /* set up MPI parameters */ @@ -513,7 +513,7 @@ dataset_writeAll(char *filename) MPI_Comm comm = MPI_COMM_WORLD; MPI_Info info = MPI_INFO_NULL; - if (verbose) + if (VERBOSE_MED) printf("Collective write test on file %s\n", filename); /* set up MPI parameters */ @@ -601,7 +601,7 @@ dataset_writeAll(char *filename) /* fill the local slab with some trivial data */ dataset_fill(start, block, data_array1); MESG("data_array initialized"); - if (verbose){ + if (VERBOSE_MED){ MESG("data_array created"); dataset_print(start, block, data_array1); } @@ -619,7 +619,7 @@ dataset_writeAll(char *filename) VRFY((ret >= 0), "H5Dwrite dataset1 succeeded"); /* setup dimensions again to writeAll with zero rows for process 0 */ - if (verbose) + if (VERBOSE_MED) printf("writeAll by some with zero row\n"); slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW); ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); @@ -647,7 +647,7 @@ dataset_writeAll(char *filename) /* put some trivial data in the data_array */ dataset_fill(start, block, data_array1); MESG("data_array initialized"); - if (verbose){ + if (VERBOSE_MED){ MESG("data_array created"); dataset_print(start, block, data_array1); } @@ -665,7 +665,7 @@ dataset_writeAll(char *filename) /* fill the local slab with some trivial data */ dataset_fill(start, block, data_array1); MESG("data_array initialized"); - if (verbose){ + if (VERBOSE_MED){ MESG("data_array created"); dataset_print(start, block, data_array1); } @@ -682,7 +682,7 @@ dataset_writeAll(char *filename) VRFY((ret >= 0), "H5Dwrite dataset2 succeeded"); /* setup dimensions again to writeAll with zero columns for process 0 */ - if (verbose) + if (VERBOSE_MED) printf("writeAll by some with zero col\n"); slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL); ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); @@ -731,7 +731,7 @@ dataset_writeAll(char *filename) /* fill the local slab with some trivial data */ dataset_fill(start, block, data_array1); MESG("data_array initialized"); - if (verbose) { + if (VERBOSE_MED) { MESG("data_array created"); dataset_print(start, block, data_array1); } /* end if */ @@ -791,7 +791,7 @@ dataset_writeAll(char *filename) /* fill the local slab with some trivial data */ dataset_fill(start, block, data_array1); MESG("data_array initialized"); - if (verbose) { + if (VERBOSE_MED) { MESG("data_array created"); dataset_print(start, block, data_array1); } /* end if */ @@ -870,7 +870,7 @@ dataset_readAll(char *filename) MPI_Comm comm = MPI_COMM_WORLD; MPI_Info info = MPI_INFO_NULL; - if (verbose) + if (VERBOSE_MED) printf("Collective read test on file %s\n", filename); /* set up MPI parameters */ @@ -930,7 +930,7 @@ dataset_readAll(char *filename) /* fill dataset with test data */ dataset_fill(start, block, data_origin1); MESG("data_array initialized"); - if (verbose){ + if (VERBOSE_MED){ MESG("data_array created"); dataset_print(start, block, data_origin1); } @@ -951,7 +951,7 @@ dataset_readAll(char *filename) if (ret) nerrors++; /* setup dimensions again to readAll with zero columns for process 0 */ - if (verbose) + if (VERBOSE_MED) printf("readAll by some with zero col\n"); slab_set(mpi_rank, mpi_size, start, count, stride, block, ZCOL); ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); @@ -993,7 +993,7 @@ dataset_readAll(char *filename) /* fill dataset with test data */ dataset_fill(start, block, data_origin1); MESG("data_array initialized"); - if (verbose){ + if (VERBOSE_MED){ MESG("data_array created"); dataset_print(start, block, data_origin1); } @@ -1014,7 +1014,7 @@ dataset_readAll(char *filename) if (ret) nerrors++; /* setup dimensions again to readAll with zero rows for process 0 */ - if (verbose) + if (VERBOSE_MED) printf("readAll by some with zero row\n"); slab_set(mpi_rank, mpi_size, start, count, stride, block, ZROW); ret=H5Sselect_hyperslab(file_dataspace, H5S_SELECT_SET, start, stride, count, block); @@ -1096,7 +1096,7 @@ extend_writeInd(char *filename) MPI_Comm comm = MPI_COMM_WORLD; MPI_Info info = MPI_INFO_NULL; - if (verbose) + if (VERBOSE_MED) printf("Extend independent write test on file %s\n", filename); /* set up MPI parameters */ @@ -1149,7 +1149,7 @@ extend_writeInd(char *filename) * ------------------------------------------------------------- */ /* set up dataset storage chunk sizes and creation property list */ - if (verbose) + if (VERBOSE_MED) printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]); dataset_pl = H5Pcreate(H5P_DATASET_CREATE); VRFY((dataset_pl >= 0), "H5Pcreate succeeded"); @@ -1185,7 +1185,7 @@ extend_writeInd(char *filename) /* put some trivial data in the data_array */ dataset_fill(start, block, data_array1); MESG("data_array initialized"); - if (verbose){ + if (VERBOSE_MED){ MESG("data_array created"); dataset_print(start, block, data_array1); } @@ -1225,7 +1225,7 @@ extend_writeInd(char *filename) /* put some trivial data in the data_array */ dataset_fill(start, block, data_array1); MESG("data_array initialized"); - if (verbose){ + if (VERBOSE_MED){ MESG("data_array created"); dataset_print(start, block, data_array1); } @@ -1236,13 +1236,8 @@ extend_writeInd(char *filename) /* Try write to dataset2 beyond its current dim sizes. Should fail. */ /* Temporary turn off auto error reporting */ -#ifdef H5_WANT_H5_V1_6_COMPAT H5Eget_auto(&old_func, &old_client_data); H5Eset_auto(NULL, NULL); -#else /* H5_WANT_H5_V1_6_COMPAT */ - H5Eget_auto(H5E_DEFAULT, &old_func, &old_client_data); - H5Eset_auto(H5E_DEFAULT, NULL, NULL); -#endif /* H5_WANT_H5_V1_6_COMPAT */ /* create a file dataspace independently */ file_dataspace = H5Dget_space (dataset2); @@ -1256,11 +1251,7 @@ extend_writeInd(char *filename) VRFY((ret < 0), "H5Dwrite failed as expected"); /* restore auto error reporting */ -#ifdef H5_WANT_H5_V1_6_COMPAT H5Eset_auto(old_func, old_client_data); -#else /* H5_WANT_H5_V1_6_COMPAT */ - H5Eset_auto(H5E_DEFAULT, old_func, old_client_data); -#endif /* H5_WANT_H5_V1_6_COMPAT */ H5Sclose(file_dataspace); /* Extend dataset2 and try again. Should succeed. */ @@ -1325,7 +1316,7 @@ extend_readInd(char *filename) MPI_Comm comm = MPI_COMM_WORLD; MPI_Info info = MPI_INFO_NULL; - if (verbose) + if (VERBOSE_MED) printf("Extend independent read test on file %s\n", filename); /* set up MPI parameters */ @@ -1365,13 +1356,8 @@ extend_readInd(char *filename) /* Try extend dataset1 which is open RDONLY. Should fail. */ /* first turn off auto error reporting */ -#ifdef H5_WANT_H5_V1_6_COMPAT H5Eget_auto(&old_func, &old_client_data); H5Eset_auto(NULL, NULL); -#else /* H5_WANT_H5_V1_6_COMPAT */ - H5Eget_auto(H5E_DEFAULT, &old_func, &old_client_data); - H5Eset_auto(H5E_DEFAULT, NULL, NULL); -#endif /* H5_WANT_H5_V1_6_COMPAT */ file_dataspace = H5Dget_space (dataset1); VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); @@ -1382,11 +1368,7 @@ extend_readInd(char *filename) VRFY((ret < 0), "H5Dextend failed as expected"); /* restore auto error reporting */ -#ifdef H5_WANT_H5_V1_6_COMPAT H5Eset_auto(old_func, old_client_data); -#else /* H5_WANT_H5_V1_6_COMPAT */ - H5Eset_auto(H5E_DEFAULT, old_func, old_client_data); -#endif /* H5_WANT_H5_V1_6_COMPAT */ H5Sclose(file_dataspace); @@ -1406,7 +1388,7 @@ extend_readInd(char *filename) /* fill dataset with test data */ dataset_fill(start, block, data_origin1); - if (verbose){ + if (VERBOSE_MED){ MESG("data_array created"); dataset_print(start, block, data_array1); } @@ -1441,7 +1423,7 @@ extend_readInd(char *filename) /* fill dataset with test data */ dataset_fill(start, block, data_origin1); - if (verbose){ + if (VERBOSE_MED){ MESG("data_array created"); dataset_print(start, block, data_array1); } @@ -1516,7 +1498,7 @@ extend_writeAll(char *filename) MPI_Comm comm = MPI_COMM_WORLD; MPI_Info info = MPI_INFO_NULL; - if (verbose) + if (VERBOSE_MED) printf("Extend independent write test on file %s\n", filename); /* set up MPI parameters */ @@ -1569,7 +1551,7 @@ extend_writeAll(char *filename) * ------------------------------------------------------------- */ /* set up dataset storage chunk sizes and creation property list */ - if (verbose) + if (VERBOSE_MED) printf("chunks[]=%lu,%lu\n", (unsigned long)chunk_dims[0], (unsigned long)chunk_dims[1]); dataset_pl = H5Pcreate(H5P_DATASET_CREATE); VRFY((dataset_pl >= 0), "H5Pcreate succeeded"); @@ -1605,7 +1587,7 @@ extend_writeAll(char *filename) /* put some trivial data in the data_array */ dataset_fill(start, block, data_array1); MESG("data_array initialized"); - if (verbose){ + if (VERBOSE_MED){ MESG("data_array created"); dataset_print(start, block, data_array1); } @@ -1652,7 +1634,7 @@ extend_writeAll(char *filename) /* put some trivial data in the data_array */ dataset_fill(start, block, data_array1); MESG("data_array initialized"); - if (verbose){ + if (VERBOSE_MED){ MESG("data_array created"); dataset_print(start, block, data_array1); } @@ -1669,13 +1651,8 @@ extend_writeAll(char *filename) /* Try write to dataset2 beyond its current dim sizes. Should fail. */ /* Temporary turn off auto error reporting */ -#ifdef H5_WANT_H5_V1_6_COMPAT H5Eget_auto(&old_func, &old_client_data); H5Eset_auto(NULL, NULL); -#else /* H5_WANT_H5_V1_6_COMPAT */ - H5Eget_auto(H5E_DEFAULT, &old_func, &old_client_data); - H5Eset_auto(H5E_DEFAULT, NULL, NULL); -#endif /* H5_WANT_H5_V1_6_COMPAT */ /* create a file dataspace independently */ file_dataspace = H5Dget_space (dataset2); @@ -1689,11 +1666,7 @@ extend_writeAll(char *filename) VRFY((ret < 0), "H5Dwrite failed as expected"); /* restore auto error reporting */ -#ifdef H5_WANT_H5_V1_6_COMPAT H5Eset_auto(old_func, old_client_data); -#else /* H5_WANT_H5_V1_6_COMPAT */ - H5Eset_auto(H5E_DEFAULT, old_func, old_client_data); -#endif /* H5_WANT_H5_V1_6_COMPAT */ H5Sclose(file_dataspace); /* Extend dataset2 and try again. Should succeed. */ @@ -1761,7 +1734,7 @@ extend_readAll(char *filename) MPI_Comm comm = MPI_COMM_WORLD; MPI_Info info = MPI_INFO_NULL; - if (verbose) + if (VERBOSE_MED) printf("Extend independent read test on file %s\n", filename); /* set up MPI parameters */ @@ -1801,13 +1774,8 @@ extend_readAll(char *filename) /* Try extend dataset1 which is open RDONLY. Should fail. */ /* first turn off auto error reporting */ -#ifdef H5_WANT_H5_V1_6_COMPAT H5Eget_auto(&old_func, &old_client_data); H5Eset_auto(NULL, NULL); -#else /* H5_WANT_H5_V1_6_COMPAT */ - H5Eget_auto(H5E_DEFAULT, &old_func, &old_client_data); - H5Eset_auto(H5E_DEFAULT, NULL, NULL); -#endif /* H5_WANT_H5_V1_6_COMPAT */ file_dataspace = H5Dget_space (dataset1); VRFY((file_dataspace >= 0), "H5Dget_space succeeded"); @@ -1818,11 +1786,7 @@ extend_readAll(char *filename) VRFY((ret < 0), "H5Dextend failed as expected"); /* restore auto error reporting */ -#ifdef H5_WANT_H5_V1_6_COMPAT H5Eset_auto(old_func, old_client_data); -#else /* H5_WANT_H5_V1_6_COMPAT */ - H5Eset_auto(H5E_DEFAULT, old_func, old_client_data); -#endif /* H5_WANT_H5_V1_6_COMPAT */ H5Sclose(file_dataspace); @@ -1842,7 +1806,7 @@ extend_readAll(char *filename) /* fill dataset with test data */ dataset_fill(start, block, data_origin1); - if (verbose){ + if (VERBOSE_MED){ MESG("data_array created"); dataset_print(start, block, data_array1); } @@ -1884,7 +1848,7 @@ extend_readAll(char *filename) /* fill dataset with test data */ dataset_fill(start, block, data_origin1); - if (verbose){ + if (VERBOSE_MED){ MESG("data_array created"); dataset_print(start, block, data_array1); } diff --git a/testpar/t_file.c b/testpar/t_file.c index a5cb85b..59ca232 100644 --- a/testpar/t_file.c +++ b/testpar/t_file.c @@ -44,7 +44,7 @@ test_split_comm_access(char *filename) hbool_t use_gpfs = FALSE; /* Use GPFS hints */ herr_t ret; /* generic return value */ - if (verbose) + if (VERBOSE_MED) printf("Split Communicator access test on file %s\n", filename); diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c index 9b4bfd1..e4ded5c 100644 --- a/testpar/t_mdset.c +++ b/testpar/t_mdset.c @@ -179,7 +179,7 @@ void compact_dataset(char *filename) for (i = 0; i < SIZE; i++) for (j = 0; j < SIZE; j++) if(inme[i][j] != outme[i][j]) - if(err_num++ < MAX_ERR_REPORT || verbose) + if(err_num++ < MAX_ERR_REPORT || VERBOSE_MED) printf("Dataset Verify failed at [%d][%d]: expect %f, got %f\n", i, j, outme[i][j], inme[i][j]); H5Pclose(plist); @@ -382,9 +382,9 @@ void dataset_fillvalue(const char *filename) for (k=0; k<(int)dset_dims[2]; k++) for (l=0; l<(int)dset_dims[3]; l++, twdata++, trdata++) if( *trdata != 0) - if(err_num++ < MAX_ERR_REPORT || verbose) + if(err_num++ < MAX_ERR_REPORT || VERBOSE_MED) printf("Dataset Verify failed at [%d][%d][%d][%d]: expect 0, got %d\n", i,j,k,l, *trdata); - if(err_num > MAX_ERR_REPORT && !verbose) + if(err_num > MAX_ERR_REPORT && !VERBOSE_MED) printf("[more errors ...]\n"); if(err_num){ printf("%d errors found in check_value\n", err_num); @@ -445,15 +445,15 @@ void dataset_fillvalue(const char *filename) for (l=0; l<(int)dset_dims[3]; l++, twdata++, trdata++) if(i<mpi_size) { if( *twdata != *trdata ) - if(err_num++ < MAX_ERR_REPORT || verbose) + if(err_num++ < MAX_ERR_REPORT || VERBOSE_MED) printf("Dataset Verify failed at [%d][%d][%d][%d]: expect %d, got %d\n", i,j,k,l, *twdata, *trdata); } /* end if */ else { if( *trdata != 0) - if(err_num++ < MAX_ERR_REPORT || verbose) + if(err_num++ < MAX_ERR_REPORT || VERBOSE_MED) printf("Dataset Verify failed at [%d][%d][%d][%d]: expect 0, got %d\n", i,j,k,l, *trdata); } /* end else */ - if(err_num > MAX_ERR_REPORT && !verbose) + if(err_num > MAX_ERR_REPORT && !VERBOSE_MED) printf("[more errors ...]\n"); if(err_num){ printf("%d errors found in check_value\n", err_num); @@ -1029,10 +1029,10 @@ int check_value(DATATYPE *indata, DATATYPE *outdata) for(i=chunk_origin[0]; i<(chunk_origin[0]+chunk_dims[0]); i++) for(j=chunk_origin[1]; j<(chunk_origin[1]+chunk_dims[1]); j++) { if( *indata != *outdata ) - if(err_num++ < MAX_ERR_REPORT || verbose) + if(err_num++ < MAX_ERR_REPORT || VERBOSE_MED) printf("Dataset Verify failed at [%ld][%ld](row %ld, col%ld): expect %d, got %d\n", (long)i, (long)j, (long)i, (long)j, *outdata, *indata); } - if(err_num > MAX_ERR_REPORT && !verbose) + if(err_num > MAX_ERR_REPORT && !VERBOSE_MED) printf("[more errors ...]\n"); if(err_num) printf("%d errors found in check_value\n", err_num); diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c index ba8b847..d81bfac 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -34,7 +34,6 @@ const char *FILENAME[2]={ NULL}; char filenames[2][200]; int nerrors = 0; -int verbose = 0; hid_t fapl; /* file access property list */ /* protocols */ @@ -62,7 +61,7 @@ test_mpio_overlap_writes(char *filename) MPI_Status mpi_stat; - if (verbose) + if (VERBOSE_MED) printf("MPIO independent overlapping writes test on file %s\n", filename); @@ -147,11 +146,11 @@ test_mpio_overlap_writes(char *filename) char expected; expected = (mpi_off+i) & 0x7f; if ((buf[i] != expected) && - (vrfyerrs++ < MAX_ERR_REPORT || verbose)) + (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED)) printf("proc %d: found data error at [%ld], expect %d, got %d\n", mpi_rank, (long)(mpi_off+i), expected, buf[i]); } - if (vrfyerrs > MAX_ERR_REPORT && !verbose) + if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED) printf("proc %d: [more errors ...]\n", mpi_rank); } @@ -209,7 +208,7 @@ test_mpio_gb_file(char *filename) MPI_Comm_size(MPI_COMM_WORLD,&mpi_size); MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank); - if (verbose) + if (VERBOSE_MED) printf("MPI_Offset range test\n"); /* figure out the signness and sizeof MPI_Offset */ @@ -264,7 +263,7 @@ test_mpio_gb_file(char *filename) } /*================================*/ - if (verbose) + if (VERBOSE_MED) printf("MPIO GB file test %s\n", filename); if (sizeof_mpi_offset <= 4){ @@ -294,13 +293,13 @@ test_mpio_gb_file(char *filename) ntimes = GB/MB*n/mpi_size + 1; for (i=ntimes-2; i <= ntimes; i++){ mpi_off = (i*mpi_size + mpi_rank)*(MPI_Offset)MB; - if (verbose) + if (VERBOSE_MED) HDfprintf(stdout,"proc %d: write to mpi_off=%016llx, %lld\n", mpi_rank, mpi_off, mpi_off); /* set data to some trivial pattern for easy verification */ for (j=0; j<MB; j++) *(buf+j) = i*mpi_size + mpi_rank; - if (verbose) + if (VERBOSE_MED) HDfprintf(stdout,"proc %d: writing %d bytes at offset %lld\n", mpi_rank, MB, mpi_off); mrc = MPI_File_write_at(fh, mpi_off, buf, MB, MPI_BYTE, &mpi_stat); @@ -333,7 +332,7 @@ test_mpio_gb_file(char *filename) ntimes = GB/MB*n/mpi_size + 1; for (i=ntimes-2; i <= ntimes; i++){ mpi_off = (i*mpi_size + (mpi_size - mpi_rank - 1))*(MPI_Offset)MB; - if (verbose) + if (VERBOSE_MED) HDfprintf(stdout,"proc %d: read from mpi_off=%016llx, %lld\n", mpi_rank, mpi_off, mpi_off); mrc = MPI_File_read_at(fh, mpi_off, buf, MB, MPI_BYTE, &mpi_stat); @@ -342,11 +341,11 @@ test_mpio_gb_file(char *filename) vrfyerrs=0; for (j=0; j<MB; j++){ if ((*(buf+j) != expected) && - (vrfyerrs++ < MAX_ERR_REPORT || verbose)) + (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED)) printf("proc %d: found data error at [%ld+%d], expect %d, got %d\n", mpi_rank, (long)mpi_off, j, expected, *(buf+j)); } - if (vrfyerrs > MAX_ERR_REPORT && !verbose) + if (vrfyerrs > MAX_ERR_REPORT && !VERBOSE_MED) printf("proc %d: [more errors ...]\n", mpi_rank); } @@ -580,7 +579,7 @@ parse_options(int argc, char **argv) break; }else{ switch(*(*argv+1)){ - case 'v': verbose = 1; + case 'v': SetTestVerbosity(VERBO_MED); break; case 'f': if (--argc < 1) { nerrors++; diff --git a/testpar/t_ph5basic.c b/testpar/t_ph5basic.c index eb0048b..c373017 100644 --- a/testpar/t_ph5basic.c +++ b/testpar/t_ph5basic.c @@ -51,13 +51,13 @@ test_fapl_mpio_dup(void) herr_t ret; /* hdf5 return value */ int nkeys, nkeys_tmp; - if (verbose) + if (VERBOSE_MED) printf("Verify fapl_mpio duplicates communicator and INFO objects\n"); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD,&mpi_size); MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank); - if (verbose) + if (VERBOSE_MED) printf("rank/size of MPI_COMM_WORLD are %d/%d\n", mpi_rank, mpi_size); /* Create a new communicator that has the same processes as MPI_COMM_WORLD. @@ -67,7 +67,7 @@ test_fapl_mpio_dup(void) VRFY((mrc==MPI_SUCCESS), "MPI_Comm_split"); MPI_Comm_size(comm,&mpi_size_old); MPI_Comm_rank(comm,&mpi_rank_old); - if (verbose) + if (VERBOSE_MED) printf("rank/size of comm are %d/%d\n", mpi_rank_old, mpi_size_old); /* create a new INFO object with some trivial information. */ @@ -79,7 +79,7 @@ test_fapl_mpio_dup(void) mrc=MPI_Info_get_nkeys(info, &nkeys); VRFY((mrc==MPI_SUCCESS), "MPI_Info_get_nkeys"); } - if (verbose) + if (VERBOSE_MED) h5_dump_info_object(info); acc_pl = H5Pcreate (H5P_FILE_ACCESS); @@ -104,7 +104,7 @@ test_fapl_mpio_dup(void) VRFY((ret >= 0), "H5Pget_fapl_mpio"); MPI_Comm_size(comm_tmp,&mpi_size_tmp); MPI_Comm_rank(comm_tmp,&mpi_rank_tmp); - if (verbose) + if (VERBOSE_MED) printf("After H5Pget_fapl_mpio: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp); VRFY((mpi_size_tmp==mpi_size), "MPI_Comm_size"); @@ -114,7 +114,7 @@ test_fapl_mpio_dup(void) VRFY((mrc==MPI_SUCCESS), "MPI_Info_get_nkeys"); VRFY((nkeys_tmp==nkeys), "new and old nkeys equal"); } - if (verbose) + if (VERBOSE_MED) h5_dump_info_object(info_tmp); /* Case 2: @@ -152,7 +152,7 @@ test_fapl_mpio_dup(void) VRFY((ret >= 0), "H5Pget_fapl_mpio"); MPI_Comm_size(comm_tmp,&mpi_size_tmp); MPI_Comm_rank(comm_tmp,&mpi_rank_tmp); - if (verbose) + if (VERBOSE_MED) printf("After second H5Pget_fapl_mpio: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp); VRFY((mpi_size_tmp==mpi_size), "MPI_Comm_size"); @@ -162,7 +162,7 @@ test_fapl_mpio_dup(void) VRFY((mrc==MPI_SUCCESS), "MPI_Info_get_nkeys"); VRFY((nkeys_tmp==nkeys), "new and old nkeys equal"); } - if (verbose) + if (VERBOSE_MED) h5_dump_info_object(info_tmp); /* Case 3: @@ -172,14 +172,14 @@ test_fapl_mpio_dup(void) H5Pclose(acc_pl); MPI_Comm_size(comm_tmp,&mpi_size_tmp); MPI_Comm_rank(comm_tmp,&mpi_rank_tmp); - if (verbose) + if (VERBOSE_MED) printf("After Property list closed: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp); if (MPI_INFO_NULL != info_tmp){ mrc=MPI_Info_get_nkeys(info_tmp, &nkeys_tmp); VRFY((mrc==MPI_SUCCESS), "MPI_Info_get_nkeys"); } - if (verbose) + if (VERBOSE_MED) h5_dump_info_object(info_tmp); /* clean up */ @@ -222,13 +222,13 @@ test_fapl_mpiposix_dup(void) hbool_t use_gpfs = FALSE; herr_t ret; /* hdf5 return value */ - if (verbose) + if (VERBOSE_MED) printf("Verify fapl_mpiposix duplicates communicator object\n"); /* set up MPI parameters */ MPI_Comm_size(MPI_COMM_WORLD,&mpi_size); MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank); - if (verbose) + if (VERBOSE_MED) printf("rank/size of MPI_COMM_WORLD are %d/%d\n", mpi_rank, mpi_size); /* Create a new communicator that has the same processes as MPI_COMM_WORLD. @@ -238,7 +238,7 @@ test_fapl_mpiposix_dup(void) VRFY((mrc==MPI_SUCCESS), "MPI_Comm_split"); MPI_Comm_size(comm,&mpi_size_old); MPI_Comm_rank(comm,&mpi_rank_old); - if (verbose) + if (VERBOSE_MED) printf("rank/size of comm are %d/%d\n", mpi_rank_old, mpi_size_old); acc_pl = H5Pcreate (H5P_FILE_ACCESS); @@ -259,7 +259,7 @@ test_fapl_mpiposix_dup(void) VRFY((ret >= 0), "H5Pget_fapl_mpiposix"); MPI_Comm_size(comm_tmp,&mpi_size_tmp); MPI_Comm_rank(comm_tmp,&mpi_rank_tmp); - if (verbose) + if (VERBOSE_MED) printf("After H5Pget_fapl_mpiposix: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp); VRFY((mpi_size_tmp==mpi_size), "MPI_Comm_size"); @@ -284,7 +284,7 @@ test_fapl_mpiposix_dup(void) VRFY((ret >= 0), "H5Pget_fapl_mpiposix"); MPI_Comm_size(comm_tmp,&mpi_size_tmp); MPI_Comm_rank(comm_tmp,&mpi_rank_tmp); - if (verbose) + if (VERBOSE_MED) printf("After second H5Pget_fapl_mpiposix: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp); VRFY((mpi_size_tmp==mpi_size), "MPI_Comm_size"); @@ -297,7 +297,7 @@ test_fapl_mpiposix_dup(void) H5Pclose(acc_pl); MPI_Comm_size(comm_tmp,&mpi_size_tmp); MPI_Comm_rank(comm_tmp,&mpi_rank_tmp); - if (verbose) + if (VERBOSE_MED) printf("After Property list closed: rank/size of comm are %d/%d\n", mpi_rank_tmp, mpi_size_tmp); diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c index 4229876..5c99f66 100644 --- a/testpar/testphdf5.c +++ b/testpar/testphdf5.c @@ -30,7 +30,6 @@ int dim1 = DIM1; int chunkdim0; int chunkdim1; int nerrors = 0; /* errors count */ -int verbose = 0; /* verbose, default as no. */ int ndatasets = 300; /* number of datasets to create*/ int ngroups = 512; /* number of groups to create in root * group. */ @@ -183,7 +182,7 @@ parse_options(int argc, char **argv) break; case 'b': dobig = 1; break; - case 'v': verbose = 1; + case 'v': SetTestVerbosity(VERBO_MED); break; case 'f': if (--argc < 1) { nerrors++; diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index c6069d5..d08a77c 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -27,11 +27,20 @@ #define FALSE (!TRUE) #endif /* !FALSE */ +/* temporary fix for restoring the H5EXXX API. */ +/* An ISO compliant compiler should handle the repeated name correctly. */ +/* If it barks at it, try change the second name to something like */ +/* H5E/@@/xxx where '@' is actually '*'. */ +#ifndef H5_WANT_H5_V1_6_COMPAT +#define H5Eget_auto(func, data) H5Eget_auto(H5E_DEFAULT, func, data) +#define H5Eset_auto(func, data) H5Eset_auto(H5E_DEFAULT, func, data) +#endif + /* Define some handy debugging shorthands, routines, ... */ /* debugging tools */ #define MESG(x) \ - if (verbose) printf("%s\n", x); \ + if (VERBOSE_MED) printf("%s\n", x); \ #define VRFY(val, mesg) do { \ if (val) { \ @@ -45,7 +54,7 @@ mesg, (int)__LINE__, __FILE__); \ ++nerrors; \ fflush(stdout); \ - if (!verbose) { \ + if (!VERBOSE_MED) { \ printf("aborting MPI process\n"); \ MPI_Finalize(); \ exit(nerrors); \ @@ -119,7 +128,6 @@ typedef int DATATYPE; extern int dim0, dim1; /*Dataset dimensions */ extern int chunkdim0, chunkdim1; /*Chunk dimensions */ extern int nerrors; /*errors count */ -extern int verbose; /*verbose, default as no. */ extern H5E_auto_t old_func; /* previous error handler */ extern void *old_client_data; /*previous error handler arg.*/ extern int facc_type; /*Test file access type */ |