diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-03-24 19:23:11 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-03-24 19:23:11 (GMT) |
commit | 53e4b5b90b3f5cb9dc7fbe47e6787a5280b2fa04 (patch) | |
tree | 825d37444aa8c0f3bab4442c3f1b0068c7ac2924 /tools/h5diff | |
parent | 65dc3358db37b04cc64b65b88065cbaf48e63a8b (diff) | |
download | hdf5-53e4b5b90b3f5cb9dc7fbe47e6787a5280b2fa04.zip hdf5-53e4b5b90b3f5cb9dc7fbe47e6787a5280b2fa04.tar.gz hdf5-53e4b5b90b3f5cb9dc7fbe47e6787a5280b2fa04.tar.bz2 |
[svn-r16601] Description:
Bring r16536:16600 from trunk back into revise_chunks branch
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.5.6 (amazon) in debug mode
Mac OS X/32 10.5.6 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'tools/h5diff')
-rw-r--r-- | tools/h5diff/Makefile.in | 6 | ||||
-rw-r--r-- | tools/h5diff/h5diff_common.c | 15 | ||||
-rw-r--r-- | tools/h5diff/h5diffgentest.c | 14 | ||||
-rw-r--r-- | tools/h5diff/ph5diff_main.c | 10 |
4 files changed, 27 insertions, 18 deletions
diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index dc0b25c..bf70681 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -270,6 +270,8 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ + +# Install directories that automake doesn't know about docdir = $(exec_prefix)/doc dvidir = @dvidir@ enable_shared = @enable_shared@ @@ -281,9 +283,7 @@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ - -# Install directories that automake doesn't know about -includedir = $(exec_prefix)/include +includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ diff --git a/tools/h5diff/h5diff_common.c b/tools/h5diff/h5diff_common.c index 547d910..8e7b181 100644 --- a/tools/h5diff/h5diff_common.c +++ b/tools/h5diff/h5diff_common.c @@ -19,9 +19,9 @@ #include "h5diff_common.h" #include "h5tools_utils.h" -int check_n_input( const char* ); -int check_p_input( const char* ); -int check_d_input( const char* ); +static int check_n_input( const char* ); +static int check_p_input( const char* ); +static int check_d_input( const char* ); /* module-scoped variables */ @@ -228,7 +228,8 @@ void parse_command_line(int argc, * *------------------------------------------------------------------------- */ -int check_n_input( const char *str ) +static int +check_n_input( const char *str ) { unsigned i; char c; @@ -263,7 +264,8 @@ int check_n_input( const char *str ) * *------------------------------------------------------------------------- */ -int check_p_input( const char *str ) +static int +check_p_input( const char *str ) { double x; @@ -296,7 +298,8 @@ int check_p_input( const char *str ) * *------------------------------------------------------------------------- */ -int check_d_input( const char *str ) +static int +check_d_input( const char *str ) { double x; diff --git a/tools/h5diff/h5diffgentest.c b/tools/h5diff/h5diffgentest.c index d9495e5..181e242 100644 --- a/tools/h5diff/h5diffgentest.c +++ b/tools/h5diff/h5diffgentest.c @@ -55,7 +55,7 @@ return -1; } const H5L_class_t UD_link_class[1] = {{ H5L_LINK_CLASS_T_VERS, /* H5L_class_t version */ - MY_LINKCLASS, /* Link type id number */ + (H5L_type_t)MY_LINKCLASS, /* Link type id number */ "UD link class", /* name for debugging */ NULL, /* Creation callback */ NULL, /* Move/rename callback */ @@ -492,7 +492,7 @@ int test_types(const char *fname) */ H5Lcreate_external("filename", "objname", fid1, "ext_link", H5P_DEFAULT, H5P_DEFAULT); H5Lregister(UD_link_class); - H5Lcreate_ud(fid1, "ud_link", MY_LINKCLASS, NULL, (size_t)0, H5P_DEFAULT, H5P_DEFAULT); + H5Lcreate_ud(fid1, "ud_link", (H5L_type_t)MY_LINKCLASS, NULL, (size_t)0, H5P_DEFAULT, H5P_DEFAULT); /*------------------------------------------------------------------------- * Close @@ -2608,6 +2608,7 @@ void gen_datareg(hid_t fid, sid1 = H5Screate_simple(2, dims1, NULL); did1 = H5Dcreate2(fid, "dsetref", H5T_NATIVE_INT, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); status = H5Dwrite(did1, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); + assert(status >= 0); /* create the reference dataset */ sid2 = H5Screate_simple(1, dims2, NULL); @@ -2624,10 +2625,12 @@ void gen_datareg(hid_t fid, } status = H5Sselect_hyperslab(sid1, H5S_SELECT_SET, start, NULL, count, NULL); + assert(status >= 0); H5Sget_select_npoints(sid1); /* store first dataset region */ status = H5Rcreate(&rbuf[0], fid, "dsetref", H5R_DATASET_REGION, sid1); + assert(status >= 0); /* select sequence of five points for second reference */ coord[0][0]=6; coord[0][1]=9; @@ -2649,15 +2652,20 @@ void gen_datareg(hid_t fid, /* write */ status = H5Dwrite(did2,H5T_STD_REF_DSETREG,H5S_ALL,H5S_ALL,H5P_DEFAULT,rbuf); + assert(status >= 0); /* close, free memory buffers */ status = H5Dclose(did1); + assert(status >= 0); status = H5Sclose(sid1); + assert(status >= 0); status = H5Dclose(did2); + assert(status >= 0); status = H5Sclose(sid2); + assert(status >= 0); + free(rbuf); free(buf); - } diff --git a/tools/h5diff/ph5diff_main.c b/tools/h5diff/ph5diff_main.c index a4ac793..c613879 100644 --- a/tools/h5diff/ph5diff_main.c +++ b/tools/h5diff/ph5diff_main.c @@ -16,6 +16,7 @@ #include "h5diff.h" #include "ph5diff.h" #include <stdlib.h> +#include <string.h> #include <assert.h> #include "h5diff_common.h" @@ -59,7 +60,6 @@ int main(int argc, const char *argv[]) const char *fname2 = NULL; const char *objname1 = NULL; const char *objname2 = NULL; - hsize_t nfound=0; diff_opt_t options; outBuffOffset = 0; @@ -78,7 +78,7 @@ int main(int argc, const char *argv[]) parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &options); - nfound = h5diff(fname1, fname2, objname1, objname2, &options); + h5diff(fname1, fname2, objname1, objname2, &options); print_info(&options); @@ -92,7 +92,7 @@ int main(int argc, const char *argv[]) { parse_command_line(argc, argv, &fname1, &fname2, &objname1, &objname2, &options); - nfound = h5diff(fname1, fname2, objname1, objname2, &options); + h5diff(fname1, fname2, objname1, objname2, &options); MPI_Barrier(MPI_COMM_WORLD); @@ -131,7 +131,6 @@ ph5diff_worker(int nID) hid_t file1_id, file2_id; char filenames[2][1024]; char out_data[PRINT_DATA_MAX_SIZE] = {0}; - hsize_t nfound=0; struct diffs_found diffs; int i; MPI_Status Status; @@ -170,8 +169,7 @@ ph5diff_worker(int nID) /*Recv parameters for diff from manager task */ MPI_Recv(&args, sizeof(args), MPI_BYTE, 0, MPI_TAG_ARGS, MPI_COMM_WORLD, &Status); /*Do the diff */ - nfound = diff(file1_id, args.name, file2_id, args.name, &(args.options), args.type); - diffs.nfound = nfound; + diffs.nfound = diff(file1_id, args.name, file2_id, args.name, &(args.options), args.type); diffs.not_cmp = args.options.not_cmp; /*If print buffer has something in it, request print token.*/ |