summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_dset.c
Commit message (Collapse)AuthorAgeFilesLines
* Source formattedAllen Byrne2020-10-011-238/+229
|
* Merge changes from other branchesAllen Byrne2020-02-291-114/+104
|
* HDFFV-8745 merge h5diff attribute fixAllen Byrne2018-01-111-13/+37
|
* HDFFV-10297 - Cleanup, Initialize variablesAllen Byrne2017-10-231-1/+1
|
* HDFFV-10297 merge from developAllen Byrne2017-10-191-299/+277
|
* HDFFV-10297 merge from developAllen Byrne2017-10-111-58/+47
| | | Also cleaned up some other non-merged changes
* HDFFV-10282 refactor out assert calls in toolsAllen Byrne2017-09-061-8/+4
|
* Correct statement orderAllen Byrne2017-05-181-1/+1
|
* Tools merge from develop-1.10Allen Byrne2017-05-171-257/+201
|
* HDFFV-9994 port changes from develop.Allen Byrne2017-01-181-27/+27
| | | CMake folder changes brought up to standard.
* [svn-r25198] Description:Quincey Koziol2014-05-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring r25197 from trunk to 1.8 branch: Bring changes from hdf5_1_8_coverity branch back to trunk: r20878: Issue 76: Check if H5Tget_nmembers(type) fails and simply return(FALSE). Also move printf to after check. r20880: Issue 192: Create ret_val var set to -1. Add out label for failures to jump to, return ret_val at bottom. r20882: Fixes for coverity: 1) bug #1679: remove dead code in test/mf.c 2) bug #1680: remove dead code in tools/lib/h5diff_dset.c r20883: Fix coverity issue 585 Description: Changed variable "c" in processStrData in h5import.c to an int, to match fgetc return value, and removed call to feof, instead checking if c == EOF. Tested on: MacOSX/64 10.9.3 (amazon) w/C++, FORTRAN & parallel (too minor to require h5committest)
* [svn-r22753] Purpose:Jonathan Kim2012-09-111-7/+0
| | | | | | | | | | | | | HDFFV-5919 - GMQS: h5diff - The number of object difference is not consistent between dataset and group/type when attribute(s) have differences Description: Object differences are not consistent between dataset and group/datatype when their attribute(s) have differences. This is because attribute(s) differences is not accumulated to group or datatype object’s difference, but accumulated to dataset difference. To fix, do not accumulate attribute difference to dataset difference. This is referred to h5diff’s default behavior and also past report from users that users were confused by the accumulated behavior. (also can’t figure out only for dataset difference , also hard to spot dataset difference when it has lots of attributes or differences) This also lead to fix inconsistent format indicating difference between dataset and group/datatype object. Merged from HDF5 trunk r22751. Tested: jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Windows (32-LE cmake), cmake (jam)
* [svn-r22701] Purpose: Jonathan Kim2012-08-201-19/+4
| | | | | | | | | | | | | Address HDFFV-7942 - h5diff: incorrect result for comparing attribute data with different type size in same class Description: When comparing attribute data values with same type class but different size, the result was incorrect. It was due to the size difference and got truncated. Fixed to match up the smaller type size to big type size like what dataset does. Merged from HDF5 trunk r22684 and r22691. Tested: jam (linux32-LE), koala (linux64-LE), ostrich (linuxppc64-BE), tejeda (mac32-LE), Windows (32-LE cmake), cmake (jam)
* [svn-r22013] HDFFV-7560:Allen Byrne2012-03-021-21/+21
| | | | | | | | | | Merge 1.8 and h5dump/tools and tests based on tools library from trunk. Reduced warnings. HDFFV-7949: Remove duplicated functions in h5ls Tested: local linux,h5committest
* [svn-r21404] Purpose:Jonathan Kim2011-09-211-17/+19
| | | | | | | | | | | | | | | | | | | | | | HDFFV-7693 - h5diff produces different behavior between versions: 1.8.3 and 1.8.6 Description: There were two issues on this. One was not displaying all the comparable objects if non-comparable object/attribute exist and compared before comparables ones. This issue occurred after 1.8.4 release. This is the issue from user. The other issue was not displaying all the comparable attributes, if non-comparable object/attribute exist and compared ahead. This issue were exist even before 1.8.4 release. So it's possible some attribute comparison may have not displayed correctly in the past, if non-comparable data were exist in common object. Fixed h5diff to display all the comparable object and attribute regardless of non-comparables. Merged from HDF5 trunk r21396 and r21397. Tested: jam (linux32-LE), koala (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE), Cmake (jam, Windows)
* [svn-r21151] Description:Jonathan Kim2011-07-261-4/+3
| | | | | | | | | | | | | Merged from HDF5 trunk r21105 Fixed two bugs: - h5repack: h5repack failed to copy dataset if the layout is changed from c hunked with unlimited dims to contiguous. (PC -- 2011/07/15) - h5diff: "--delta" option considers two NaN of the same type are different , which is wrong based on http://www.hdfgroup.org/HDF5/doc/RM/Tools.html#Tools-Diff. (PC -- 2011/07/15) Tested: jam (linux32-LE), koala (linux64-LE), heiwa (linuxppc64-BE), tejeda (mac32-LE), linew (solaris-BE)
* [svn-r20288] Purpose:Jonathan Kim2011-03-221-41/+53
| | | | | | | | | | | | | | | Fixed Bug 2216 - GMQS: h5diff - memory leak when compares vlen string in dataset or attributes Description: Merged from HDF5 trunk r20266, r20270 and r20285. Test for dataset : valgrind --leak-check=full ./h5diff -v h5diff_dset1.h5 h5diff_dset2.h5 /g1/VLstring Test for attr : valgrind --leak-check=full ./h5diff h5diff_attr1.h5 h5diff_attr2.h5 Both test cases are in testing script. Tested: jam (linux32-LE), amani (linux64-LE), heiwa (linuxppc64-BE), Cmake - jam
* [svn-r20066] Description:Quincey Koziol2011-02-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring r20065 from trunk to 1.8 branch: Bring changes from Coverity branch to trunk: r19975: Fixed potential mem leak at H5O_attr_open_by_name r19980: Fix coverity issue 792. Free tmp_env_prefix in H5Lexternal.c line 365 if it is not NULL but its contents are 0 when it goes out of scope. r20039: Eliminate warnings about nested extern and implicit declarations of parallel_print and address Coverity defects 712-781 by #including h5tools_utils.h in h5diff_array.c, h5diff_attr.c, h5diff_dset.c and h5diff_util.c. r20046: Purpose: Address TOCTOU warnings in h5jam and h5unjam Description: Coverity is afraid that the state of the input file could change between the call to stat() and the call to open(). This is called a time-of- check time-of-use (TOCTOU) vulnerability. Modified stat calls to fstat which uses an open file pointer so it (hopefully) won't complain any more. r20047: Addressed coverity issues 135-137, 462-464. Local pointers that needed to be freed in case of error were moved out of a switch statement in src/H5Tnative.c, set to NULL, and checked before freeing. Tested on: Mac OS X/32 10.6.6 (amazon) w/debug & production (h5committested on Coverity branch)
* [svn-r20053] Description:Quincey Koziol2011-02-061-147/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring r20052 from trunk to 1.8 branch: Clean up Coverity warnings, and fix some style issues: r19735: Fix for memory leak in test/mf found by valgrind. r19736: Fix memory leak in h5repack. The buffer in copy_objects, when copying the entire dataset at once, was not checked for the presence of a vlen, and vlen storage was never reclaimed. Added check and call to H5D_vlen_reclaim(). r19772: Change H5assert() to if (H5T_VLEN != src->shared->type || H5T_VLEN != dst->shared->type) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a H5T_VLEN datatype") r19774: removed unused priv. r19775: removed unused variables r19778: Fix memory leak comparing for variable length data types. r19834: Fixed memory leaks found by valgrind. Memory errors remain for another day. Tested on: Mac OS X/32 10.6.6 (amazon) w/debug & production (h5committested on branch)
* [svn-r18198] Description:Quincey Koziol2010-01-301-125/+125
| | | | | | | | | Trim trailing whitespace from source code files, with following command: find . \( -name "*.[ch]" -or -name "*.cpp" -or -name "*.f90" \) -print |xargs -n 1 sed -i "" 's/[[:blank:]]*$//' Tested on: None - eyeballed only
* [svn-r18095] Fixed coverity issue # 271.Mike McGreevy2010-01-081-5/+0
| | | | Removed redundant checking and freeing of sm_buf1 and sm_buf2.
* [svn-r17954] Description:Quincey Koziol2009-12-031-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring r17953 from trunk to 1.8 branch: Bring Coverity changes into the trunk: r17877: Error 266: Uninitialized memspace set to -1. Changed malloc and free to HDmalloc and HDfree. Removed unused dtype var. r17878: Error 265: Uninitialized mem_space set to -1. Changed malloc and free to HDmalloc and HDfree. Error 267: Uninitialized smspace set to -1. Changed malloc and free to HDmalloc and HDfree. r17879: Error 242: Uninitialized aid set to -1. Error 243: Uninitialized sid set to -1. Uninitialized tid set to -1 for consistency r17880: Error 242: reinitialized aid to -1 after close to be ready for reuse. Error 243: reinitialized sid to -1 after close to be ready for reuse. reinitialized tid to -1 for consistency after close to be ready for reuse. r17881: use valgrind to check there is a memory leak. The fix is to free ptrstr in line 5838 at xml_dump_group() of h5dump.c after it is used. run the valgrind after the fix, no memory leak for that part of the code. r17882: Fix Coverity items 256 and 269. r17883: Error 222-230: initialized hid_t vars to -1 after close to be ready for reuse. Also added H5Tclose for tid in gent_bigdims r17884: Bug fix (Coverity run2, view 23, dead code) (this is pair-program done by Albert, Elena and Larry). Confirmed and fixed the deadcode in hyperslab read branch of function diff_datasetid. (Discovered other bad code that diff_datasetid() should be recoded. Bug 1693 is entered for this.) r17906: Fix Coverity item 260. r17907: 262: Initialized hid_t's dtype, dtype_tmp and file to -1. Initialized H5T_t * dt to NULL. r17908: Fix Coverity item 261. r17909: Fix Coverity item 248. r17910: Revise fix for Coverity item 248. r17911: Resolved coverity issues #s 263, 162, 163, 164. All issues in dsets.c. Initialized fid and did hid_t's. filter_corrupt function was returning in the middle of an if statement, bypassing free calls. Updated error handling to free buffers and hid_t's appropriately. r17912: (done by Larry and Albert) Cleanup Coverity view warnings (#231-241) about using uninitialized variables. Initialized all of them. r17913: Resolved issue 251 and 264. Initialized tid2 to -1 and initialized buffers that were freed in case of an error. r17914: Resolved coverity issues 66, 220, and 221: 66: Negative Return assignment ignored 220,221: Initialized hid_t's. r17915: Fix Coverity item 247. r17916: Fix Coverity item 246. r17917: Fix Coverity item 245. r17918: Fix Coverity item 244. r17919: Coverity Issue #84: Moved asserts in H5T_cmp to the top of the function, and converted them to HDassert. Coverity complaining about using potentially NULL pointer without checking it. Want to see if Coverity will accept Assertions as acceptable checking before using the value. Tested on: FreeBSD/32 6.3 (duty) w/debug (h5committested on trunk)
* [svn-r16999] merge 16991 from trunkPedro Vicente Nunes2009-06-031-3/+4
| | | | | change messages of -c option tested: windows, linux
* [svn-r16965] merge 16964 from trunkPedro Vicente Nunes2009-05-201-1/+1
| | | | | bug fix: the phrase "Not comparable" was not being printed for the case of different classes tested: windows, linux
* [svn-r16811] merge 16810Pedro Vicente Nunes2009-04-201-7/+7
| | | | | added the words "Not comparable" in the not comparable messages tested: linux
* [svn-r16641] merge from trunk revs 16614, 16629Pedro Vicente Nunes2009-04-011-2/+6
| | | | | | | | | | | 1. #1501 (B1) tools bug if dataset is larger than H5TOOLS_BUFSIZE limit. ISSUE : the tools use the following formula to read by hyperslabs: hyperslab_size[i] = MIN( dim_size[i], H5TOOLS_BUFSIZE / datum_size) where H5TOOLS_BUFSIZE is a constant defined of 1024K. This is OK as long as the datum_size does not exceed 1024K, otherwise we have a hyperslab size of 0 (since 1024K/(greater than 1024K) = 0). This affects h5dump. h5repack, h5diff SOLUTION: add a check for a 0 size and define as 1 if so. TEST FOR H5DUMP: Defined a case in the h5dump test generator program of such a type (an array type of doubles with a large array dimension, that was the case the user reported). Since the written file commited in svn would be around 1024K, opted for not writing the data (the part of the code where the hyperslab is defined is executed, since h5dump always reads the files). Defined a macro WRITE_ARRAY to enable such writing if needed. Added a run on the h5dump shell script. Added 2 new files to svn: tools/testfiles/tarray8.ddl, tools/testfiles/tarray8.h5. NOTE: while doing this I thought of adding this dataset case to an existing file, but that would add the large array output to those files (the ddls). The issue is that the file list is increasing. TEST FOR H5DIFF: for h5diff the check for reading by hyperslabs is H5TOOLS_MALLOCSIZE (128 * H5TOOLS_BUFSIZE) or 128 Mb. This makes it not possible to add such a file to svn, so used the same method as h5dump (only write the dataset if WRITE_ARRAY is defined). As opposed to h5dump, the hyperslab code is NOT executed when the dataset is empty (dataset is not read). Added the new dataset to existing files and shell run (tools/h5diff/testfiles/h5diff_dset1.h5 and tools/h5diff/testfiles/h5diff_dset2.h5 and output in tools/h5diff/testfiles/h5diff_80.txt). TEST FOR H5REPACK: similar issue as h5diff with the difference that the hyperslab code is run. Added a run to the shell script (with a filter, otherwise the code uses H5Ocopy). FURTHER ISSUES: the type in question ("double") has a different output cross platforms (e.g on liberty some garbage number is printed at some array locations) SOLUTION: defined an "int" type for this test. However the printing of such an array has a bogus output at least in one platform (FreeBsd), so eliminated the test run altogether and filed a bug report on this
* [svn-r16463] merge from trunkPedro Vicente Nunes2009-02-111-5/+95
| | | | | | | | | | | | | | | | | | | | Bug fix: for compound types, the not comparable test for members was not done Solution: for compound types, recursively apply that check Two new cases are added 1) the compound type has a different number of members. Message printed is <obj1> has X members <obj2> has Y members Where X and Y are the number of members of each compound type being compared 2) the compound type has not comparable types (for example a double and an int at the same index) In this case the message Comparison not possible: object1 is of class1 and object2 is of class2 Is replaced with Comparison not possible: object1 has a class1 and object2 has a class2 Modified the test generator program to have these 2 cases Added a shell run for these 2 cases Tested: h5committest
* [svn-r16375] merge 16373Pedro Vicente Nunes2009-01-291-23/+23
| | | | | | | replaced some printf statements with parallel_print tested: linux serial (parallel tested in trunk)
* [svn-r16359] merge 16348Pedro Vicente Nunes2009-01-271-0/+2
| | | | | | | bug fix a new line was not inserted at the end of output, causing diff to complain between linux and frebsd tested: linux (freebsd tested on the trunk)
* [svn-r16351] merge 16348Pedro Vicente Nunes2009-01-261-47/+76
| | | | | | | | #1368 (E1) h5diff: implement "not comparable" messages. Implemented RFC. The new option is <-c, --compare List objects that are not comparable> added some test cases tested: windows, linux
* [svn-r15933] for some reason , the use of H5_PRINTF_LL_WIDTH to convert to a ↵Pedro Vicente Nunes2008-10-221-29/+0
| | | | | | | | | unsigned long long format is not working in ia64 linux (tg-login3) hardcoded the format to "%llu" tested: windows, linux (kagiso), solaris, ia64 linux (tg-login3)
* [svn-r15923] The printf call with the format "%"H5_PRINTF_LL_WIDTH"u" prints ↵Pedro Vicente Nunes2008-10-211-2/+5
| | | | | | some garbage in linux ia64 unless we pass to the function a temporary pointer variable Tested: windows, linux (kagiso), solaris, linux ia64 (tg-login3)
* [svn-r15866] add support for long double typePedro Vicente Nunes2008-10-141-800/+818
| | | | tested: windows, linux (32,64)
* [svn-r15629] Description:Quincey Koziol2008-09-161-49/+49
| | | | | | | | | | | | | Remove trailing whitespace from C/C++ source files, with the following script: foreach f (*.[ch] *.cpp) sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f end Tested on: Mac OS X/32 10.5.5 (amazon) No need for h5committest, just whitespace changes...
* [svn-r14193] Description:Quincey Koziol2007-10-081-22/+20
| | | | | | | | | | | | | | | | | | | Make H5Dopen versioned and change all internal usage to use H5Dopen2 Add simple regression test for H5Dopen1 Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
* [svn-r14136] Description:Quincey Koziol2007-09-061-2/+2
| | | | | | | | | | | | | | Move H5Gget_num_objs() and several minor macros, etc. to deprecated symbols section, replacing it with H5Gget_info(). Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Linux/64 2.6 (smirom) AIX/32 5.3 (copper) Solaris/32 5.10 (linew) Mac OS X/32 10.4.10 (amazon)
* [svn-r14115] Description:Quincey Koziol2007-08-281-1/+1
| | | | | | | | | | | | | | | | | Remove all plain calls to H5Gopen() from source, replacing them with either H5Gopen2(). Add test for H5Gopen1(). Reformatted several pieces of code, to clean them up. Tested on: FreeBSD/32 6.2 (duty) FreeBSD/64 6.2 (liberty) Linux/32 2.6 (kagiso) Linux/64 2.6 (smirom) Solaris/32 5.10 (linew) Mac OS X/32 10.4.10 (amazon)
* [svn-r13757] Pedro Vicente Nunes2007-05-161-0/+44
| | | | | | | | | | | h5repack and h5diff hyperslab I/O changed the limit on which hyperslab I/O is done from 1GB to 128MB h5repack currently tests this feature by defining a dataset with dimensions of 128MB + 1byte (the datum being 1 byte integer), in which a 1Kb hyperslab was written. tested: linux there were some errors in running the tests, but these were in the library, due to a recent check-in that will be fixed shortly (at least we hope :-) )
* [svn-r13576] Pedro Vicente Nunes2007-04-031-1/+1
| | | | | | | | bug fix a call was made to printf instead of parallel_print tested linux parallel
* [svn-r13573] Pedro Vicente Nunes2007-04-021-2/+5
| | | | | | | | | | | | Bug fixes Reset external file list slots name_offset to a state when created (0) in H5P_dcrt_copy so that it conforms to an assertion in H5D_update_entry_info that assumes the name_offset is 0 at this point this fixes the problem of h5repack and external files, add a new test and files for an external file h5diff, check for an error return in H5D_get_storage_size tested linux 32, 64
* [svn-r13451] Pedro Vicente Nunes2007-03-051-4/+3
| | | | | | | h5diff bug fix, attributes differences were not being count for total differences Revision of H5Ocopy call in h5repack
* [svn-r13368] Pedro Vicente Nunes2007-02-211-24/+13
| | | | Added a little format alignment to the printing of dimensions
* [svn-r13334] Added a new function to print the dimensions sizesPedro Vicente Nunes2007-02-191-51/+86
|
* [svn-r13253] Updated all C and C++ style source code files with the THG ↵Albert Cheng2007-02-071-2/+3
| | | | | | | | | copyright notice. Tested platform: Kagiso only since it is only a comment block change. If it works in one machine, it should work in all, I hope. Still need to check the parallel build on copper.
* [svn-r13007] Pedro Vicente Nunes2006-12-011-13/+11
| | | | | | cleaned more warnings ../../../hdf5/tools/lib/h5diff_attr.c:214: warning: passing arg 4 of `diff_array' with different width due to prototype
* [svn-r12815] Pedro Vicente Nunes2006-10-251-13/+16
| | | | | | | | | | | | | | 1) added a new parameter to the h5diff function diff_array that contains the beginning position of the hyperslab, so that the total position in the array is printed correctly when reading by hyperslabs. 2) added a new test to h5diff that reads and diffs by hyperslabs. The test reads a 1GB dataset, from which a 1KB hyperslab was written with differences . 3) added the generation of 2 files to the generator program to test the h5diff hyperslab read. 4) changed the h5diff binary pre-generated file names to be more descriptive (e.g, instead of file1.h5, made it h5diff_basic1.h5) 5) changed the name of the h5repack options text file to info.h5repack
* [svn-r12784] Pedro Vicente Nunes2006-10-191-92/+244
| | | | | | | | | | | | | | | | | Fixes for bugs 676, 228 676: both h5repack and h5diff use H5Dread. In the case of a "big" dataset, use read/write by hyperslabs the same way h5dump uses. An arbitrary value of 1GB was defined for "big", i.e, if the dataset is greater than 1GB, then read/write by hyperslabs 228: use the file type in read/write by default. A new switch -n was introduced if the user wants to use a native type, which was the previous use by default. Added a new test for h5repack that repacks a 1GB dataset Tested: heping (serial, parallel), sol, copper
* [svn-r12687] reverted back some changes that inadvertedely added some ↵Pedro Vicente Nunes2006-09-261-1/+1
| | | | | | | | output to the parallel part of h5diff tested : heping parallel
* [svn-r12678] bug fixPedro Vicente Nunes2006-09-251-1/+1
| | | | | the number of atribute differences was not added to the total sum of differences
* [svn-r12440] Purpose:Quincey Koziol2006-06-271-10/+10
| | | | | | | | | | | Code cleanup Description: Trim trailing whitespace in Makefile.am and C/C++ source files to make diffing changes easier. Platforms tested: None necessary, whitespace only change