diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-08-12 02:20:43 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-08-12 02:20:43 (GMT) |
commit | cd5ad177a23698c1daf6fb8c4195336865d795d2 (patch) | |
tree | 13720372b8dcf964d99cbec2d7ff5de1bdbdd565 /tools | |
parent | cd3f42096b9a957e37c9df48aa0d31d9ed4bc537 (diff) | |
download | hdf5-cd5ad177a23698c1daf6fb8c4195336865d795d2.zip hdf5-cd5ad177a23698c1daf6fb8c4195336865d795d2.tar.gz hdf5-cd5ad177a23698c1daf6fb8c4195336865d795d2.tar.bz2 |
[svn-r22669] Description:
Merge r22634:2266 from trunk to revise_chunks branch
Tested on:
Mac OSX/64 10.7.4 (amazon) w/debug, gcc-4.7.x, C++, FORTRAN and threadsafe
(h5committest not needed on this branch)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/h5dump/CMakeLists.txt | 33 | ||||
-rw-r--r-- | tools/h5import/CMakeLists.txt | 4 | ||||
-rw-r--r-- | tools/h5repack/h5repack_copy.c | 2 | ||||
-rw-r--r-- | tools/h5repack/h5repack_opttable.c | 2 | ||||
-rw-r--r-- | tools/lib/h5diff.c | 27 | ||||
-rw-r--r-- | tools/misc/talign.c | 15 |
6 files changed, 49 insertions, 34 deletions
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index cf442d4..1482327 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -781,14 +781,33 @@ IF (BUILD_TESTING) ENDMACRO (ADD_XML_H5_TEST file) # -------------------------------------------------------------------- - # Determine which filters are available + # See which filters are usable (and skip tests for filters we + # don't have). Do this by searching H5pubconf.h to see which + # filters are defined. # -------------------------------------------------------------------- - SET (USE_FILTER_SZIP H5_HAVE_FILTER_SZIP) - SET (USE_FILTER_DEFLATE H5_HAVE_FILTER_DEFLATE) - SET (USE_FILTER_SHUFFLE H5_HAVE_FILTER_SHUFFLE) - SET (USE_FILTER_FLETCHER32 H5_HAVE_FILTER_FLETCHER32) - SET (USE_FILTER_NBIT H5_HAVE_FILTER_NBIT) - SET (USE_FILTER_SCALEOFFSET H5_HAVE_FILTER_SCALEOFFSET) + IF (H5_HAVE_FILTER_DEFLATE) + SET (USE_FILTER_DEFLATE "true") + ENDIF (H5_HAVE_FILTER_DEFLATE) + + IF (H5_HAVE_FILTER_SZIP) + SET (USE_FILTER_SZIP "true") + ENDIF (H5_HAVE_FILTER_SZIP) + + IF (H5_HAVE_FILTER_SHUFFLE) + SET (USE_FILTER_SHUFFLE "true") + ENDIF (H5_HAVE_FILTER_SHUFFLE) + + IF (H5_HAVE_FILTER_FLETCHER32) + SET (USE_FILTER_FLETCHER32 "true") + ENDIF (H5_HAVE_FILTER_FLETCHER32) + + IF (H5_HAVE_FILTER_NBIT) + SET (USE_FILTER_NBIT "true") + ENDIF (H5_HAVE_FILTER_NBIT) + + IF (H5_HAVE_FILTER_SCALEOFFSET) + SET (USE_FILTER_SCALEOFFSET "true") + ENDIF (H5_HAVE_FILTER_SCALEOFFSET) ############################################################################## ############################################################################## diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt index a655bf2..4e320a1 100644 --- a/tools/h5import/CMakeLists.txt +++ b/tools/h5import/CMakeLists.txt @@ -273,7 +273,9 @@ IF (BUILD_TESTING) # -------------------------------------------------------------------- # Determine if filter is available for h5diff # -------------------------------------------------------------------- - SET (USE_FILTER_DEFLATE H5_HAVE_FILTER_DEFLATE) + IF (H5_HAVE_FILTER_DEFLATE) + SET (USE_FILTER_DEFLATE "true") + ENDIF (H5_HAVE_FILTER_DEFLATE) ############################################################################## ############################################################################## diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c index 957d3c8..cf55d7f 100644 --- a/tools/h5repack/h5repack_copy.c +++ b/tools/h5repack/h5repack_copy.c @@ -1541,7 +1541,7 @@ static void print_dataset_info(hid_t dcpl_id, printf(FORMAT_OBJ,"dset",objname ); else { - char str[255], temp[20]; + char str[255], temp[28]; HDstrcpy(str,"dset "); HDstrcat(str,strfilter); sprintf(temp," (%.3f:1)",ratio); diff --git a/tools/h5repack/h5repack_opttable.c b/tools/h5repack/h5repack_opttable.c index 4ec7fcf..00e4bea 100644 --- a/tools/h5repack/h5repack_opttable.c +++ b/tools/h5repack/h5repack_opttable.c @@ -388,7 +388,7 @@ pack_info_t* options_get_object( const char *path, pack_opttbl_t *table ) { unsigned int i; - const char tbl_path[MAX_NC_NAME]; + const char tbl_path[MAX_NC_NAME+1]; /* +1 for start with "/" case */ for ( i = 0; i < table->nelems; i++) diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 48e82bb..f2eb3ab 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -1013,27 +1013,18 @@ hsize_t h5diff(const char *fname1, #ifdef H5_HAVE_PARALLEL if(g_Parallel) { - /* if both obj1 and obj2 are group */ - if (both_objs_grp) + if((HDstrlen(fname1) > MAX_FILENAME) || (HDstrlen(fname2) > MAX_FILENAME)) { - if((HDstrlen(fname1) > MAX_FILENAME) || (HDstrlen(fname2) > MAX_FILENAME)) - { - HDfprintf(stderr, "The parallel diff only supports path names up to %d characters\n", MAX_FILENAME); - MPI_Abort(MPI_COMM_WORLD, 0); - } /* end if */ + HDfprintf(stderr, "The parallel diff only supports path names up to %d characters\n", MAX_FILENAME); + MPI_Abort(MPI_COMM_WORLD, 0); + } /* end if */ - HDstrcpy(filenames[0], fname1); - HDstrcpy(filenames[1], fname2); + HDstrcpy(filenames[0], fname1); + HDstrcpy(filenames[1], fname2); - /* Alert the worker tasks that there's going to be work. */ - for(i = 1; i < g_nTasks; i++) - MPI_Send(filenames, (MAX_FILENAME * 2), MPI_CHAR, i, MPI_TAG_PARALLEL, MPI_COMM_WORLD); - } - else - { - /* Only single object diff, parallel workers won't be needed */ - phdiff_dismiss_workers(); - } + /* Alert the worker tasks that there's going to be work. */ + for(i = 1; i < g_nTasks; i++) + MPI_Send(filenames, (MAX_FILENAME * 2), MPI_CHAR, i, MPI_TAG_PARALLEL, MPI_COMM_WORLD); } /* end if */ #endif diff --git a/tools/misc/talign.c b/tools/misc/talign.c index 88ebaa6..b77d846 100644 --- a/tools/misc/talign.c +++ b/tools/misc/talign.c @@ -148,28 +148,31 @@ out: result = 1; mname = H5Tget_member_name(fix, 0); printf("%14s (%2d) %6s = %s\n", - mname, (int)H5Tget_member_offset(fix,0), + mname ? mname : "(null)", (int)H5Tget_member_offset(fix,0), string5, (char *)(data + H5Tget_member_offset(fix, 0))); - free(mname); + if(mname) + free(mname); fptr = (float *)(data + H5Tget_member_offset(fix, 1)); mname = H5Tget_member_name(fix, 1); printf("Data comparison:\n" "%14s (%2d) %6f = %f\n" " %6f = %f\n", - mname, (int)H5Tget_member_offset(fix,1), + mname ? mname : "(null)", (int)H5Tget_member_offset(fix,1), fok[0], fptr[0], fok[1], fptr[1]); - free(mname); + if(mname) + free(mname); fptr = (float *)(data + H5Tget_member_offset(fix, 2)); mname = H5Tget_member_name(fix, 2); printf("%14s (%2d) %6f = %f\n" " %6f = %6f\n", - mname, (int)H5Tget_member_offset(fix,2), + mname ? mname : "(null)", (int)H5Tget_member_offset(fix,2), fnok[0], fptr[0], fnok[1], fptr[1]); - free(mname); + if(mname) + free(mname); fptr = (float *)(data + H5Tget_member_offset(fix, 1)); printf("\n" |