* Revert addition of & to 2 parameters in DSetCreatPropList::setVirtual to maintain binary compatibility. * Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625) * Removes gratuitous (double)x.yF casts (#632) * Committing clang-format changes * Removes gratuitous (double)x.yF casts * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Cleans up a const warning left over from previous constification (#633) * Committing clang-format changes * Adds consts to a few global variables * Cleans up a const warning left over from previous constification Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Purges UFAIL from the library (#637) * Committing clang-format changes * Purges UFAIL from the library * H5HL_insert change requested in PR Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Bmr dev hdffv 11223 (#640) * Fixed HDFFV-11223 (CVE-2018-14460) Description - Added checks against buffer size to prevent segfault, in case of data corruption, for sdim->size and sdim->max. - Renamed data files in an existing test to shorten their length as agreed with other developers previously. Platforms tested: Linux/64 (jelly) * Committing clang-format changes * Updated for test files * Updated for HDFFV-11223 Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes * Restore "error:" in line 2666. * Revert "Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625)" This reverts commit426b504848. * Snapshot version 1.10 release 8-1. Update version to 1.10.8-2. Squashed commit of the following: commit60734e63feAuthor: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Thu Jun 24 14:20:39 2021 -0500 Hdf5 1 10 Fix tools test (#796) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path * Update missing release note info. * Update code owners * Add known problem * Use only core library for testing dynamic plugins. CMake uses H5_HAVE_DIRECT instead of DIRECT_VFD Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commitbfb780a444Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Wed Jun 23 14:11:46 2021 -0500 Hdf5 1 10 Release Note (#786) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path * Update missing release note info. * Update code owners * Add known problem Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit9f50407368Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue Jun 22 07:03:26 2021 -0500 Hdf5 1 10 Update missing release note info. (#778) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path * Update missing release note info. * Update code owners Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit2e80c9cdecAuthor: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Fri Jun 18 06:42:23 2021 -0700 Brings hash table IDs feature from develop/1.12 (#768) * Brings updated tid test from develop * Adds empty H5Iint.c and H5Idbg.c files * H5I renaming to match 1.12/develop * Splits off H5I debug code to H5Idbg.c * Splits internal H5I.c functionality to H5Iint.c * Header cleanup * More renaming cleanup to match develop/1.12 * Adds "save last ID" optimization * Adds uthash.h * Adds hash table IDs from develop/1.12 * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit1e29bcbfe2Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Thu Jun 17 11:21:43 2021 -0500 Hdf5 1 10 Fix cmake configure path (#762) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit475cdaf431Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Wed Jun 16 15:45:58 2021 -0500 Hdf5 1 10 merge warnings changes (#756) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commite25980e7f3Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue Jun 8 14:37:13 2021 -0500 Hdf5 1 10 merges of CMake changes (#738) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit061b23ac00Author: Larry Knox <lrknox@hdfgroup.org> Date: Thu Jun 3 16:07:23 2021 -0500 Partial merge issue #642 develop branch PRs to Hdf5 1 10 (#718) * Revert addition of & to 2 parameters in DSetCreatPropList::setVirtual to maintain binary compatibility. * Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625) * Removes gratuitous (double)x.yF casts (#632) * Committing clang-format changes * Removes gratuitous (double)x.yF casts * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Cleans up a const warning left over from previous constification (#633) * Committing clang-format changes * Adds consts to a few global variables * Cleans up a const warning left over from previous constification Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Purges UFAIL from the library (#637) * Committing clang-format changes * Purges UFAIL from the library * H5HL_insert change requested in PR Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Bmr dev hdffv 11223 (#640) * Fixed HDFFV-11223 (CVE-2018-14460) Description - Added checks against buffer size to prevent segfault, in case of data corruption, for sdim->size and sdim->max. - Renamed data files in an existing test to shorten their length as agreed with other developers previously. Platforms tested: Linux/64 (jelly) * Committing clang-format changes * Updated for test files * Updated for HDFFV-11223 Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes * Restore "error:" in line 2666. * Revert "Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625)" This reverts commit426b504848. Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * (fix) Segmentation fault when using a compound type. (#143) * (fix) Segmentation fault when using a compound type. In the case when a compounded attribute is written to dataset followed by writing the data with a data transform function to the dataset will result in a segmentation fault. It turns out the data is classified as compounded while it is not. Now, the state is always reset first to not compounded followed by the existing check if the variable is compounded. * (fix) Removed undesired comment lines. * (fix) Segmentation fault when using a compound type: added test. * (fix) Added the missing cmpd_transform.c file to MANIFEST. * (fix) cmpd_dtransform test: autotools and source header. Added the cmp_dtransform test to the autotools configuration and updated the HDF Group copyright header. Co-authored-by: Jan-Willem Blokland <Jan-Willem.Blokland@Shell.com> * (fix) H5Z_xform_create function and scientific notation (#144) * (fix) H5Z_xform_create function and scientific notation Implemented a more sophisticated check to support scientific notation in the expression of the H5Zset_data_transform function. * (fix) H5Z_xform_create and scientific notation: Added test. Added a test to demonstrate that the parsing of expression which includes scientific notation works correctly. Improved inline comment. Co-authored-by: Jan-Willem Blokland <Jan-Willem.Blokland@Shell.com> * Adds const to a few global variables (#623) * Committing clang-format changes * Adds consts to a few global variables Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Made private my_yyinput function static (#618) This prevents it being exported as a public symbol. * Reduces overly-pedantic casting in the public headers (#644) * Committing clang-format changes * Fixes overly pedantic casting in public headers Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Use internal version of H5Eprint2 to avoid possible stack overflow (#661) * Fixes for a couple of trivial warnings (#676) * Committing clang-format changes * Trivial warning fixes: * Removes an unused done target in H5Tbit.c * Add (void) to quiet "ignored return value" warnings in the generators (which generally ignore errors) Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Removes alternative function enter/leave macro scheme (#678) * Committing clang-format changes * Converted BEGIN_FUNC, etc. macros to FUNC_ENTER * Rips out the BEGIN_FUNC, etc. macros * Removes 'end if', etc. comments from H5HL package * Committing clang-format changes * Fixes an H5EA iterate issue * Fixes an issue in the H5FA iterator code * Further cleanup in bin/trace after macro removal * Iterator changes in H5EA and H5FA Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Various CMake changes (#679) * Committing clang-format changes * Several CMake updates: * Removes unused HDF5_ENABLE_HSIZET * Switches TEST_SHELL_SCRIPTS to ON * Sets SH_PROGRAM to bash instead of sh * Set default build type back to RelWithDebInfo Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Revert "Removes alternative function enter/leave macro scheme (#678)" This reverts commitedddb11b79. * err_compat test cleanup (#681) * Committing clang-format changes * Cleans up err_compat test and output * Formatted source Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Sets the memory alloc sanity check option to disabled in autotools (#686) * Revert "Sets the memory alloc sanity check option to disabled in autotools (#686)" This reverts commit652ffca586. (Only for release branch). * Removes alternative function enter/leave macro scheme (#678) * Committing clang-format changes * Converted BEGIN_FUNC, etc. macros to FUNC_ENTER * Rips out the BEGIN_FUNC, etc. macros * Removes 'end if', etc. comments from H5HL package * Committing clang-format changes * Fixes an H5EA iterate issue * Fixes an issue in the H5FA iterator code * Further cleanup in bin/trace after macro removal * Iterator changes in H5EA and H5FA Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes * Squashed commit of the following: commite2578640feAuthor: Larry Knox <lrknox@hdfgroup.org> Date: Fri Jul 16 10:57:51 2021 -0500 Merge issue 839 changes to hdf5 1 10 (#841) * Revert addition of & to 2 parameters in DSetCreatPropList::setVirtual to maintain binary compatibility. * Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625) * Removes gratuitous (double)x.yF casts (#632) * Committing clang-format changes * Removes gratuitous (double)x.yF casts * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Cleans up a const warning left over from previous constification (#633) * Committing clang-format changes * Adds consts to a few global variables * Cleans up a const warning left over from previous constification Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Purges UFAIL from the library (#637) * Committing clang-format changes * Purges UFAIL from the library * H5HL_insert change requested in PR Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Bmr dev hdffv 11223 (#640) * Fixed HDFFV-11223 (CVE-2018-14460) Description - Added checks against buffer size to prevent segfault, in case of data corruption, for sdim->size and sdim->max. - Renamed data files in an existing test to shorten their length as agreed with other developers previously. Platforms tested: Linux/64 (jelly) * Committing clang-format changes * Updated for test files * Updated for HDFFV-11223 Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes * Restore "error:" in line 2666. * Revert "Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625)" This reverts commit426b504848. * Snapshot version 1.10 release 8-1. Update version to 1.10.8-2. Squashed commit of the following: commit60734e63feAuthor: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Thu Jun 24 14:20:39 2021 -0500 Hdf5 1 10 Fix tools test (#796) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path * Update missing release note info. * Update code owners * Add known problem * Use only core library for testing dynamic plugins. CMake uses H5_HAVE_DIRECT instead of DIRECT_VFD Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commitbfb780a444Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Wed Jun 23 14:11:46 2021 -0500 Hdf5 1 10 Release Note (#786) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path * Update missing release note info. * Update code owners * Add known problem Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit9f50407368Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue Jun 22 07:03:26 2021 -0500 Hdf5 1 10 Update missing release note info. (#778) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path * Update missing release note info. * Update code owners Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit2e80c9cdecAuthor: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Fri Jun 18 06:42:23 2021 -0700 Brings hash table IDs feature from develop/1.12 (#768) * Brings updated tid test from develop * Adds empty H5Iint.c and H5Idbg.c files * H5I renaming to match 1.12/develop * Splits off H5I debug code to H5Idbg.c * Splits internal H5I.c functionality to H5Iint.c * Header cleanup * More renaming cleanup to match develop/1.12 * Adds "save last ID" optimization * Adds uthash.h * Adds hash table IDs from develop/1.12 * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit1e29bcbfe2Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Thu Jun 17 11:21:43 2021 -0500 Hdf5 1 10 Fix cmake configure path (#762) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit475cdaf431Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Wed Jun 16 15:45:58 2021 -0500 Hdf5 1 10 merge warnings changes (#756) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commite25980e7f3Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue Jun 8 14:37:13 2021 -0500 Hdf5 1 10 merges of CMake changes (#738) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit061b23ac00Author: Larry Knox <lrknox@hdfgroup.org> Date: Thu Jun 3 16:07:23 2021 -0500 Partial merge issue #642 develop branch PRs to Hdf5 1 10 (#718) * Revert addition of & to 2 parameters in DSetCreatPropList::setVirtual to maintain binary compatibility. * Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625) * Removes gratuitous (double)x.yF casts (#632) * Committing clang-format changes * Removes gratuitous (double)x.yF casts * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Cleans up a const warning left over from previous constification (#633) * Committing clang-format changes * Adds consts to a few global variables * Cleans up a const warning left over from previous constification Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Purges UFAIL from the library (#637) * Committing clang-format changes * Purges UFAIL from the library * H5HL_insert change requested in PR Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Bmr dev hdffv 11223 (#640) * Fixed HDFFV-11223 (CVE-2018-14460) Description - Added checks against buffer size to prevent segfault, in case of data corruption, for sdim->size and sdim->max. - Renamed data files in an existing test to shorten their length as agreed with other developers previously. Platforms tested: Linux/64 (jelly) * Committing clang-format changes * Updated for test files * Updated for HDFFV-11223 Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes * Restore "error:" in line 2666. * Revert "Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625)" This reverts commit426b504848. Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * (fix) Segmentation fault when using a compound type. (#143) * (fix) Segmentation fault when using a compound type. In the case when a compounded attribute is written to dataset followed by writing the data with a data transform function to the dataset will result in a segmentation fault. It turns out the data is classified as compounded while it is not. Now, the state is always reset first to not compounded followed by the existing check if the variable is compounded. * (fix) Removed undesired comment lines. * (fix) Segmentation fault when using a compound type: added test. * (fix) Added the missing cmpd_transform.c file to MANIFEST. * (fix) cmpd_dtransform test: autotools and source header. Added the cmp_dtransform test to the autotools configuration and updated the HDF Group copyright header. Co-authored-by: Jan-Willem Blokland <Jan-Willem.Blokland@Shell.com> * (fix) H5Z_xform_create function and scientific notation (#144) * (fix) H5Z_xform_create function and scientific notation Implemented a more sophisticated check to support scientific notation in the expression of the H5Zset_data_transform function. * (fix) H5Z_xform_create and scientific notation: Added test. Added a test to demonstrate that the parsing of expression which includes scientific notation works correctly. Improved inline comment. Co-authored-by: Jan-Willem Blokland <Jan-Willem.Blokland@Shell.com> * Adds const to a few global variables (#623) * Committing clang-format changes * Adds consts to a few global variables Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Made private my_yyinput function static (#618) This prevents it being exported as a public symbol. * Reduces overly-pedantic casting in the public headers (#644) * Committing clang-format changes * Fixes overly pedantic casting in public headers Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Use internal version of H5Eprint2 to avoid possible stack overflow (#661) * Fixes for a couple of trivial warnings (#676) * Committing clang-format changes * Trivial warning fixes: * Removes an unused done target in H5Tbit.c * Add (void) to quiet "ignored return value" warnings in the generators (which generally ignore errors) Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Removes alternative function enter/leave macro scheme (#678) * Committing clang-format changes * Converted BEGIN_FUNC, etc. macros to FUNC_ENTER * Rips out the BEGIN_FUNC, etc. macros * Removes 'end if', etc. comments from H5HL package * Committing clang-format changes * Fixes an H5EA iterate issue * Fixes an issue in the H5FA iterator code * Further cleanup in bin/trace after macro removal * Iterator changes in H5EA and H5FA Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Various CMake changes (#679) * Committing clang-format changes * Several CMake updates: * Removes unused HDF5_ENABLE_HSIZET * Switches TEST_SHELL_SCRIPTS to ON * Sets SH_PROGRAM to bash instead of sh * Set default build type back to RelWithDebInfo Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Revert "Removes alternative function enter/leave macro scheme (#678)" This reverts commitedddb11b79. * err_compat test cleanup (#681) * Committing clang-format changes * Cleans up err_compat test and output * Formatted source Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Sets the memory alloc sanity check option to disabled in autotools (#686) * Revert "Sets the memory alloc sanity check option to disabled in autotools (#686)" This reverts commit652ffca586. (Only for release branch). * Removes alternative function enter/leave macro scheme (#678) * Committing clang-format changes * Converted BEGIN_FUNC, etc. macros to FUNC_ENTER * Rips out the BEGIN_FUNC, etc. macros * Removes 'end if', etc. comments from H5HL package * Committing clang-format changes * Fixes an H5EA iterate issue * Fixes an issue in the H5FA iterator code * Further cleanup in bin/trace after macro removal * Iterator changes in H5EA and H5FA Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> Co-authored-by: Jan-Willem Blokland <J.W.S.Blokland@XS4All.nl> Co-authored-by: Jan-Willem Blokland <Jan-Willem.Blokland@Shell.com> Co-authored-by: Sean McBride <sean@rogue-research.com> commit14794490ecAuthor: Larry Knox <lrknox@hdfgroup.org> Date: Wed Jul 14 13:50:26 2021 -0500 Update version to 1.10.8-2 after snapshot release of 1.10.8-1 (#838) * Revert addition of & to 2 parameters in DSetCreatPropList::setVirtual to maintain binary compatibility. * Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625) * Removes gratuitous (double)x.yF casts (#632) * Committing clang-format changes * Removes gratuitous (double)x.yF casts * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Cleans up a const warning left over from previous constification (#633) * Committing clang-format changes * Adds consts to a few global variables * Cleans up a const warning left over from previous constification Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Purges UFAIL from the library (#637) * Committing clang-format changes * Purges UFAIL from the library * H5HL_insert change requested in PR Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Bmr dev hdffv 11223 (#640) * Fixed HDFFV-11223 (CVE-2018-14460) Description - Added checks against buffer size to prevent segfault, in case of data corruption, for sdim->size and sdim->max. - Renamed data files in an existing test to shorten their length as agreed with other developers previously. Platforms tested: Linux/64 (jelly) * Committing clang-format changes * Updated for test files * Updated for HDFFV-11223 Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes * Restore "error:" in line 2666. * Revert "Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625)" This reverts commit426b504848. * Snapshot version 1.10 release 8-1. Update version to 1.10.8-2. Squashed commit of the following: commit60734e63feAuthor: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Thu Jun 24 14:20:39 2021 -0500 Hdf5 1 10 Fix tools test (#796) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path * Update missing release note info. * Update code owners * Add known problem * Use only core library for testing dynamic plugins. CMake uses H5_HAVE_DIRECT instead of DIRECT_VFD Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commitbfb780a444Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Wed Jun 23 14:11:46 2021 -0500 Hdf5 1 10 Release Note (#786) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path * Update missing release note info. * Update code owners * Add known problem Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit9f50407368Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue Jun 22 07:03:26 2021 -0500 Hdf5 1 10 Update missing release note info. (#778) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path * Update missing release note info. * Update code owners Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit2e80c9cdecAuthor: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Fri Jun 18 06:42:23 2021 -0700 Brings hash table IDs feature from develop/1.12 (#768) * Brings updated tid test from develop * Adds empty H5Iint.c and H5Idbg.c files * H5I renaming to match 1.12/develop * Splits off H5I debug code to H5Idbg.c * Splits internal H5I.c functionality to H5Iint.c * Header cleanup * More renaming cleanup to match develop/1.12 * Adds "save last ID" optimization * Adds uthash.h * Adds hash table IDs from develop/1.12 * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit1e29bcbfe2Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Thu Jun 17 11:21:43 2021 -0500 Hdf5 1 10 Fix cmake configure path (#762) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit475cdaf431Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Wed Jun 16 15:45:58 2021 -0500 Hdf5 1 10 merge warnings changes (#756) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commite25980e7f3Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue Jun 8 14:37:13 2021 -0500 Hdf5 1 10 merges of CMake changes (#738) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit061b23ac00Author: Larry Knox <lrknox@hdfgroup.org> Date: Thu Jun 3 16:07:23 2021 -0500 Partial merge issue #642 develop branch PRs to Hdf5 1 10 (#718) * Revert addition of & to 2 parameters in DSetCreatPropList::setVirtual to maintain binary compatibility. * Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625) * Removes gratuitous (double)x.yF casts (#632) * Committing clang-format changes * Removes gratuitous (double)x.yF casts * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Cleans up a const warning left over from previous constification (#633) * Committing clang-format changes * Adds consts to a few global variables * Cleans up a const warning left over from previous constification Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Purges UFAIL from the library (#637) * Committing clang-format changes * Purges UFAIL from the library * H5HL_insert change requested in PR Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Bmr dev hdffv 11223 (#640) * Fixed HDFFV-11223 (CVE-2018-14460) Description - Added checks against buffer size to prevent segfault, in case of data corruption, for sdim->size and sdim->max. - Renamed data files in an existing test to shorten their length as agreed with other developers previously. Platforms tested: Linux/64 (jelly) * Committing clang-format changes * Updated for test files * Updated for HDFFV-11223 Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes * Restore "error:" in line 2666. * Revert "Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625)" This reverts commit426b504848. Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * Revert references to SIZE_MAX to ((size_t)(-1)) in C header defines used by c++ code that fail on centos7 when -std=c++11 is not set. * Fix H5FD_mpio_Debug="rw" can report MPI_count instead of bytes (#699) * fixed missed closing of a dataset * fixed missed closing of a dataset * fixed typo in error return * Committing clang-format changes * minor edits * code format * Committing clang-format changes * code format * minor edit * switched from using MPI_count, to actual bytes written for H5FD_mpio_debug rw debugging * Committing clang-format changes * changed size_i in printf to reflect the I/O. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Removes pre-C99 build and header cruft (#700) * Committing clang-format changes * Removes pre-C99 build and header cruft * Assumes ANSI C headers exist * Assumes stdbool.h, stdint.h, and inttypes.h are present * Assumes the C++ compiler can handle stdint.h * Removes all work-arounds for missing functionality, especially stdbool.h * Formats source Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Clean up type size checks in configure.ac (#702) * Removes some DEC Alpha cruft from H5detect and H5private.h (#708) * Cleans up hsize_t and haddr_t size guessing (#709) * Cleans up definitions of haddr_t and hsize_t + cruft removal * Formatted source * Revert "Cleans up hsize_t and haddr_t size guessing (#709)" This reverts commitbe6ad9a7a0. * Updates bin/trace script to correctly wrap H5TRACE macros near clang-format column limit (#719) * Removes clang-format comments from H5O.c call * Fixes bin/trace to correctly wrap lines near the clang-format limit * Removed unused variable from bin/trace Conflicts: bin/trace src/H5O.c * Fixes a segfault when H5Pset_mdc_log_options is called multiple times on a fapl (#601) * Committing clang-format changes * Fixes a segfault when H5Pset_mdc_log_options() is called multiple times An internal string is incorrectly freed when the API call is invoked multiple times on a property list, which will usually cause a segfault to occur. On the first call the log location is NULL so the problem doesn't occur. Fixes HDFFV-11239 * Fixes typos Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Conflicts: release_docs/RELEASE.txt * Fix for a segfault when H5Pset_fapl_log is passed an invalid fapl ID (#607) * Committing clang-format changes * Fixes an issue where H5Pset_fapl_log sefaults when passed an invalid fapl ID This was due to a pointer-containing struct being memset after the first internal API call. If the first call failed, the error condition would check if the pointer was not NULL and then attempt to free it if not. This would lead to the freeing of a wild pointer if an invalid fapl ID were passed in. This was fixed by reordering the memset and adding a test to ensure the problem stays fixed. Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Conflicts: release_docs/RELEASE.txt * Fixes crashes when size_hint > UINT32_MAX is passed to H5Gcreate1 (#611) * Committing clang-format changes * Fixes incorrect size_hint handling in H5Gcreate1 * Updates the size hint type for group creation * Updates the RELEASE.txt note * Revert "Updates the RELEASE.txt note" This reverts commit3df386acca. * Reverts previous behavior to use a uint32_t struct field * Updates RELEASE.txt Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Conflicts: src/H5Gdeprec.c * Adds __STDC_FORMAT_MACROS before including inttypes.h w/ C++ (#726) * Adds __STDC_FORMAT_MACROS before including inttypes.h w/ C++ Allows C++ library to be built on older versions of gcc. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Conflicts: src/H5public.h * Remove conflicts from RELEASE.txt * Always include inttypes.h * Moves H5PacketTable default ctor inside source file (#731) * Remove private H5_GCC_DIAG_OFF/ON from standalone program (#734) * Fixes C++ warnings when passing hsize_t values to printf in test code (#745) * Squashed commit of the following: commit1aa2c3421bAuthor: Larry Knox <lrknox@hdfgroup.org> Date: Sun Jul 25 21:20:20 2021 -0500 Merge issue 839 develop PRs to hdf5 1 10 - round 2 (#852) * Revert addition of & to 2 parameters in DSetCreatPropList::setVirtual to maintain binary compatibility. * Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625) * Removes gratuitous (double)x.yF casts (#632) * Committing clang-format changes * Removes gratuitous (double)x.yF casts * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Cleans up a const warning left over from previous constification (#633) * Committing clang-format changes * Adds consts to a few global variables * Cleans up a const warning left over from previous constification Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Purges UFAIL from the library (#637) * Committing clang-format changes * Purges UFAIL from the library * H5HL_insert change requested in PR Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Bmr dev hdffv 11223 (#640) * Fixed HDFFV-11223 (CVE-2018-14460) Description - Added checks against buffer size to prevent segfault, in case of data corruption, for sdim->size and sdim->max. - Renamed data files in an existing test to shorten their length as agreed with other developers previously. Platforms tested: Linux/64 (jelly) * Committing clang-format changes * Updated for test files * Updated for HDFFV-11223 Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes * Restore "error:" in line 2666. * Revert "Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625)" This reverts commit426b504848. * Snapshot version 1.10 release 8-1. Update version to 1.10.8-2. Squashed commit of the following: commit60734e63feAuthor: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Thu Jun 24 14:20:39 2021 -0500 Hdf5 1 10 Fix tools test (#796) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path * Update missing release note info. * Update code owners * Add known problem * Use only core library for testing dynamic plugins. CMake uses H5_HAVE_DIRECT instead of DIRECT_VFD Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commitbfb780a444Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Wed Jun 23 14:11:46 2021 -0500 Hdf5 1 10 Release Note (#786) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path * Update missing release note info. * Update code owners * Add known problem Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit9f50407368Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue Jun 22 07:03:26 2021 -0500 Hdf5 1 10 Update missing release note info. (#778) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path * Update missing release note info. * Update code owners Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit2e80c9cdecAuthor: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Fri Jun 18 06:42:23 2021 -0700 Brings hash table IDs feature from develop/1.12 (#768) * Brings updated tid test from develop * Adds empty H5Iint.c and H5Idbg.c files * H5I renaming to match 1.12/develop * Splits off H5I debug code to H5Idbg.c * Splits internal H5I.c functionality to H5Iint.c * Header cleanup * More renaming cleanup to match develop/1.12 * Adds "save last ID" optimization * Adds uthash.h * Adds hash table IDs from develop/1.12 * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit1e29bcbfe2Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Thu Jun 17 11:21:43 2021 -0500 Hdf5 1 10 Fix cmake configure path (#762) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit475cdaf431Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Wed Jun 16 15:45:58 2021 -0500 Hdf5 1 10 merge warnings changes (#756) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commite25980e7f3Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue Jun 8 14:37:13 2021 -0500 Hdf5 1 10 merges of CMake changes (#738) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit061b23ac00Author: Larry Knox <lrknox@hdfgroup.org> Date: Thu Jun 3 16:07:23 2021 -0500 Partial merge issue #642 develop branch PRs to Hdf5 1 10 (#718) * Revert addition of & to 2 parameters in DSetCreatPropList::setVirtual to maintain binary compatibility. * Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625) * Removes gratuitous (double)x.yF casts (#632) * Committing clang-format changes * Removes gratuitous (double)x.yF casts * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Cleans up a const warning left over from previous constification (#633) * Committing clang-format changes * Adds consts to a few global variables * Cleans up a const warning left over from previous constification Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Purges UFAIL from the library (#637) * Committing clang-format changes * Purges UFAIL from the library * H5HL_insert change requested in PR Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Bmr dev hdffv 11223 (#640) * Fixed HDFFV-11223 (CVE-2018-14460) Description - Added checks against buffer size to prevent segfault, in case of data corruption, for sdim->size and sdim->max. - Renamed data files in an existing test to shorten their length as agreed with other developers previously. Platforms tested: Linux/64 (jelly) * Committing clang-format changes * Updated for test files * Updated for HDFFV-11223 Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes * Restore "error:" in line 2666. * Revert "Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625)" This reverts commit426b504848. Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * (fix) Segmentation fault when using a compound type. (#143) * (fix) Segmentation fault when using a compound type. In the case when a compounded attribute is written to dataset followed by writing the data with a data transform function to the dataset will result in a segmentation fault. It turns out the data is classified as compounded while it is not. Now, the state is always reset first to not compounded followed by the existing check if the variable is compounded. * (fix) Removed undesired comment lines. * (fix) Segmentation fault when using a compound type: added test. * (fix) Added the missing cmpd_transform.c file to MANIFEST. * (fix) cmpd_dtransform test: autotools and source header. Added the cmp_dtransform test to the autotools configuration and updated the HDF Group copyright header. Co-authored-by: Jan-Willem Blokland <Jan-Willem.Blokland@Shell.com> * (fix) H5Z_xform_create function and scientific notation (#144) * (fix) H5Z_xform_create function and scientific notation Implemented a more sophisticated check to support scientific notation in the expression of the H5Zset_data_transform function. * (fix) H5Z_xform_create and scientific notation: Added test. Added a test to demonstrate that the parsing of expression which includes scientific notation works correctly. Improved inline comment. Co-authored-by: Jan-Willem Blokland <Jan-Willem.Blokland@Shell.com> * Adds const to a few global variables (#623) * Committing clang-format changes * Adds consts to a few global variables Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Made private my_yyinput function static (#618) This prevents it being exported as a public symbol. * Reduces overly-pedantic casting in the public headers (#644) * Committing clang-format changes * Fixes overly pedantic casting in public headers Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Use internal version of H5Eprint2 to avoid possible stack overflow (#661) * Fixes for a couple of trivial warnings (#676) * Committing clang-format changes * Trivial warning fixes: * Removes an unused done target in H5Tbit.c * Add (void) to quiet "ignored return value" warnings in the generators (which generally ignore errors) Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Removes alternative function enter/leave macro scheme (#678) * Committing clang-format changes * Converted BEGIN_FUNC, etc. macros to FUNC_ENTER * Rips out the BEGIN_FUNC, etc. macros * Removes 'end if', etc. comments from H5HL package * Committing clang-format changes * Fixes an H5EA iterate issue * Fixes an issue in the H5FA iterator code * Further cleanup in bin/trace after macro removal * Iterator changes in H5EA and H5FA Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Various CMake changes (#679) * Committing clang-format changes * Several CMake updates: * Removes unused HDF5_ENABLE_HSIZET * Switches TEST_SHELL_SCRIPTS to ON * Sets SH_PROGRAM to bash instead of sh * Set default build type back to RelWithDebInfo Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Revert "Removes alternative function enter/leave macro scheme (#678)" This reverts commitedddb11b79. * err_compat test cleanup (#681) * Committing clang-format changes * Cleans up err_compat test and output * Formatted source Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Sets the memory alloc sanity check option to disabled in autotools (#686) * Revert "Sets the memory alloc sanity check option to disabled in autotools (#686)" This reverts commit652ffca586. (Only for release branch). * Removes alternative function enter/leave macro scheme (#678) * Committing clang-format changes * Converted BEGIN_FUNC, etc. macros to FUNC_ENTER * Rips out the BEGIN_FUNC, etc. macros * Removes 'end if', etc. comments from H5HL package * Committing clang-format changes * Fixes an H5EA iterate issue * Fixes an issue in the H5FA iterator code * Further cleanup in bin/trace after macro removal * Iterator changes in H5EA and H5FA Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes * Squashed commit of the following: commite2578640feAuthor: Larry Knox <lrknox@hdfgroup.org> Date: Fri Jul 16 10:57:51 2021 -0500 Merge issue 839 changes to hdf5 1 10 (#841) * Revert addition of & to 2 parameters in DSetCreatPropList::setVirtual to maintain binary compatibility. * Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625) * Removes gratuitous (double)x.yF casts (#632) * Committing clang-format changes * Removes gratuitous (double)x.yF casts * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Cleans up a const warning left over from previous constification (#633) * Committing clang-format changes * Adds consts to a few global variables * Cleans up a const warning left over from previous constification Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Purges UFAIL from the library (#637) * Committing clang-format changes * Purges UFAIL from the library * H5HL_insert change requested in PR Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Bmr dev hdffv 11223 (#640) * Fixed HDFFV-11223 (CVE-2018-14460) Description - Added checks against buffer size to prevent segfault, in case of data corruption, for sdim->size and sdim->max. - Renamed data files in an existing test to shorten their length as agreed with other developers previously. Platforms tested: Linux/64 (jelly) * Committing clang-format changes * Updated for test files * Updated for HDFFV-11223 Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes * Restore "error:" in line 2666. * Revert "Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625)" This reverts commit426b504848. * Snapshot version 1.10 release 8-1. Update version to 1.10.8-2. Squashed commit of the following: commit60734e63feAuthor: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Thu Jun 24 14:20:39 2021 -0500 Hdf5 1 10 Fix tools test (#796) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path * Update missing release note info. * Update code owners * Add known problem * Use only core library for testing dynamic plugins. CMake uses H5_HAVE_DIRECT instead of DIRECT_VFD Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commitbfb780a444Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Wed Jun 23 14:11:46 2021 -0500 Hdf5 1 10 Release Note (#786) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path * Update missing release note info. * Update code owners * Add known problem Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit9f50407368Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue Jun 22 07:03:26 2021 -0500 Hdf5 1 10 Update missing release note info. (#778) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path * Update missing release note info. * Update code owners Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit2e80c9cdecAuthor: Dana Robinson <43805+derobins@users.noreply.github.com> Date: Fri Jun 18 06:42:23 2021 -0700 Brings hash table IDs feature from develop/1.12 (#768) * Brings updated tid test from develop * Adds empty H5Iint.c and H5Idbg.c files * H5I renaming to match 1.12/develop * Splits off H5I debug code to H5Idbg.c * Splits internal H5I.c functionality to H5Iint.c * Header cleanup * More renaming cleanup to match develop/1.12 * Adds "save last ID" optimization * Adds uthash.h * Adds hash table IDs from develop/1.12 * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit1e29bcbfe2Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Thu Jun 17 11:21:43 2021 -0500 Hdf5 1 10 Fix cmake configure path (#762) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop * Fix cmake configure path Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit475cdaf431Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Wed Jun 16 15:45:58 2021 -0500 Hdf5 1 10 merge warnings changes (#756) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args * Merge warnings files fixes from develop Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commite25980e7f3Author: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Tue Jun 8 14:37:13 2021 -0500 Hdf5 1 10 merges of CMake changes (#738) * HDFFV-10865 - merge from dev, HDFArray perf fix. * Remove duplicate setting * Whitespace changes after clang format * Undo version 11 clang format changes * Merge CMake changes from develop * test testing script merge from develop * Update supported platforms * PR#3 merge from develop * Merge gcc 10 diagnostics option from develop * Merge #318 OSX changes from develop * Merge small changes from develop * Minor non-space formatting changes * #386 copyright corrections for java folder * Merges from develop #358 patches from vtk #361 fix header guard spelling * Merge updates #358 patches from vtk #361 fix header guard spelling * format fix * Fix missing underscore and make H5public.h closer to dev * Merges from develop #340 clang -Wformat-security warnings #360 Fixed uninitialized warnings header guard underscore cleanup JNI cleanup * format alignment * Add missing test ref file * Merge #380 from develop * Finish java merges from develop * Fix java issues with tests and javadoc * Correct use of attribute access plist * Remove debug code * Remove unused variable * Change file access to read only for java tests * Split clang format operations. * More javadoc comments * Remove pre-split setting * format source * Change windows TS to use older VS. * Mostly all javadoc fixes, one argument rename. * synch file * Merge of long double fix and compiler flags * HDFFV-11229 merge changes from develop * HDFFV-11229 correct test script * HDFFV-11229 update autotools test script for two ref files * HDFFV-11229 merge dev changes for long double display in tools * Committing clang-format changes * minor whitespace * remove unneeded macro * Committing clang-format changes * Add "option" command for clang options * Rework CMake add_custom to use the BYPRODUCTS argument Update pkgconfig scripts for parallel builds. Fix install COPYING file reference. Remove unused round defines. Change CMake default setting of BUILD_CPP to off. * Fortran target depends * Remove incorrect source attribute * Revert define removal * printf specifiers and VS2015 min changes * Committing clang-format changes * Add time struct * TRILAB-227 and tools debug merges from develop * Merge various changes from dev * Issue #669 remove version from pkgcfg filename * remove version from h5cc script * doxygen changes merged from develop * Committing clang-format changes * Merge CMake fortran ninja changes from dev * Enable fortran to gcc yaml * Refactor Fortran CMake config tests and CMake test args Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> commit061b23ac00Author: Larry Knox <lrknox@hdfgroup.org> Date: Thu Jun 3 16:07:23 2021 -0500 Partial merge issue #642 develop branch PRs to Hdf5 1 10 (#718) * Revert addition of & to 2 parameters in DSetCreatPropList::setVirtual to maintain binary compatibility. * Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625) * Removes gratuitous (double)x.yF casts (#632) * Committing clang-format changes * Removes gratuitous (double)x.yF casts * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Cleans up a const warning left over from previous constification (#633) * Committing clang-format changes * Adds consts to a few global variables * Cleans up a const warning left over from previous constification Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Purges UFAIL from the library (#637) * Committing clang-format changes * Purges UFAIL from the library * H5HL_insert change requested in PR Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Bmr dev hdffv 11223 (#640) * Fixed HDFFV-11223 (CVE-2018-14460) Description - Added checks against buffer size to prevent segfault, in case of data corruption, for sdim->size and sdim->max. - Renamed data files in an existing test to shorten their length as agreed with other developers previously. Platforms tested: Linux/64 (jelly) * Committing clang-format changes * Updated for test files * Updated for HDFFV-11223 Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Committing clang-format changes * Restore "error:" in line 2666. * Revert "Fix H5Eget_auto2/H5Eauto_is_v2 to not clear error stack (#625)" This reverts commit426b504848. Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> * (fix) Segmentation fault when using a compound type. (#143) * (fix) Segmentation fault when using a compound type. In the case when a compounded attribute is written to dataset followed by writing the data with a data transform function to the dataset will result in a segmentation fault. It turns out the data is classified as compounded while it is not. Now, the state is always reset first to not compounded followed by the existing check if the variable is compounded. * (fix) Removed undesired comment lines. * (fix) Segmentation fault when using a compound type: added test. * (fix) Added the missing cmpd_transform.c file to MANIFEST. * (fix) cmpd_dtransform test: autotools and source header. Added the cmp_dtransform test to the autotools configuration and updated the HDF Group copyright header. Co-authored-by: Jan-Willem Blokland <Jan-Willem.Blokland@Shell.com> * (fix) H5Z_xform_create function and scientific notation (#144) * (fix) H5Z_xform_create function and scientific notation Implemented a more sophisticated check to support scientific notation in the expression of the H5Zset_data_transform function. * (fix) H5Z_xform_create and scientific notation: Added test. Added a test to demonstrate that the parsing of expression which includes scientific notation works correctly. Improved inline comment. Co-authored-by: Jan-Willem Blokland <Jan-Willem.Blokland@Shell.com> * Adds const to a few global variables (#623) * Committing clang-format changes * Adds consts to a few global variables Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Made private my_yyinput function static (#618) This prevents it being exported as a public symbol. * Reduces overly-pedantic casting in the public headers (#644) * Committing clang-format changes * Fixes overly pedantic casting in public headers Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Use internal version of H5Eprint2 to avoid possible stack overflow (#661) * Fixes for a couple of trivial warnings (#676) * Committing clang-format changes * Trivial warning fixes: * Removes an unused done target in H5Tbit.c * Add (void) to quiet "ignored return value" warnings in the generators (which generally ignore errors) Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Removes alternative function enter/leave macro scheme (#678) * Committing clang-format changes * Converted BEGIN_FUNC, etc. macros to FUNC_ENTER * Rips out the BEGIN_FUNC, etc. macros * Removes 'end if', etc. comments from H5HL package * Committing clang-format changes * Fixes an H5EA iterate issue * Fixes an issue in the H5FA iterator code * Further cleanup in bin/trace after macro removal * Iterator changes in H5EA and H5FA Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Various CMake changes (#679) * Committing clang-format changes * Several CMake updates: * Removes unused HDF5_ENABLE_HSIZET * Switches TEST_SHELL_SCRIPTS to ON * Sets SH_PROGRAM to bash instead of sh * Set default build type back to RelWithDebInfo Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Revert "Removes alternative function enter/leave macro scheme (#678)" This reverts commitedddb11b79. * err_compat test cleanup (#681) * Committing clang-format changes * Cleans up err_compat test and output * Formatted source Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Sets the memory alloc sanity check option to disabled in autotools (#686) * Revert "Sets the memory alloc sanity check option to disabled in autotools (#686)" This reverts commit652ffca586. (Only for release branch). * Removes alternative function enter/leave macro scheme (#678) * Committing clang-for… * Normalization of H5_nanosleep() with VFD SWMR branch (#746) * Normalization of H5_nanosleep() with VFD SWMR branch * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Fixes some H5SL include statements (#758) * Fixes an array issue flagged by PGI in a C++ test (#763) * Fixes non-C99 format strings in tarray test code (#766) * Removes checks and work-arounds for strtoll and strtoull (#769) * Removes checks and work-arounds for strtoll and strtoull * Removes CMake checks for strtoll and strtoull * Removes checks for (v)snprintf, which are C99 (#772) * Removes outdated checks for ways inline might be defined (#781) These are obsolete now that we require C99. * Removes checks for system(), which is C89/90 (#782) * Cleans up some POSIX header bits in H5private.h (#783) * Further simplifies Autotools type size checks (#789) Also fixes an issue where clock_gettime and difftime are not detected due to earlier simplifications of this code. * Removes ancient Autotools cruft (#790) * Normalization of CMake H5pubconf.h with Autotools (#791) Mostly just moving things around and changing the comments to keep the delta small. The only symbol change is that for curl/curl.h which I changed to H5_HAVE_CURL_CURL_H to match the Autotools. This symbol is not used in the library and is just an artifact of the checks. * Update initialization of table_id in PacketTable Null constructor for non c++11 clang compiler. Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org> Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com> Co-authored-by: Jan-Willem Blokland <J.W.S.Blokland@XS4All.nl> Co-authored-by: Jan-Willem Blokland <Jan-Willem.Blokland@Shell.com> Co-authored-by: Sean McBride <sean@rogue-research.com> Co-authored-by: Scot Breitenfeld <brtnfld@hdfgroup.org> Co-authored-by: Allen Byrne <50328838+byrnHDF@users.noreply.github.com>
2242 lines
80 KiB
C
2242 lines
80 KiB
C
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
* Copyright by The HDF Group. *
|
|
* Copyright by the Board of Trustees of the University of Illinois. *
|
|
* All rights reserved. *
|
|
* *
|
|
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
|
* terms governing use, modification, and redistribution, is contained in *
|
|
* the COPYING file, which can be found at the root of the source code *
|
|
* distribution tree, or in https://www.hdfgroup.org/licenses. *
|
|
* If you do not have access to either file, you may request a copy from *
|
|
* help@hdfgroup.org. *
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
/***********************************************************
|
|
*
|
|
* Test program: tarray
|
|
*
|
|
* Test the Array Datatype functionality
|
|
*
|
|
*************************************************************/
|
|
|
|
#include "testhdf5.h"
|
|
#include "H5srcdir.h"
|
|
|
|
#define FILENAME "tarray1.h5"
|
|
#define TESTFILE "tarrold.h5"
|
|
|
|
/* 1-D array datatype */
|
|
#define ARRAY1_RANK 1
|
|
#define ARRAY1_DIM1 4
|
|
|
|
/* 3-D array datatype */
|
|
#define ARRAY2_RANK 3
|
|
#define ARRAY2_DIM1 3
|
|
#define ARRAY2_DIM2 4
|
|
#define ARRAY2_DIM3 5
|
|
|
|
/* 2-D array datatype */
|
|
#define ARRAY3_RANK 2
|
|
#define ARRAY3_DIM1 6
|
|
#define ARRAY3_DIM2 3
|
|
|
|
/* 1-D dataset with fixed dimensions */
|
|
#define SPACE1_RANK 1
|
|
#define SPACE1_DIM1 4
|
|
|
|
/* Parameters used with the test_array_bkg() test */
|
|
#define FIELDNAME "ArrayofStructures"
|
|
#define LENGTH 5
|
|
#define ALEN 10
|
|
#define RANK 1
|
|
#define NMAX 100
|
|
|
|
/* Struct used with test_array_bkg() test */
|
|
typedef struct {
|
|
int nsubfields;
|
|
char * name[NMAX];
|
|
size_t offset[NMAX];
|
|
hid_t datatype[NMAX];
|
|
|
|
} CmpDTSinfo;
|
|
|
|
/* Forward declarations for custom vlen memory manager functions */
|
|
void *test_array_alloc_custom(size_t size, void *info);
|
|
void test_array_free_custom(void *mem, void *info);
|
|
|
|
/*-------------------------------------------------------------------------
|
|
* Function: test_array_atomic_1d
|
|
*
|
|
* Purpose: Test basic array datatype code.
|
|
* Tests 1-D array of atomic datatypes.
|
|
*
|
|
* Return: void
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
static void
|
|
test_array_atomic_1d(void)
|
|
{
|
|
int wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
|
|
int rdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information read in */
|
|
hid_t fid1; /* HDF5 File IDs */
|
|
hid_t dataset; /* Dataset ID */
|
|
hid_t sid1; /* Dataspace ID */
|
|
hid_t tid1; /* Datatype ID */
|
|
hsize_t sdims1[] = {SPACE1_DIM1};
|
|
hsize_t tdims1[] = {ARRAY1_DIM1};
|
|
int ndims; /* Array rank for reading */
|
|
hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
|
|
int i, j; /* counting variables */
|
|
herr_t ret; /* Generic return value */
|
|
|
|
/* Output message about test being performed */
|
|
MESSAGE(5, ("Testing 1-D Array of Atomic Datatypes Functionality\n"));
|
|
|
|
/* Allocate and initialize array data to write */
|
|
for (i = 0; i < SPACE1_DIM1; i++)
|
|
for (j = 0; j < ARRAY1_DIM1; j++)
|
|
wdata[i][j] = i * 10 + j;
|
|
|
|
/* Create file */
|
|
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
|
CHECK(fid1, FAIL, "H5Fcreate");
|
|
|
|
/* Create dataspace for datasets */
|
|
sid1 = H5Screate_simple(SPACE1_RANK, sdims1, NULL);
|
|
CHECK(sid1, FAIL, "H5Screate_simple");
|
|
|
|
/* Create a datatype to refer to */
|
|
tid1 = H5Tarray_create2(H5T_NATIVE_INT, ARRAY1_RANK, tdims1);
|
|
CHECK(tid1, FAIL, "H5Tarray_create2");
|
|
|
|
/* Create a dataset */
|
|
dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
|
CHECK(dataset, FAIL, "H5Dcreate2");
|
|
|
|
/* Write dataset to disk */
|
|
ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
|
|
CHECK(ret, FAIL, "H5Dwrite");
|
|
|
|
/* Close Dataset */
|
|
ret = H5Dclose(dataset);
|
|
CHECK(ret, FAIL, "H5Dclose");
|
|
|
|
/* Close datatype */
|
|
ret = H5Tclose(tid1);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Close disk dataspace */
|
|
ret = H5Sclose(sid1);
|
|
CHECK(ret, FAIL, "H5Sclose");
|
|
|
|
/* Close file */
|
|
ret = H5Fclose(fid1);
|
|
CHECK(ret, FAIL, "H5Fclose");
|
|
|
|
/* Re-open file */
|
|
fid1 = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
|
|
CHECK(fid1, FAIL, "H5Fopen");
|
|
|
|
/* Open the dataset */
|
|
dataset = H5Dopen2(fid1, "Dataset1", H5P_DEFAULT);
|
|
CHECK(dataset, FAIL, "H5Dopen2");
|
|
|
|
/* Get the datatype */
|
|
tid1 = H5Dget_type(dataset);
|
|
CHECK(tid1, FAIL, "H5Dget_type");
|
|
|
|
/* Check the array rank */
|
|
ndims = H5Tget_array_ndims(tid1);
|
|
VERIFY(ndims, ARRAY1_RANK, "H5Tget_array_ndims");
|
|
|
|
/* Get the array dimensions */
|
|
ret = H5Tget_array_dims2(tid1, rdims1);
|
|
CHECK(ret, FAIL, "H5Tget_array_dims2");
|
|
|
|
/* Check the array dimensions */
|
|
for (i = 0; i < ndims; i++)
|
|
if (rdims1[i] != tdims1[i]) {
|
|
TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE
|
|
", tdims1[%d]=%" PRIuHSIZE "\n",
|
|
i, rdims1[i], i, tdims1[i]);
|
|
continue;
|
|
} /* end if */
|
|
|
|
/* Read dataset from disk */
|
|
ret = H5Dread(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
|
|
CHECK(ret, FAIL, "H5Dread");
|
|
|
|
/* Compare data read in */
|
|
for (i = 0; i < SPACE1_DIM1; i++)
|
|
for (j = 0; j < ARRAY1_DIM1; j++)
|
|
if (wdata[i][j] != rdata[i][j]) {
|
|
TestErrPrintf("Array data information doesn't match!, wdata[%d][%d]=%d, rdata[%d][%d]=%d\n",
|
|
(int)i, (int)j, (int)wdata[i][j], (int)i, (int)j, (int)rdata[i][j]);
|
|
continue;
|
|
} /* end if */
|
|
|
|
/* Close Datatype */
|
|
ret = H5Tclose(tid1);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Close Dataset */
|
|
ret = H5Dclose(dataset);
|
|
CHECK(ret, FAIL, "H5Dclose");
|
|
|
|
/* Close file */
|
|
ret = H5Fclose(fid1);
|
|
CHECK(ret, FAIL, "H5Fclose");
|
|
} /* end test_array_atomic_1d() */
|
|
|
|
/*-------------------------------------------------------------------------
|
|
* Function: test_array_funcs
|
|
*
|
|
* Purpose: Test some type functions that are and aren't supposed to
|
|
* work with array type.
|
|
*
|
|
* Return: void
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
static void
|
|
test_array_funcs(void)
|
|
{
|
|
hid_t type; /* Datatype ID */
|
|
hsize_t tdims1[] = {ARRAY1_DIM1};
|
|
size_t size;
|
|
H5T_pad_t inpad;
|
|
H5T_norm_t norm;
|
|
H5T_cset_t cset;
|
|
H5T_str_t strpad;
|
|
herr_t ret; /* Generic return value */
|
|
|
|
/* Create a datatype to refer to */
|
|
type = H5Tarray_create2(H5T_IEEE_F32BE, ARRAY1_RANK, tdims1);
|
|
CHECK(type, FAIL, "H5Tarray_create2");
|
|
|
|
size = H5Tget_precision(type);
|
|
CHECK(size, 0, "H5Tget_precision");
|
|
|
|
size = H5Tget_size(type);
|
|
CHECK(size, 0, "H5Tget_size");
|
|
|
|
size = H5Tget_ebias(type);
|
|
CHECK(size, 0, "H5Tget_ebias");
|
|
|
|
ret = H5Tset_pad(type, H5T_PAD_ZERO, H5T_PAD_ONE);
|
|
CHECK(ret, FAIL, "H5Tset_pad");
|
|
|
|
inpad = H5Tget_inpad(type);
|
|
CHECK(inpad, FAIL, "H5Tget_inpad");
|
|
|
|
norm = H5Tget_norm(type);
|
|
CHECK(norm, FAIL, "H5Tget_norm");
|
|
|
|
ret = H5Tset_offset(type, (size_t)16);
|
|
CHECK(ret, FAIL, "H5Tset_offset");
|
|
|
|
H5E_BEGIN_TRY
|
|
{
|
|
cset = H5Tget_cset(type);
|
|
}
|
|
H5E_END_TRY;
|
|
VERIFY(cset, FAIL, "H5Tget_cset");
|
|
|
|
H5E_BEGIN_TRY
|
|
{
|
|
strpad = H5Tget_strpad(type);
|
|
}
|
|
H5E_END_TRY;
|
|
VERIFY(strpad, FAIL, "H5Tget_strpad");
|
|
|
|
/* Close datatype */
|
|
ret = H5Tclose(type);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
} /* end test_array_funcs() */
|
|
|
|
/*-------------------------------------------------------------------------
|
|
* Function: test_array_atomic_3d
|
|
*
|
|
* Purpose: Test basic array datatype code.
|
|
* Tests 3-D array of atomic datatypes.
|
|
*
|
|
* Return: void
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
static void
|
|
test_array_atomic_3d(void)
|
|
{
|
|
int wdata[SPACE1_DIM1][ARRAY2_DIM1][ARRAY2_DIM2][ARRAY2_DIM3]; /* Information to write */
|
|
int rdata[SPACE1_DIM1][ARRAY2_DIM1][ARRAY2_DIM2][ARRAY2_DIM3]; /* Information read in */
|
|
hid_t fid; /* HDF5 File IDs */
|
|
hid_t dataset; /* Dataset ID */
|
|
hid_t sid; /* Dataspace ID */
|
|
hid_t tid; /* Datatype ID */
|
|
hsize_t sdims1[] = {SPACE1_DIM1};
|
|
hsize_t tdims2[] = {ARRAY2_DIM1, ARRAY2_DIM2, ARRAY2_DIM3};
|
|
int ndims; /* Array rank for reading */
|
|
hsize_t rdims2[H5S_MAX_RANK]; /* Array dimensions for reading */
|
|
int i, j, k, l; /* counting variables */
|
|
herr_t ret; /* Generic return value */
|
|
|
|
/* Output message about test being performed */
|
|
MESSAGE(5, ("Testing 3-D Array of Atomic Datatypes Functionality\n"));
|
|
|
|
/* Allocate and initialize array data to write */
|
|
for (i = 0; i < SPACE1_DIM1; i++)
|
|
for (j = 0; j < ARRAY2_DIM1; j++)
|
|
for (k = 0; k < ARRAY2_DIM2; k++)
|
|
for (l = 0; l < ARRAY2_DIM3; l++)
|
|
wdata[i][j][k][l] = i * 1000 + j * 100 + k * 10 + l;
|
|
|
|
/* Create file */
|
|
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
|
CHECK(fid, FAIL, "H5Fcreate");
|
|
|
|
/* Create dataspace for datasets */
|
|
sid = H5Screate_simple(SPACE1_RANK, sdims1, NULL);
|
|
CHECK(sid, FAIL, "H5Screate_simple");
|
|
|
|
/* Create a datatype to refer to */
|
|
tid = H5Tarray_create2(H5T_NATIVE_INT, ARRAY2_RANK, tdims2);
|
|
CHECK(tid, FAIL, "H5Tarray_create2");
|
|
|
|
/* Create a dataset */
|
|
dataset = H5Dcreate2(fid, "Dataset1", tid, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
|
CHECK(dataset, FAIL, "H5Dcreate2");
|
|
|
|
/* Write dataset to disk */
|
|
ret = H5Dwrite(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
|
|
CHECK(ret, FAIL, "H5Dwrite");
|
|
|
|
/* Close Dataset */
|
|
ret = H5Dclose(dataset);
|
|
CHECK(ret, FAIL, "H5Dclose");
|
|
|
|
/* Close datatype */
|
|
ret = H5Tclose(tid);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Close disk dataspace */
|
|
ret = H5Sclose(sid);
|
|
CHECK(ret, FAIL, "H5Sclose");
|
|
|
|
/* Close file */
|
|
ret = H5Fclose(fid);
|
|
CHECK(ret, FAIL, "H5Fclose");
|
|
|
|
/* Re-open file */
|
|
fid = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
|
|
CHECK(fid, FAIL, "H5Fopen");
|
|
|
|
/* Open the dataset */
|
|
dataset = H5Dopen2(fid, "Dataset1", H5P_DEFAULT);
|
|
CHECK(dataset, FAIL, "H5Dopen2");
|
|
|
|
/* Get the datatype */
|
|
tid = H5Dget_type(dataset);
|
|
CHECK(tid, FAIL, "H5Dget_type");
|
|
|
|
/* Check the array rank */
|
|
ndims = H5Tget_array_ndims(tid);
|
|
VERIFY(ndims, ARRAY2_RANK, "H5Tget_array_ndims");
|
|
|
|
/* Get the array dimensions */
|
|
ret = H5Tget_array_dims2(tid, rdims2);
|
|
CHECK(ret, FAIL, "H5Tget_array_dims2");
|
|
|
|
/* Check the array dimensions */
|
|
for (i = 0; i < ndims; i++)
|
|
if (rdims2[i] != tdims2[i]) {
|
|
TestErrPrintf("Array dimension information doesn't match!, rdims2[%d]=%d, tdims2[%d]=%d\n",
|
|
(int)i, (int)rdims2[i], (int)i, (int)tdims2[i]);
|
|
continue;
|
|
} /* end if */
|
|
|
|
/* Read dataset from disk */
|
|
ret = H5Dread(dataset, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
|
|
CHECK(ret, FAIL, "H5Dread");
|
|
|
|
/* Compare data read in */
|
|
for (i = 0; i < SPACE1_DIM1; i++)
|
|
for (j = 0; j < ARRAY2_DIM1; j++)
|
|
for (k = 0; k < ARRAY2_DIM2; k++)
|
|
for (l = 0; l < ARRAY2_DIM3; l++)
|
|
if (wdata[i][j][k][l] != rdata[i][j][k][l]) {
|
|
TestErrPrintf("Array data information doesn't match!, wdata[%d][%d][%d][%d]=%d, "
|
|
"rdata[%d][%d][%d][%d]=%d\n",
|
|
(int)i, (int)j, (int)k, (int)l, (int)wdata[i][j][k][l], (int)i, (int)j,
|
|
(int)k, (int)l, (int)rdata[i][j][k][l]);
|
|
continue;
|
|
} /* end if */
|
|
|
|
/* Close Datatype */
|
|
ret = H5Tclose(tid);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Close Dataset */
|
|
ret = H5Dclose(dataset);
|
|
CHECK(ret, FAIL, "H5Dclose");
|
|
|
|
/* Close file */
|
|
ret = H5Fclose(fid);
|
|
CHECK(ret, FAIL, "H5Fclose");
|
|
|
|
} /* end test_array_atomic_3d() */
|
|
|
|
/*-------------------------------------------------------------------------
|
|
* Function: test_array_array_atomic
|
|
*
|
|
* Purpose: Test basic array datatype code.
|
|
* Tests 1-D array 2-D arrays of atomic datatypes.
|
|
*
|
|
* Return: void
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
static void
|
|
test_array_array_atomic(void)
|
|
{
|
|
int wdata[SPACE1_DIM1][ARRAY1_DIM1][ARRAY3_DIM1][ARRAY3_DIM2]; /* Information to write */
|
|
int rdata[SPACE1_DIM1][ARRAY1_DIM1][ARRAY3_DIM1][ARRAY3_DIM2]; /* Information read in */
|
|
hid_t fid; /* HDF5 File IDs */
|
|
hid_t dataset; /* Dataset ID */
|
|
hid_t sid; /* Dataspace ID */
|
|
hid_t tid1; /* 1-D array Datatype ID */
|
|
hid_t tid2; /* 2-D array Datatype ID */
|
|
hsize_t sdims1[] = {SPACE1_DIM1};
|
|
hsize_t tdims1[] = {ARRAY1_DIM1};
|
|
hsize_t tdims2[] = {ARRAY3_DIM1, ARRAY3_DIM2};
|
|
int ndims1; /* Array rank for reading */
|
|
int ndims2; /* Array rank for reading */
|
|
hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
|
|
hsize_t rdims2[H5S_MAX_RANK]; /* Array dimensions for reading */
|
|
int i, j, k, l; /* counting variables */
|
|
herr_t ret; /* Generic return value */
|
|
|
|
/* Output message about test being performed */
|
|
MESSAGE(5, ("Testing 1-D Array 2-D Arrays of Atomic Datatypes Functionality\n"));
|
|
|
|
/* Allocate and initialize array data to write */
|
|
for (i = 0; i < SPACE1_DIM1; i++)
|
|
for (j = 0; j < ARRAY1_DIM1; j++)
|
|
for (k = 0; k < ARRAY3_DIM1; k++)
|
|
for (l = 0; l < ARRAY3_DIM2; l++)
|
|
wdata[i][j][k][l] = i * 1000 + j * 100 + k * 10 + l;
|
|
|
|
/* Create file */
|
|
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
|
CHECK(fid, FAIL, "H5Fcreate");
|
|
|
|
/* Create dataspace for datasets */
|
|
sid = H5Screate_simple(SPACE1_RANK, sdims1, NULL);
|
|
CHECK(sid, FAIL, "H5Screate_simple");
|
|
|
|
/* Create a 2-D datatype to refer to */
|
|
tid2 = H5Tarray_create2(H5T_NATIVE_INT, ARRAY3_RANK, tdims2);
|
|
CHECK(tid2, FAIL, "H5Tarray_create2");
|
|
|
|
/* Create a 1-D datatype to refer to */
|
|
tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1);
|
|
CHECK(tid1, FAIL, "H5Tarray_create2");
|
|
|
|
/* Create a dataset */
|
|
dataset = H5Dcreate2(fid, "Dataset1", tid1, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
|
CHECK(dataset, FAIL, "H5Dcreate2");
|
|
|
|
/* Write dataset to disk */
|
|
ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
|
|
CHECK(ret, FAIL, "H5Dwrite");
|
|
|
|
/* Close Dataset */
|
|
ret = H5Dclose(dataset);
|
|
CHECK(ret, FAIL, "H5Dclose");
|
|
|
|
/* Close datatypes */
|
|
ret = H5Tclose(tid1);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
ret = H5Tclose(tid2);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Close disk dataspace */
|
|
ret = H5Sclose(sid);
|
|
CHECK(ret, FAIL, "H5Sclose");
|
|
|
|
/* Close file */
|
|
ret = H5Fclose(fid);
|
|
CHECK(ret, FAIL, "H5Fclose");
|
|
|
|
/* Re-open file */
|
|
fid = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
|
|
CHECK(fid, FAIL, "H5Fopen");
|
|
|
|
/* Open the dataset */
|
|
dataset = H5Dopen2(fid, "Dataset1", H5P_DEFAULT);
|
|
CHECK(dataset, FAIL, "H5Dopen2");
|
|
|
|
/* Get the 1-D datatype */
|
|
tid1 = H5Dget_type(dataset);
|
|
CHECK(tid1, FAIL, "H5Dget_type");
|
|
|
|
/* Check the 1-D array rank */
|
|
ndims1 = H5Tget_array_ndims(tid1);
|
|
VERIFY(ndims1, ARRAY1_RANK, "H5Tget_array_ndims");
|
|
|
|
/* Get the 1-D array dimensions */
|
|
ret = H5Tget_array_dims2(tid1, rdims1);
|
|
CHECK(ret, FAIL, "H5Tget_array_dims2");
|
|
|
|
/* Check the array dimensions */
|
|
for (i = 0; i < ndims1; i++)
|
|
if (rdims1[i] != tdims1[i]) {
|
|
TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE
|
|
", tdims1[%d]=%" PRIuHSIZE "\n",
|
|
i, rdims1[i], i, tdims1[i]);
|
|
continue;
|
|
} /* end if */
|
|
|
|
/* Get the 2-D datatype */
|
|
tid2 = H5Tget_super(tid1);
|
|
CHECK(tid2, FAIL, "H5Tget_super");
|
|
|
|
/* Check the 2-D array rank */
|
|
ndims2 = H5Tget_array_ndims(tid2);
|
|
VERIFY(ndims2, ARRAY3_RANK, "H5Tget_array_ndims");
|
|
|
|
/* Get the 2-D array dimensions */
|
|
ret = H5Tget_array_dims2(tid2, rdims2);
|
|
CHECK(ret, FAIL, "H5Tget_array_dims2");
|
|
|
|
/* Check the array dimensions */
|
|
for (i = 0; i < ndims2; i++)
|
|
if (rdims2[i] != tdims2[i]) {
|
|
TestErrPrintf("Array dimension information doesn't match!, rdims2[%d]=%d, tdims2[%d]=%d\n",
|
|
(int)i, (int)rdims2[i], (int)i, (int)tdims2[i]);
|
|
continue;
|
|
} /* end if */
|
|
|
|
/* Read dataset from disk */
|
|
ret = H5Dread(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
|
|
CHECK(ret, FAIL, "H5Dread");
|
|
|
|
/* Compare data read in */
|
|
for (i = 0; i < SPACE1_DIM1; i++)
|
|
for (j = 0; j < ARRAY1_DIM1; j++)
|
|
for (k = 0; k < ARRAY3_DIM1; k++)
|
|
for (l = 0; l < ARRAY3_DIM2; l++)
|
|
if (wdata[i][j][k][l] != rdata[i][j][k][l]) {
|
|
TestErrPrintf("Array data information doesn't match!, wdata[%d][%d][%d][%d]=%d, "
|
|
"rdata[%d][%d][%d][%d]=%d\n",
|
|
(int)i, (int)j, (int)k, (int)l, (int)wdata[i][j][k][l], (int)i, (int)j,
|
|
(int)k, (int)l, (int)rdata[i][j][k][l]);
|
|
continue;
|
|
} /* end if */
|
|
|
|
/* Close Datatypes */
|
|
ret = H5Tclose(tid1);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
ret = H5Tclose(tid2);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Close Dataset */
|
|
ret = H5Dclose(dataset);
|
|
CHECK(ret, FAIL, "H5Dclose");
|
|
|
|
/* Close file */
|
|
ret = H5Fclose(fid);
|
|
CHECK(ret, FAIL, "H5Fclose");
|
|
} /* end test_array_array_atomic() */
|
|
|
|
/*-------------------------------------------------------------------------
|
|
* Function: test_array_compound_atomic
|
|
*
|
|
* Purpose: Test basic array datatype code.
|
|
* Tests 1-D array of compound datatypes (with no array fields).
|
|
*
|
|
* Return: void
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
static void
|
|
test_array_compound_atomic(void)
|
|
{
|
|
typedef struct { /* Typedef for compound datatype */
|
|
int i;
|
|
float f;
|
|
} s1_t;
|
|
|
|
s1_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
|
|
s1_t rdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information read in */
|
|
hid_t fid1; /* HDF5 File IDs */
|
|
hid_t dataset; /* Dataset ID */
|
|
hid_t sid1; /* Dataspace ID */
|
|
hid_t tid1; /* Array Datatype ID */
|
|
hid_t tid2; /* Compound Datatype ID */
|
|
hsize_t sdims1[] = {SPACE1_DIM1};
|
|
hsize_t tdims1[] = {ARRAY1_DIM1};
|
|
int ndims; /* Array rank for reading */
|
|
hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
|
|
int nmemb; /* Number of compound members */
|
|
char * mname; /* Name of compound field */
|
|
size_t off; /* Offset of compound field */
|
|
hid_t mtid; /* Datatype ID for field */
|
|
int i, j; /* counting variables */
|
|
herr_t ret; /* Generic return value */
|
|
|
|
/* Output message about test being performed */
|
|
MESSAGE(5, ("Testing 1-D Array of Compound Atomic Datatypes Functionality\n"));
|
|
|
|
/* Initialize array data to write */
|
|
for (i = 0; i < SPACE1_DIM1; i++)
|
|
for (j = 0; j < ARRAY1_DIM1; j++) {
|
|
wdata[i][j].i = i * 10 + j;
|
|
wdata[i][j].f = (float)i * 2.5F + (float)j;
|
|
} /* end for */
|
|
|
|
/* Create file */
|
|
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
|
CHECK(fid1, FAIL, "H5Fcreate");
|
|
|
|
/* Create dataspace for datasets */
|
|
sid1 = H5Screate_simple(SPACE1_RANK, sdims1, NULL);
|
|
CHECK(sid1, FAIL, "H5Screate_simple");
|
|
|
|
/* Create a compound datatype to refer to */
|
|
tid2 = H5Tcreate(H5T_COMPOUND, sizeof(s1_t));
|
|
CHECK(tid2, FAIL, "H5Tcreate");
|
|
|
|
/* Insert integer field */
|
|
ret = H5Tinsert(tid2, "i", HOFFSET(s1_t, i), H5T_NATIVE_INT);
|
|
CHECK(ret, FAIL, "H5Tinsert");
|
|
|
|
/* Insert float field */
|
|
ret = H5Tinsert(tid2, "f", HOFFSET(s1_t, f), H5T_NATIVE_FLOAT);
|
|
CHECK(ret, FAIL, "H5Tinsert");
|
|
|
|
/* Create an array datatype to refer to */
|
|
tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1);
|
|
CHECK(tid1, FAIL, "H5Tarray_create2");
|
|
|
|
/* Close compound datatype */
|
|
ret = H5Tclose(tid2);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Create a dataset */
|
|
dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
|
CHECK(dataset, FAIL, "H5Dcreate2");
|
|
|
|
/* Write dataset to disk */
|
|
ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
|
|
CHECK(ret, FAIL, "H5Dwrite");
|
|
|
|
/* Close Dataset */
|
|
ret = H5Dclose(dataset);
|
|
CHECK(ret, FAIL, "H5Dclose");
|
|
|
|
/* Close datatype */
|
|
ret = H5Tclose(tid1);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Close disk dataspace */
|
|
ret = H5Sclose(sid1);
|
|
CHECK(ret, FAIL, "H5Sclose");
|
|
|
|
/* Close file */
|
|
ret = H5Fclose(fid1);
|
|
CHECK(ret, FAIL, "H5Fclose");
|
|
|
|
/* Re-open file */
|
|
fid1 = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
|
|
CHECK(fid1, FAIL, "H5Fopen");
|
|
|
|
/* Open the dataset */
|
|
dataset = H5Dopen2(fid1, "Dataset1", H5P_DEFAULT);
|
|
CHECK(dataset, FAIL, "H5Dopen2");
|
|
|
|
/* Get the datatype */
|
|
tid1 = H5Dget_type(dataset);
|
|
CHECK(tid1, FAIL, "H5Dget_type");
|
|
|
|
/* Check the array rank */
|
|
ndims = H5Tget_array_ndims(tid1);
|
|
VERIFY(ndims, ARRAY1_RANK, "H5Tget_array_ndims");
|
|
|
|
/* Get the array dimensions */
|
|
ret = H5Tget_array_dims2(tid1, rdims1);
|
|
CHECK(ret, FAIL, "H5Tget_array_dims2");
|
|
|
|
/* Check the array dimensions */
|
|
for (i = 0; i < ndims; i++)
|
|
if (rdims1[i] != tdims1[i]) {
|
|
TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE
|
|
", tdims1[%d]=%" PRIuHSIZE "\n",
|
|
i, rdims1[i], i, tdims1[i]);
|
|
continue;
|
|
} /* end if */
|
|
|
|
/* Get the compound datatype */
|
|
tid2 = H5Tget_super(tid1);
|
|
CHECK(tid2, FAIL, "H5Tget_super");
|
|
|
|
/* Check the number of members */
|
|
nmemb = H5Tget_nmembers(tid2);
|
|
VERIFY(nmemb, 2, "H5Tget_nmembers");
|
|
|
|
/* Check the 1st field's name */
|
|
mname = H5Tget_member_name(tid2, 0);
|
|
CHECK_PTR(mname, "H5Tget_member_name");
|
|
if (HDstrcmp(mname, "i") != 0)
|
|
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
|
|
H5free_memory(mname);
|
|
|
|
/* Check the 1st field's offset */
|
|
off = H5Tget_member_offset(tid2, 0);
|
|
VERIFY(off, HOFFSET(s1_t, i), "H5Tget_member_offset");
|
|
|
|
/* Check the 1st field's datatype */
|
|
mtid = H5Tget_member_type(tid2, 0);
|
|
CHECK(mtid, FAIL, "H5Tget_member_type");
|
|
if ((ret = H5Tequal(mtid, H5T_NATIVE_INT)) <= 0)
|
|
TestErrPrintf("Compound data type is incorrect!, ret=%d\n", (int)ret);
|
|
ret = H5Tclose(mtid);
|
|
CHECK(mtid, FAIL, "H5Tclose");
|
|
|
|
/* Check the 2nd field's name */
|
|
mname = H5Tget_member_name(tid2, 1);
|
|
CHECK_PTR(mname, "H5Tget_member_name");
|
|
if (HDstrcmp(mname, "f") != 0)
|
|
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
|
|
H5free_memory(mname);
|
|
|
|
/* Check the 2nd field's offset */
|
|
off = H5Tget_member_offset(tid2, 1);
|
|
VERIFY(off, HOFFSET(s1_t, f), "H5Tget_member_offset");
|
|
|
|
/* Check the 2nd field's datatype */
|
|
mtid = H5Tget_member_type(tid2, 1);
|
|
CHECK(mtid, FAIL, "H5Tget_member_type");
|
|
if ((ret = H5Tequal(mtid, H5T_NATIVE_FLOAT)) <= 0)
|
|
TestErrPrintf("Compound data type is incorrect!, ret=%d\n", (int)ret);
|
|
ret = H5Tclose(mtid);
|
|
CHECK(mtid, FAIL, "H5Tclose");
|
|
|
|
/* Close Compound Datatype */
|
|
ret = H5Tclose(tid2);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Read dataset from disk */
|
|
ret = H5Dread(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
|
|
CHECK(ret, FAIL, "H5Dread");
|
|
|
|
/* Compare data read in */
|
|
for (i = 0; i < SPACE1_DIM1; i++)
|
|
for (j = 0; j < ARRAY1_DIM1; j++) {
|
|
if (wdata[i][j].i != rdata[i][j].i) {
|
|
TestErrPrintf(
|
|
"Array data information doesn't match!, wdata[%d][%d].i=%d, rdata[%d][%d].i=%d\n", (int)i,
|
|
(int)j, (int)wdata[i][j].i, (int)i, (int)j, (int)rdata[i][j].i);
|
|
continue;
|
|
} /* end if */
|
|
if (!H5_FLT_ABS_EQUAL(wdata[i][j].f, rdata[i][j].f)) {
|
|
TestErrPrintf(
|
|
"Array data information doesn't match!, wdata[%d][%d].f=%f, rdata[%d][%d].f=%f\n", (int)i,
|
|
(int)j, (double)wdata[i][j].f, (int)i, (int)j, (double)rdata[i][j].f);
|
|
continue;
|
|
} /* end if */
|
|
} /* end for */
|
|
|
|
/* Close Datatype */
|
|
ret = H5Tclose(tid1);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Close Dataset */
|
|
ret = H5Dclose(dataset);
|
|
CHECK(ret, FAIL, "H5Dclose");
|
|
|
|
/* Close file */
|
|
ret = H5Fclose(fid1);
|
|
CHECK(ret, FAIL, "H5Fclose");
|
|
} /* end test_array_compound_atomic() */
|
|
|
|
/*-------------------------------------------------------------------------
|
|
* Function: test_array_compound_array
|
|
*
|
|
* Purpose: Test basic array datatype code.
|
|
* Tests 1-D array of compound datatypes (with array fields).
|
|
*
|
|
* Return: void
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
static void
|
|
test_array_compound_array(void)
|
|
{
|
|
typedef struct { /* Typedef for compound datatype */
|
|
int i;
|
|
float f[ARRAY1_DIM1];
|
|
} s1_t;
|
|
|
|
s1_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
|
|
s1_t rdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information read in */
|
|
hid_t fid1; /* HDF5 File IDs */
|
|
hid_t dataset; /* Dataset ID */
|
|
hid_t sid1; /* Dataspace ID */
|
|
hid_t tid1; /* Array Datatype ID */
|
|
hid_t tid2; /* Compound Datatype ID */
|
|
hid_t tid3; /* Nested Array Datatype ID */
|
|
hsize_t sdims1[] = {SPACE1_DIM1};
|
|
hsize_t tdims1[] = {ARRAY1_DIM1};
|
|
int ndims; /* Array rank for reading */
|
|
hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
|
|
int nmemb; /* Number of compound members */
|
|
char * mname; /* Name of compound field */
|
|
size_t off; /* Offset of compound field */
|
|
hid_t mtid; /* Datatype ID for field */
|
|
H5T_class_t mclass; /* Datatype class for field */
|
|
int i, j, k; /* counting variables */
|
|
herr_t ret; /* Generic return value */
|
|
|
|
/* Output message about test being performed */
|
|
MESSAGE(5, ("Testing 1-D Array of Compound Array Datatypes Functionality\n"));
|
|
|
|
/* Initialize array data to write */
|
|
for (i = 0; i < SPACE1_DIM1; i++)
|
|
for (j = 0; j < ARRAY1_DIM1; j++) {
|
|
wdata[i][j].i = i * 10 + j;
|
|
for (k = 0; k < ARRAY1_DIM1; k++)
|
|
wdata[i][j].f[k] = (float)i * 10.0F + (float)j * 2.5F + (float)k;
|
|
} /* end for */
|
|
|
|
/* Create file */
|
|
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
|
CHECK(fid1, FAIL, "H5Fcreate");
|
|
|
|
/* Create dataspace for datasets */
|
|
sid1 = H5Screate_simple(SPACE1_RANK, sdims1, NULL);
|
|
CHECK(sid1, FAIL, "H5Screate_simple");
|
|
|
|
/* Create a compound datatype to refer to */
|
|
tid2 = H5Tcreate(H5T_COMPOUND, sizeof(s1_t));
|
|
CHECK(tid2, FAIL, "H5Tcreate");
|
|
|
|
/* Insert integer field */
|
|
ret = H5Tinsert(tid2, "i", HOFFSET(s1_t, i), H5T_NATIVE_INT);
|
|
CHECK(ret, FAIL, "H5Tinsert");
|
|
|
|
/* Create an array of floats datatype */
|
|
tid3 = H5Tarray_create2(H5T_NATIVE_FLOAT, ARRAY1_RANK, tdims1);
|
|
CHECK(tid3, FAIL, "H5Tarray_create2");
|
|
|
|
/* Insert float array field */
|
|
ret = H5Tinsert(tid2, "f", HOFFSET(s1_t, f), tid3);
|
|
CHECK(ret, FAIL, "H5Tinsert");
|
|
|
|
/* Close array of floats field datatype */
|
|
ret = H5Tclose(tid3);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Create an array datatype to refer to */
|
|
tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1);
|
|
CHECK(tid1, FAIL, "H5Tarray_create2");
|
|
|
|
/* Close compound datatype */
|
|
ret = H5Tclose(tid2);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Create a dataset */
|
|
dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
|
CHECK(dataset, FAIL, "H5Dcreate2");
|
|
|
|
/* Write dataset to disk */
|
|
ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
|
|
CHECK(ret, FAIL, "H5Dwrite");
|
|
|
|
/* Close Dataset */
|
|
ret = H5Dclose(dataset);
|
|
CHECK(ret, FAIL, "H5Dclose");
|
|
|
|
/* Close datatype */
|
|
ret = H5Tclose(tid1);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Close disk dataspace */
|
|
ret = H5Sclose(sid1);
|
|
CHECK(ret, FAIL, "H5Sclose");
|
|
|
|
/* Close file */
|
|
ret = H5Fclose(fid1);
|
|
CHECK(ret, FAIL, "H5Fclose");
|
|
|
|
/* Re-open file */
|
|
fid1 = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
|
|
CHECK(fid1, FAIL, "H5Fopen");
|
|
|
|
/* Open the dataset */
|
|
dataset = H5Dopen2(fid1, "Dataset1", H5P_DEFAULT);
|
|
CHECK(dataset, FAIL, "H5Dopen2");
|
|
|
|
/* Get the datatype */
|
|
tid1 = H5Dget_type(dataset);
|
|
CHECK(tid1, FAIL, "H5Dget_type");
|
|
|
|
/* Check the array rank */
|
|
ndims = H5Tget_array_ndims(tid1);
|
|
VERIFY(ndims, ARRAY1_RANK, "H5Tget_array_ndims");
|
|
|
|
/* Get the array dimensions */
|
|
ret = H5Tget_array_dims2(tid1, rdims1);
|
|
CHECK(ret, FAIL, "H5Tget_array_dims2");
|
|
|
|
/* Check the array dimensions */
|
|
for (i = 0; i < ndims; i++)
|
|
if (rdims1[i] != tdims1[i]) {
|
|
TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE
|
|
", tdims1[%d]=%" PRIuHSIZE "\n",
|
|
i, rdims1[i], i, tdims1[i]);
|
|
continue;
|
|
} /* end if */
|
|
|
|
/* Get the compound datatype */
|
|
tid2 = H5Tget_super(tid1);
|
|
CHECK(tid2, FAIL, "H5Tget_super");
|
|
|
|
/* Check the number of members */
|
|
nmemb = H5Tget_nmembers(tid2);
|
|
VERIFY(nmemb, 2, "H5Tget_nmembers");
|
|
|
|
/* Check the 1st field's name */
|
|
mname = H5Tget_member_name(tid2, 0);
|
|
CHECK_PTR(mname, "H5Tget_member_name");
|
|
if (HDstrcmp(mname, "i") != 0)
|
|
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
|
|
H5free_memory(mname);
|
|
|
|
/* Check the 1st field's offset */
|
|
off = H5Tget_member_offset(tid2, 0);
|
|
VERIFY(off, HOFFSET(s1_t, i), "H5Tget_member_offset");
|
|
|
|
/* Check the 1st field's datatype */
|
|
mtid = H5Tget_member_type(tid2, 0);
|
|
CHECK(mtid, FAIL, "H5Tget_member_type");
|
|
if ((ret = H5Tequal(mtid, H5T_NATIVE_INT)) <= 0)
|
|
TestErrPrintf("Compound data type is incorrect!, ret=%d\n", (int)ret);
|
|
ret = H5Tclose(mtid);
|
|
CHECK(mtid, FAIL, "H5Tclose");
|
|
|
|
/* Check the 2nd field's name */
|
|
mname = H5Tget_member_name(tid2, 1);
|
|
CHECK_PTR(mname, "H5Tget_member_name");
|
|
if (HDstrcmp(mname, "f") != 0)
|
|
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
|
|
H5free_memory(mname);
|
|
|
|
/* Check the 2nd field's offset */
|
|
off = H5Tget_member_offset(tid2, 1);
|
|
VERIFY(off, HOFFSET(s1_t, f), "H5Tget_member_offset");
|
|
|
|
/* Check the 2nd field's datatype */
|
|
mtid = H5Tget_member_type(tid2, 1);
|
|
CHECK(mtid, FAIL, "H5Tget_member_type");
|
|
|
|
/* Get the 2nd field's class */
|
|
mclass = H5Tget_class(mtid);
|
|
VERIFY(mclass, H5T_ARRAY, "H5Tget_class");
|
|
|
|
/* Check the array rank */
|
|
ndims = H5Tget_array_ndims(mtid);
|
|
VERIFY(ndims, ARRAY1_RANK, "H5Tget_array_ndims");
|
|
|
|
/* Get the array dimensions */
|
|
ret = H5Tget_array_dims2(mtid, rdims1);
|
|
CHECK(ret, FAIL, "H5Tget_array_dims2");
|
|
|
|
/* Check the array dimensions */
|
|
for (i = 0; i < ndims; i++)
|
|
if (rdims1[i] != tdims1[i]) {
|
|
TestErrPrintf("Nested array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE
|
|
", tdims1[%d]=%" PRIuHSIZE "\n",
|
|
i, rdims1[i], i, tdims1[i]);
|
|
continue;
|
|
} /* end if */
|
|
|
|
/* Check the nested array's datatype */
|
|
tid3 = H5Tget_super(mtid);
|
|
CHECK(tid3, FAIL, "H5Tget_super");
|
|
|
|
if ((ret = H5Tequal(tid3, H5T_NATIVE_FLOAT)) <= 0)
|
|
TestErrPrintf("Compound data type is incorrect!, ret=%d\n", (int)ret);
|
|
|
|
/* Close the array's base type datatype */
|
|
ret = H5Tclose(tid3);
|
|
CHECK(mtid, FAIL, "H5Tclose");
|
|
|
|
/* Close the member datatype */
|
|
ret = H5Tclose(mtid);
|
|
CHECK(mtid, FAIL, "H5Tclose");
|
|
|
|
/* Close Compound Datatype */
|
|
ret = H5Tclose(tid2);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Read dataset from disk */
|
|
ret = H5Dread(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
|
|
CHECK(ret, FAIL, "H5Dread");
|
|
|
|
/* Compare data read in */
|
|
for (i = 0; i < SPACE1_DIM1; i++) {
|
|
for (j = 0; j < ARRAY1_DIM1; j++) {
|
|
if (wdata[i][j].i != rdata[i][j].i) {
|
|
TestErrPrintf(
|
|
"Array data information doesn't match!, wdata[%d][%d].i=%d, rdata[%d][%d].i=%d\n", (int)i,
|
|
(int)j, (int)wdata[i][j].i, (int)i, (int)j, (int)rdata[i][j].i);
|
|
continue;
|
|
} /* end if */
|
|
for (k = 0; k < ARRAY1_DIM1; k++)
|
|
if (!H5_FLT_ABS_EQUAL(wdata[i][j].f[k], rdata[i][j].f[k])) {
|
|
TestErrPrintf("Array data information doesn't match!, wdata[%d][%d].f[%d]=%f, "
|
|
"rdata[%d][%d].f[%d]=%f\n",
|
|
(int)i, (int)j, (int)k, (double)wdata[i][j].f[k], (int)i, (int)j, (int)k,
|
|
(double)rdata[i][j].f[k]);
|
|
continue;
|
|
} /* end if */
|
|
} /* end for */
|
|
} /* end for */
|
|
|
|
/* Close Datatype */
|
|
ret = H5Tclose(tid1);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Close Dataset */
|
|
ret = H5Dclose(dataset);
|
|
CHECK(ret, FAIL, "H5Dclose");
|
|
|
|
/* Close file */
|
|
ret = H5Fclose(fid1);
|
|
CHECK(ret, FAIL, "H5Fclose");
|
|
|
|
} /* end test_array_compound_array() */
|
|
|
|
/****************************************************************
|
|
**
|
|
** test_array_alloc_custom(): Test VL datatype custom memory
|
|
** allocation routines. This routine just uses malloc to
|
|
** allocate the memory and increments the amount of memory
|
|
** allocated.
|
|
**
|
|
****************************************************************/
|
|
|
|
/*-------------------------------------------------------------------------
|
|
* Function: test_array_alloc_custom
|
|
*
|
|
* Purpose: Memory allocator for testing VL datatype custom memory
|
|
* allocation routines.
|
|
*
|
|
* This routine just uses malloc to allocate the memory and
|
|
* increments the amount of memory allocated.
|
|
*
|
|
* Return:
|
|
*
|
|
* Success: A memory buffer
|
|
* Failure: NULL
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
void *
|
|
test_array_alloc_custom(size_t size, void *info)
|
|
{
|
|
void * ret_value = NULL; /* Pointer to return */
|
|
size_t *mem_used = (size_t *)info; /* Pointer to the memory used */
|
|
size_t extra; /* Extra space needed */
|
|
|
|
/*
|
|
* This weird contortion is required on the DEC Alpha to keep the
|
|
* alignment correct - QAK
|
|
*/
|
|
extra = MAX(sizeof(void *), sizeof(size_t));
|
|
|
|
if ((ret_value = HDmalloc(extra + size)) != NULL) {
|
|
*(size_t *)ret_value = size;
|
|
*mem_used += size;
|
|
} /* end if */
|
|
|
|
ret_value = ((unsigned char *)ret_value) + extra;
|
|
return ret_value;
|
|
} /* end test_array_alloc_custom() */
|
|
|
|
/*-------------------------------------------------------------------------
|
|
* Function: test_array_free_custom
|
|
*
|
|
* Purpose: Memory free function for testing VL datatype custom memory
|
|
* allocation routines.
|
|
*
|
|
* This routine just uses free to free the memory and
|
|
* decrements the amount of memory allocated.
|
|
*
|
|
* Return: void
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
void
|
|
test_array_free_custom(void *_mem, void *info)
|
|
{
|
|
unsigned char *mem = NULL; /* Pointer to mem to be freed */
|
|
size_t * mem_used = (size_t *)info; /* Pointer to the memory used */
|
|
size_t extra; /* Extra space needed */
|
|
|
|
/*
|
|
* This weird contortion is required on the DEC Alpha to keep the
|
|
* alignment correct - QAK
|
|
*/
|
|
extra = MAX(sizeof(void *), sizeof(size_t));
|
|
|
|
if (_mem != NULL) {
|
|
mem = ((unsigned char *)_mem) - extra;
|
|
*mem_used -= *(size_t *)((void *)mem);
|
|
HDfree(mem);
|
|
} /* end if */
|
|
|
|
} /* end test_array_free_custom() */
|
|
|
|
/*-------------------------------------------------------------------------
|
|
* Function: test_array_vlen_atomic
|
|
*
|
|
* Purpose: Test basic array datatype code.
|
|
* Tests 1-D array of atomic VL datatypes.
|
|
*
|
|
* Return: void
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
static void
|
|
test_array_vlen_atomic(void)
|
|
{
|
|
hvl_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
|
|
hvl_t rdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information read in */
|
|
hid_t fid1; /* HDF5 File IDs */
|
|
hid_t dataset; /* Dataset ID */
|
|
hid_t sid1; /* Dataspace ID */
|
|
hid_t tid1; /* Array Datatype ID */
|
|
hid_t tid2; /* VL Datatype ID */
|
|
hid_t tid3; /* Atomic Datatype ID */
|
|
hsize_t sdims1[] = {SPACE1_DIM1};
|
|
hsize_t tdims1[] = {ARRAY1_DIM1};
|
|
int ndims; /* Array rank for reading */
|
|
hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
|
|
H5T_class_t mclass; /* Datatype class for VL */
|
|
hid_t xfer_pid; /* Dataset transfer property list ID */
|
|
hsize_t size; /* Number of bytes which will be used */
|
|
size_t mem_used = 0; /* Memory used during allocation */
|
|
int i, j, k; /* counting variables */
|
|
herr_t ret; /* Generic return value */
|
|
|
|
/* Output message about test being performed */
|
|
MESSAGE(5, ("Testing 1-D Array of Atomic Variable-Length Datatypes Functionality\n"));
|
|
|
|
/* Initialize array data to write */
|
|
for (i = 0; i < SPACE1_DIM1; i++)
|
|
for (j = 0; j < ARRAY1_DIM1; j++) {
|
|
wdata[i][j].p = HDmalloc((size_t)(i + j + 1) * sizeof(unsigned int));
|
|
wdata[i][j].len = (size_t)(i + j + 1);
|
|
for (k = 0; k < (i + j + 1); k++)
|
|
((unsigned int *)wdata[i][j].p)[k] = (unsigned int)(i * 100 + j * 10 + k);
|
|
} /* end for */
|
|
|
|
/* Create file */
|
|
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
|
CHECK(fid1, FAIL, "H5Fcreate");
|
|
|
|
/* Create dataspace for datasets */
|
|
sid1 = H5Screate_simple(SPACE1_RANK, sdims1, NULL);
|
|
CHECK(sid1, FAIL, "H5Screate_simple");
|
|
|
|
/* Create a compound datatype to refer to */
|
|
tid2 = H5Tvlen_create(H5T_NATIVE_UINT);
|
|
CHECK(tid2, FAIL, "H5Tcreate");
|
|
|
|
/* Create an array datatype to refer to */
|
|
tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1);
|
|
CHECK(tid1, FAIL, "H5Tarray_create2");
|
|
|
|
/* Close VL datatype */
|
|
ret = H5Tclose(tid2);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Create a dataset */
|
|
dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
|
CHECK(dataset, FAIL, "H5Dcreate2");
|
|
|
|
/* Write dataset to disk */
|
|
ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
|
|
CHECK(ret, FAIL, "H5Dwrite");
|
|
|
|
/* Close Dataset */
|
|
ret = H5Dclose(dataset);
|
|
CHECK(ret, FAIL, "H5Dclose");
|
|
|
|
/* Close datatype */
|
|
ret = H5Tclose(tid1);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Close disk dataspace */
|
|
ret = H5Sclose(sid1);
|
|
CHECK(ret, FAIL, "H5Sclose");
|
|
|
|
/* Close file */
|
|
ret = H5Fclose(fid1);
|
|
CHECK(ret, FAIL, "H5Fclose");
|
|
|
|
/* Re-open file */
|
|
fid1 = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
|
|
CHECK(fid1, FAIL, "H5Fopen");
|
|
|
|
/* Open the dataset */
|
|
dataset = H5Dopen2(fid1, "Dataset1", H5P_DEFAULT);
|
|
CHECK(dataset, FAIL, "H5Dopen2");
|
|
|
|
/* Get the dataspace */
|
|
sid1 = H5Dget_space(dataset);
|
|
CHECK(sid1, FAIL, "H5Dget_space");
|
|
|
|
/* Get the datatype */
|
|
tid1 = H5Dget_type(dataset);
|
|
CHECK(tid1, FAIL, "H5Dget_type");
|
|
|
|
/* Check the array rank */
|
|
ndims = H5Tget_array_ndims(tid1);
|
|
VERIFY(ndims, ARRAY1_RANK, "H5Tget_array_ndims");
|
|
|
|
/* Get the array dimensions */
|
|
ret = H5Tget_array_dims2(tid1, rdims1);
|
|
CHECK(ret, FAIL, "H5Tget_array_dims2");
|
|
|
|
/* Check the array dimensions */
|
|
for (i = 0; i < ndims; i++)
|
|
if (rdims1[i] != tdims1[i]) {
|
|
TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE
|
|
", tdims1[%d]=%" PRIuHSIZE "\n",
|
|
i, rdims1[i], i, tdims1[i]);
|
|
continue;
|
|
} /* end if */
|
|
|
|
/* Get the VL datatype */
|
|
tid2 = H5Tget_super(tid1);
|
|
CHECK(tid2, FAIL, "H5Tget_super");
|
|
|
|
/* Get the 2nd field's class */
|
|
mclass = H5Tget_class(tid2);
|
|
VERIFY(mclass, H5T_VLEN, "H5Tget_class");
|
|
|
|
/* Check the VL datatype's base type */
|
|
tid3 = H5Tget_super(tid2);
|
|
CHECK(tid3, FAIL, "H5Tget_super");
|
|
|
|
if ((ret = H5Tequal(tid3, H5T_NATIVE_UINT)) <= 0)
|
|
TestErrPrintf("VL base datatype is incorrect!, ret=%d\n", (int)ret);
|
|
|
|
/* Close the array's base type datatype */
|
|
ret = H5Tclose(tid3);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Close VL Datatype */
|
|
ret = H5Tclose(tid2);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Change to the custom memory allocation routines for reading VL data */
|
|
xfer_pid = H5Pcreate(H5P_DATASET_XFER);
|
|
CHECK(xfer_pid, FAIL, "H5Pcreate");
|
|
|
|
ret = H5Pset_vlen_mem_manager(xfer_pid, test_array_alloc_custom, &mem_used, test_array_free_custom,
|
|
&mem_used);
|
|
CHECK(ret, FAIL, "H5Pset_vlen_mem_manager");
|
|
|
|
/* Make certain the correct amount of memory will be used */
|
|
ret = H5Dvlen_get_buf_size(dataset, tid1, sid1, &size);
|
|
CHECK(ret, FAIL, "H5Dvlen_get_buf_size");
|
|
|
|
/* # elements allocated = (1 + 2 + 3 + 4) + (2 + 3 + 4 + 5) +
|
|
* (3 + 4 + 5 + 6) + (4 + 5 + 6 + 7) = 64 elements
|
|
*/
|
|
VERIFY(size, 64 * sizeof(unsigned int), "H5Dvlen_get_buf_size");
|
|
|
|
/* Read dataset from disk */
|
|
ret = H5Dread(dataset, tid1, H5S_ALL, H5S_ALL, xfer_pid, rdata);
|
|
CHECK(ret, FAIL, "H5Dread");
|
|
|
|
/* Make certain the correct amount of memory has been used */
|
|
/* # elements allocated = (1 + 2 + 3 + 4) + (2 + 3 + 4 + 5) +
|
|
* (3 + 4 + 5 + 6) + (4 + 5 + 6 + 7) = 64 elements
|
|
*/
|
|
VERIFY(mem_used, 64 * sizeof(unsigned int), "H5Dread");
|
|
|
|
/* Compare data read in */
|
|
for (i = 0; i < SPACE1_DIM1; i++) {
|
|
for (j = 0; j < ARRAY1_DIM1; j++) {
|
|
if (wdata[i][j].len != rdata[i][j].len) {
|
|
TestErrPrintf("VL data length don't match!, wdata[%d][%d].len=%d, rdata[%d][%d].len=%d\n",
|
|
(int)i, (int)j, (int)wdata[i][j].len, (int)i, (int)j, (int)rdata[i][j].len);
|
|
continue;
|
|
} /* end if */
|
|
for (k = 0; k < (int)rdata[i][j].len; k++) {
|
|
if (((unsigned int *)wdata[i][j].p)[k] != ((unsigned int *)rdata[i][j].p)[k]) {
|
|
TestErrPrintf(
|
|
"VL data values don't match!, wdata[%d][%d].p[%d]=%d, rdata[%d][%d].p[%d]=%d\n",
|
|
(int)i, (int)j, (int)k, (int)((unsigned int *)wdata[i][j].p)[k], (int)i, (int)j,
|
|
(int)k, (int)((unsigned int *)rdata[i][j].p)[k]);
|
|
continue;
|
|
} /* end if */
|
|
} /* end for */
|
|
} /* end for */
|
|
} /* end for */
|
|
|
|
/* Reclaim the read VL data */
|
|
ret = H5Dvlen_reclaim(tid1, sid1, xfer_pid, rdata);
|
|
CHECK(ret, FAIL, "H5Dvlen_reclaim");
|
|
|
|
/* Make certain the VL memory has been freed */
|
|
VERIFY(mem_used, 0, "H5Dvlen_reclaim");
|
|
|
|
/* Reclaim the write VL data */
|
|
ret = H5Dvlen_reclaim(tid1, sid1, H5P_DEFAULT, wdata);
|
|
CHECK(ret, FAIL, "H5Dvlen_reclaim");
|
|
|
|
/* Close dataset transfer property list */
|
|
ret = H5Pclose(xfer_pid);
|
|
CHECK(ret, FAIL, "H5Pclose");
|
|
|
|
/* Close Datatype */
|
|
ret = H5Tclose(tid1);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Close Dataset */
|
|
ret = H5Dclose(dataset);
|
|
CHECK(ret, FAIL, "H5Dclose");
|
|
|
|
/* Close file */
|
|
ret = H5Fclose(fid1);
|
|
CHECK(ret, FAIL, "H5Fclose");
|
|
|
|
} /* end test_array_vlen_atomic() */
|
|
|
|
/*-------------------------------------------------------------------------
|
|
* Function: test_array_vlen_array
|
|
*
|
|
* Purpose: Test basic array datatype code.
|
|
* Tests 1-D array of 1-D array VL datatypes.
|
|
*
|
|
* Return: void
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
static void
|
|
test_array_vlen_array(void)
|
|
{
|
|
hvl_t wdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information to write */
|
|
hvl_t rdata[SPACE1_DIM1][ARRAY1_DIM1]; /* Information read in */
|
|
hid_t fid1; /* HDF5 File IDs */
|
|
hid_t dataset; /* Dataset ID */
|
|
hid_t sid1; /* Dataspace ID */
|
|
hid_t tid1; /* Array Datatype ID */
|
|
hid_t tid2; /* VL Datatype ID */
|
|
hid_t tid3; /* Nested Array Datatype ID */
|
|
hid_t tid4; /* Atomic Datatype ID */
|
|
hsize_t sdims1[] = {SPACE1_DIM1};
|
|
hsize_t tdims1[] = {ARRAY1_DIM1};
|
|
int ndims; /* Array rank for reading */
|
|
hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
|
|
H5T_class_t mclass; /* Datatype class for VL */
|
|
hid_t xfer_pid; /* Dataset transfer property list ID */
|
|
hsize_t size; /* Number of bytes which will be used */
|
|
size_t mem_used = 0; /* Memory used during allocation */
|
|
int i, j, k, l; /* Index variables */
|
|
herr_t ret; /* Generic return value */
|
|
|
|
/* Output message about test being performed */
|
|
MESSAGE(5, ("Testing 1-D Array of 1-D Array Variable-Length Datatypes Functionality\n"));
|
|
|
|
/* Initialize array data to write */
|
|
for (i = 0; i < SPACE1_DIM1; i++)
|
|
for (j = 0; j < ARRAY1_DIM1; j++) {
|
|
wdata[i][j].p = HDmalloc((size_t)(i + j + 1) * sizeof(unsigned int) * (size_t)ARRAY1_DIM1);
|
|
wdata[i][j].len = (size_t)(i + j + 1);
|
|
for (k = 0; k < (i + j + 1); k++)
|
|
for (l = 0; l < ARRAY1_DIM1; l++)
|
|
((unsigned int *)wdata[i][j].p)[k * ARRAY1_DIM1 + l] =
|
|
(unsigned int)(i * 1000 + j * 100 + k * 10 + l);
|
|
}
|
|
|
|
/* Create file */
|
|
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
|
CHECK(fid1, FAIL, "H5Fcreate");
|
|
|
|
/* Create dataspace for datasets */
|
|
sid1 = H5Screate_simple(SPACE1_RANK, sdims1, NULL);
|
|
CHECK(sid1, FAIL, "H5Screate_simple");
|
|
|
|
/* Create the nested array datatype to refer to */
|
|
tid3 = H5Tarray_create2(H5T_NATIVE_UINT, ARRAY1_RANK, tdims1);
|
|
CHECK(tid3, FAIL, "H5Tarray_create2");
|
|
|
|
/* Create a VL datatype of 1-D arrays to refer to */
|
|
tid2 = H5Tvlen_create(tid3);
|
|
CHECK(tid2, FAIL, "H5Tcreate");
|
|
|
|
/* Close nested array datatype */
|
|
ret = H5Tclose(tid3);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Create an array datatype to refer to */
|
|
tid1 = H5Tarray_create2(tid2, ARRAY1_RANK, tdims1);
|
|
CHECK(tid1, FAIL, "H5Tarray_create2");
|
|
|
|
/* Close VL datatype */
|
|
ret = H5Tclose(tid2);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Create a dataset */
|
|
dataset = H5Dcreate2(fid1, "Dataset1", tid1, sid1, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
|
CHECK(dataset, FAIL, "H5Dcreate2");
|
|
|
|
/* Write dataset to disk */
|
|
ret = H5Dwrite(dataset, tid1, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
|
|
CHECK(ret, FAIL, "H5Dwrite");
|
|
|
|
/* Close Dataset */
|
|
ret = H5Dclose(dataset);
|
|
CHECK(ret, FAIL, "H5Dclose");
|
|
|
|
/* Close datatype */
|
|
ret = H5Tclose(tid1);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Close disk dataspace */
|
|
ret = H5Sclose(sid1);
|
|
CHECK(ret, FAIL, "H5Sclose");
|
|
|
|
/* Close file */
|
|
ret = H5Fclose(fid1);
|
|
CHECK(ret, FAIL, "H5Fclose");
|
|
|
|
/* Re-open file */
|
|
fid1 = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
|
|
CHECK(fid1, FAIL, "H5Fopen");
|
|
|
|
/* Open the dataset */
|
|
dataset = H5Dopen2(fid1, "Dataset1", H5P_DEFAULT);
|
|
CHECK(dataset, FAIL, "H5Dopen2");
|
|
|
|
/* Get the dataspace */
|
|
sid1 = H5Dget_space(dataset);
|
|
CHECK(sid1, FAIL, "H5Dget_space");
|
|
|
|
/* Get the datatype */
|
|
tid1 = H5Dget_type(dataset);
|
|
CHECK(tid1, FAIL, "H5Dget_type");
|
|
|
|
/* Check the array rank */
|
|
ndims = H5Tget_array_ndims(tid1);
|
|
VERIFY(ndims, ARRAY1_RANK, "H5Tget_array_ndims");
|
|
|
|
/* Get the array dimensions */
|
|
ret = H5Tget_array_dims2(tid1, rdims1);
|
|
CHECK(ret, FAIL, "H5Tget_array_dims2");
|
|
|
|
/* Check the array dimensions */
|
|
for (i = 0; i < ndims; i++)
|
|
if (rdims1[i] != tdims1[i]) {
|
|
TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE
|
|
", tdims1[%d]=%" PRIuHSIZE "\n",
|
|
i, rdims1[i], i, tdims1[i]);
|
|
continue;
|
|
} /* end if */
|
|
|
|
/* Get the VL datatype */
|
|
tid2 = H5Tget_super(tid1);
|
|
CHECK(tid2, FAIL, "H5Tget_super");
|
|
|
|
/* Get the VL datatype's class */
|
|
mclass = H5Tget_class(tid2);
|
|
VERIFY(mclass, H5T_VLEN, "H5Tget_class");
|
|
|
|
/* Check the VL datatype's base type */
|
|
tid3 = H5Tget_super(tid2);
|
|
CHECK(tid3, FAIL, "H5Tget_super");
|
|
|
|
/* Get the nested array datatype's class */
|
|
mclass = H5Tget_class(tid3);
|
|
VERIFY(mclass, H5T_ARRAY, "H5Tget_class");
|
|
|
|
/* Check the array rank */
|
|
ndims = H5Tget_array_ndims(tid3);
|
|
VERIFY(ndims, ARRAY1_RANK, "H5Tget_array_ndims");
|
|
|
|
/* Get the array dimensions */
|
|
ret = H5Tget_array_dims2(tid3, rdims1);
|
|
CHECK(ret, FAIL, "H5Tget_array_dims2");
|
|
|
|
/* Check the array dimensions */
|
|
for (i = 0; i < ndims; i++)
|
|
if (rdims1[i] != tdims1[i]) {
|
|
TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE
|
|
", tdims1[%d]=%" PRIuHSIZE "\n",
|
|
i, rdims1[i], i, tdims1[i]);
|
|
continue;
|
|
} /* end if */
|
|
|
|
/* Check the array's base type */
|
|
tid4 = H5Tget_super(tid3);
|
|
CHECK(tid4, FAIL, "H5Tget_super");
|
|
|
|
if ((ret = H5Tequal(tid4, H5T_NATIVE_UINT)) <= 0)
|
|
TestErrPrintf("VL base datatype is incorrect!, ret=%d\n", (int)ret);
|
|
|
|
/* Close the array's base type datatype */
|
|
ret = H5Tclose(tid4);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Close the nested array datatype */
|
|
ret = H5Tclose(tid3);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Close VL Datatype */
|
|
ret = H5Tclose(tid2);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Change to the custom memory allocation routines for reading VL data */
|
|
xfer_pid = H5Pcreate(H5P_DATASET_XFER);
|
|
CHECK(xfer_pid, FAIL, "H5Pcreate");
|
|
|
|
ret = H5Pset_vlen_mem_manager(xfer_pid, test_array_alloc_custom, &mem_used, test_array_free_custom,
|
|
&mem_used);
|
|
CHECK(ret, FAIL, "H5Pset_vlen_mem_manager");
|
|
|
|
/* Make certain the correct amount of memory will be used */
|
|
ret = H5Dvlen_get_buf_size(dataset, tid1, sid1, &size);
|
|
CHECK(ret, FAIL, "H5Dvlen_get_buf_size");
|
|
|
|
/* # elements allocated = (1 + 2 + 3 + 4) + (2 + 3 + 4 + 5) +
|
|
* (3 + 4 + 5 + 6) + (4 + 5 + 6 + 7) = 64*ARRAY1_DIM1 elements
|
|
*/
|
|
VERIFY(size, 64 * (sizeof(unsigned int) * ARRAY1_DIM1), "H5Dvlen_get_buf_size");
|
|
|
|
/* Read dataset from disk */
|
|
ret = H5Dread(dataset, tid1, H5S_ALL, H5S_ALL, xfer_pid, rdata);
|
|
CHECK(ret, FAIL, "H5Dread");
|
|
|
|
/* Make certain the correct amount of memory has been used */
|
|
/* # elements allocated = (1 + 2 + 3 + 4) + (2 + 3 + 4 + 5) +
|
|
* (3 + 4 + 5 + 6) + (4 + 5 + 6 + 7) = 64*ARRAY1_DIM1 elements
|
|
*/
|
|
VERIFY(mem_used, 64 * (sizeof(unsigned int) * ARRAY1_DIM1), "H5Dread");
|
|
|
|
/* Compare data read in */
|
|
for (i = 0; i < SPACE1_DIM1; i++) {
|
|
for (j = 0; j < ARRAY1_DIM1; j++) {
|
|
if (wdata[i][j].len != rdata[i][j].len) {
|
|
TestErrPrintf("VL data length don't match!, wdata[%d][%d].len=%d, rdata[%d][%d].len=%d\n",
|
|
(int)i, (int)j, (int)wdata[i][j].len, (int)i, (int)j, (int)rdata[i][j].len);
|
|
continue;
|
|
} /* end if */
|
|
for (k = 0; k < (int)rdata[i][j].len; k++) {
|
|
for (l = 0; l < ARRAY1_DIM1; l++) {
|
|
if (((unsigned int *)wdata[i][j].p)[k * ARRAY1_DIM1 + l] !=
|
|
((unsigned int *)rdata[i][j].p)[k * ARRAY1_DIM1 + l]) {
|
|
TestErrPrintf("VL data values don't match!, wdata[%d][%d].p[%d][%d]=%d, "
|
|
"rdata[%d][%d].p[%d][%d]=%d\n",
|
|
(int)i, (int)j, (int)k, (int)l,
|
|
(int)((unsigned int *)wdata[i][j].p)[k * ARRAY1_DIM1 + l], (int)i,
|
|
(int)j, (int)k, (int)l,
|
|
(int)((unsigned int *)rdata[i][j].p)[k * ARRAY1_DIM1 + l]);
|
|
continue;
|
|
} /* end if */
|
|
} /* end for */
|
|
} /* end for */
|
|
} /* end for */
|
|
} /* end for */
|
|
|
|
/* Reclaim the read VL data */
|
|
ret = H5Dvlen_reclaim(tid1, sid1, xfer_pid, rdata);
|
|
CHECK(ret, FAIL, "H5Dvlen_reclaim");
|
|
|
|
/* Make certain the VL memory has been freed */
|
|
VERIFY(mem_used, 0, "H5Dvlen_reclaim");
|
|
|
|
/* Reclaim the write VL data */
|
|
ret = H5Dvlen_reclaim(tid1, sid1, H5P_DEFAULT, wdata);
|
|
CHECK(ret, FAIL, "H5Dvlen_reclaim");
|
|
|
|
/* Close dataset transfer property list */
|
|
ret = H5Pclose(xfer_pid);
|
|
CHECK(ret, FAIL, "H5Pclose");
|
|
|
|
/* Close Datatype */
|
|
ret = H5Tclose(tid1);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Close Dataset */
|
|
ret = H5Dclose(dataset);
|
|
CHECK(ret, FAIL, "H5Dclose");
|
|
|
|
/* Close file */
|
|
ret = H5Fclose(fid1);
|
|
CHECK(ret, FAIL, "H5Fclose");
|
|
|
|
} /* end test_array_vlen_array() */
|
|
|
|
/*-------------------------------------------------------------------------
|
|
* Function: test_array_bkg
|
|
*
|
|
* Purpose: Test basic array datatype code.
|
|
* Tests reading compound datatype with array fields and
|
|
* writing partial fields.
|
|
*
|
|
* Return: void
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
static void
|
|
test_array_bkg(void)
|
|
{
|
|
herr_t status = -1;
|
|
|
|
hid_t fid, array_dt;
|
|
hid_t space;
|
|
hid_t type;
|
|
hid_t dataset;
|
|
|
|
hsize_t dim[] = {LENGTH};
|
|
hsize_t dima[] = {ALEN};
|
|
|
|
int i, j;
|
|
unsigned ndims[3] = {1, 1, 1};
|
|
|
|
typedef struct {
|
|
int a[ALEN];
|
|
float b[ALEN];
|
|
double c[ALEN];
|
|
} CmpField;
|
|
|
|
CmpField cf[LENGTH];
|
|
CmpField cfr[LENGTH];
|
|
CmpDTSinfo *dtsinfo = NULL;
|
|
|
|
typedef struct {
|
|
float b[ALEN];
|
|
} fld_t;
|
|
|
|
fld_t fld[LENGTH];
|
|
fld_t fldr[LENGTH];
|
|
|
|
/* Output message about test being performed */
|
|
MESSAGE(5, ("Testing Partial I/O of Array Fields in Compound Datatype Functionality\n"));
|
|
|
|
/* Initialize the data */
|
|
/* ------------------- */
|
|
dtsinfo = (CmpDTSinfo *)HDmalloc(sizeof(CmpDTSinfo));
|
|
CHECK_PTR(dtsinfo, "HDmalloc");
|
|
HDmemset(dtsinfo, 0, sizeof(CmpDTSinfo));
|
|
for (i = 0; i < LENGTH; i++) {
|
|
for (j = 0; j < ALEN; j++) {
|
|
cf[i].a[j] = 100 * (i + 1) + j;
|
|
cf[i].b[j] = 100.0F * ((float)i + 1.0F) + 0.01F * (float)j;
|
|
cf[i].c[j] = (double)(100.0F * ((float)i + 1.0F) + 0.02F * (float)j);
|
|
} /* end for */
|
|
} /* end for */
|
|
|
|
/* Set the number of data members */
|
|
/* ------------------------------ */
|
|
dtsinfo->nsubfields = 3;
|
|
|
|
/* Initialize the offsets */
|
|
/* ----------------------- */
|
|
dtsinfo->offset[0] = HOFFSET(CmpField, a);
|
|
dtsinfo->offset[1] = HOFFSET(CmpField, b);
|
|
dtsinfo->offset[2] = HOFFSET(CmpField, c);
|
|
|
|
/* Initialize the data type IDs */
|
|
/* ---------------------------- */
|
|
dtsinfo->datatype[0] = H5T_NATIVE_INT;
|
|
dtsinfo->datatype[1] = H5T_NATIVE_FLOAT;
|
|
dtsinfo->datatype[2] = H5T_NATIVE_DOUBLE;
|
|
|
|
/* Initialize the names of data members */
|
|
/* ------------------------------------ */
|
|
for (i = 0; i < dtsinfo->nsubfields; i++)
|
|
dtsinfo->name[i] = (char *)HDcalloc((size_t)20, sizeof(char));
|
|
|
|
HDstrcpy(dtsinfo->name[0], "One");
|
|
HDstrcpy(dtsinfo->name[1], "Two");
|
|
HDstrcpy(dtsinfo->name[2], "Three");
|
|
|
|
/* Create file */
|
|
/* ----------- */
|
|
fid = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
|
|
CHECK(fid, FAIL, "H5Fcreate");
|
|
|
|
/* Create data space */
|
|
/* ----------------- */
|
|
space = H5Screate_simple(RANK, dim, NULL);
|
|
CHECK(space, FAIL, "H5Screate_simple");
|
|
|
|
/* Create the memory data type */
|
|
/* --------------------------- */
|
|
type = H5Tcreate(H5T_COMPOUND, sizeof(CmpField));
|
|
CHECK(type, FAIL, "H5Tcreate");
|
|
|
|
/* Add members to the compound data type */
|
|
/* -------------------------------------- */
|
|
for (i = 0; i < dtsinfo->nsubfields; i++) {
|
|
array_dt = H5Tarray_create2(dtsinfo->datatype[i], ndims[i], dima);
|
|
CHECK(array_dt, FAIL, "H5Tarray_create2");
|
|
|
|
status = H5Tinsert(type, dtsinfo->name[i], dtsinfo->offset[i], array_dt);
|
|
CHECK(status, FAIL, "H5Tinsert");
|
|
|
|
status = H5Tclose(array_dt);
|
|
CHECK(status, FAIL, "H5Tclose");
|
|
} /* end for */
|
|
|
|
/* Create the dataset */
|
|
/* ------------------ */
|
|
dataset = H5Dcreate2(fid, FIELDNAME, type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
|
|
CHECK(dataset, FAIL, "H5Dcreate2");
|
|
|
|
/* Write data to the dataset */
|
|
/* ------------------------- */
|
|
status = H5Dwrite(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, cf);
|
|
CHECK(status, FAIL, "H5Dwrite");
|
|
|
|
status = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, cfr);
|
|
CHECK(status, FAIL, "H5Dread");
|
|
|
|
/* Verify correct data */
|
|
/* ------------------- */
|
|
for (i = 0; i < LENGTH; i++) {
|
|
for (j = 0; j < ALEN; j++) {
|
|
if (cf[i].a[j] != cfr[i].a[j]) {
|
|
TestErrPrintf("Field a data doesn't match, cf[%d].a[%d]=%d, cfr[%d].a[%d]=%d\n", (int)i,
|
|
(int)j, (int)cf[i].a[j], (int)i, (int)j, (int)cfr[i].a[j]);
|
|
continue;
|
|
} /* end if */
|
|
if (!H5_FLT_ABS_EQUAL(cf[i].b[j], cfr[i].b[j])) {
|
|
TestErrPrintf("Field b data doesn't match, cf[%d].b[%d]=%f, cfr[%d].b[%d]=%f\n", (int)i,
|
|
(int)j, (double)cf[i].b[j], (int)i, (int)j, (double)cfr[i].b[j]);
|
|
continue;
|
|
} /* end if */
|
|
if (!H5_DBL_ABS_EQUAL(cf[i].c[j], cfr[i].c[j])) {
|
|
TestErrPrintf("Field c data doesn't match, cf[%d].b[%d]=%f, cfr[%d].b[%d]=%f\n", (int)i,
|
|
(int)j, (double)cf[i].c[j], (int)i, (int)j, (double)cfr[i].c[j]);
|
|
continue;
|
|
} /* end if */
|
|
} /* end for */
|
|
} /* end for */
|
|
|
|
/* Release memory resources */
|
|
/* ------------------------ */
|
|
for (i = 0; i < dtsinfo->nsubfields; i++)
|
|
HDfree(dtsinfo->name[i]);
|
|
|
|
/* Release IDs */
|
|
/* ----------- */
|
|
status = H5Tclose(type);
|
|
CHECK(status, FAIL, "H5Tclose");
|
|
|
|
status = H5Sclose(space);
|
|
CHECK(status, FAIL, "H5Sclose");
|
|
|
|
status = H5Dclose(dataset);
|
|
CHECK(status, FAIL, "H5Dclose");
|
|
|
|
status = H5Fclose(fid);
|
|
CHECK(status, FAIL, "H5Fclose");
|
|
|
|
/******************************/
|
|
/* Reopen the file and update */
|
|
/******************************/
|
|
|
|
fid = H5Fopen(FILENAME, H5F_ACC_RDWR, H5P_DEFAULT);
|
|
CHECK(fid, FAIL, "H5Fopen");
|
|
|
|
dataset = H5Dopen2(fid, FIELDNAME, H5P_DEFAULT);
|
|
CHECK(dataset, FAIL, "H5Dopen2");
|
|
|
|
type = H5Tcreate(H5T_COMPOUND, sizeof(fld_t));
|
|
CHECK(type, FAIL, "H5Tcreate");
|
|
|
|
array_dt = H5Tarray_create2(H5T_NATIVE_FLOAT, 1, dima);
|
|
CHECK(array_dt, FAIL, "H5Tarray_create2");
|
|
|
|
status = H5Tinsert(type, "Two", HOFFSET(fld_t, b), array_dt);
|
|
CHECK(status, FAIL, "H5Tinsert");
|
|
|
|
/* Initialize the data to overwrite */
|
|
/* -------------------------------- */
|
|
for (i = 0; i < LENGTH; i++)
|
|
for (j = 0; j < ALEN; j++)
|
|
cf[i].b[j] = fld[i].b[j] = 1.313F;
|
|
|
|
status = H5Dwrite(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, fld);
|
|
CHECK(status, FAIL, "H5Dwrite");
|
|
|
|
/* Read just the field changed */
|
|
status = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, fldr);
|
|
CHECK(status, FAIL, "H5Dread");
|
|
|
|
for (i = 0; i < LENGTH; i++)
|
|
for (j = 0; j < ALEN; j++)
|
|
if (!H5_FLT_ABS_EQUAL(fld[i].b[j], fldr[i].b[j])) {
|
|
TestErrPrintf("Field data doesn't match, fld[%d].b[%d]=%f, fldr[%d].b[%d]=%f\n", (int)i,
|
|
(int)j, (double)fld[i].b[j], (int)i, (int)j, (double)fldr[i].b[j]);
|
|
continue;
|
|
} /* end if */
|
|
|
|
status = H5Tclose(type);
|
|
CHECK(status, FAIL, "H5Tclose");
|
|
|
|
status = H5Tclose(array_dt);
|
|
CHECK(status, FAIL, "H5Tclose");
|
|
|
|
type = H5Dget_type(dataset);
|
|
CHECK(type, FAIL, "H5Dget_type");
|
|
|
|
/* Read the entire dataset again */
|
|
status = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, cfr);
|
|
CHECK(status, FAIL, "H5Dread");
|
|
|
|
/* Verify correct data */
|
|
/* ------------------- */
|
|
for (i = 0; i < LENGTH; i++) {
|
|
for (j = 0; j < ALEN; j++) {
|
|
if (cf[i].a[j] != cfr[i].a[j]) {
|
|
TestErrPrintf("Field a data doesn't match, cf[%d].a[%d]=%d, cfr[%d].a[%d]=%d\n", (int)i,
|
|
(int)j, (int)cf[i].a[j], (int)i, (int)j, (int)cfr[i].a[j]);
|
|
continue;
|
|
} /* end if */
|
|
if (!H5_FLT_ABS_EQUAL(cf[i].b[j], cfr[i].b[j])) {
|
|
TestErrPrintf("Field b data doesn't match, cf[%d].b[%d]=%f, cfr[%d].b[%d]=%f\n", (int)i,
|
|
(int)j, (double)cf[i].b[j], (int)i, (int)j, (double)cfr[i].b[j]);
|
|
continue;
|
|
} /* end if */
|
|
if (!H5_DBL_ABS_EQUAL(cf[i].c[j], cfr[i].c[j])) {
|
|
TestErrPrintf("Field c data doesn't match, cf[%d].b[%d]=%f, cfr[%d].b[%d]=%f\n", (int)i,
|
|
(int)j, (double)cf[i].c[j], (int)i, (int)j, (double)cfr[i].c[j]);
|
|
continue;
|
|
} /* end if */
|
|
} /* end for */
|
|
} /* end for */
|
|
|
|
status = H5Dclose(dataset);
|
|
CHECK(status, FAIL, "H5Dclose");
|
|
|
|
status = H5Tclose(type);
|
|
CHECK(status, FAIL, "H5Tclose");
|
|
|
|
status = H5Fclose(fid);
|
|
CHECK(status, FAIL, "H5Fclose");
|
|
|
|
/****************************************************/
|
|
/* Reopen the file and print out all the data again */
|
|
/****************************************************/
|
|
|
|
fid = H5Fopen(FILENAME, H5F_ACC_RDWR, H5P_DEFAULT);
|
|
CHECK(fid, FAIL, "H5Fopen");
|
|
|
|
dataset = H5Dopen2(fid, FIELDNAME, H5P_DEFAULT);
|
|
CHECK(dataset, FAIL, "H5Dopen2");
|
|
|
|
type = H5Dget_type(dataset);
|
|
CHECK(type, FAIL, "H5Dget_type");
|
|
|
|
/* Reset the data to read in */
|
|
/* ------------------------- */
|
|
HDmemset(cfr, 0, sizeof(CmpField) * LENGTH);
|
|
|
|
status = H5Dread(dataset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, cfr);
|
|
CHECK(status, FAIL, "H5Dread");
|
|
|
|
/* Verify correct data */
|
|
/* ------------------- */
|
|
for (i = 0; i < LENGTH; i++) {
|
|
for (j = 0; j < ALEN; j++) {
|
|
if (cf[i].a[j] != cfr[i].a[j]) {
|
|
TestErrPrintf("Field a data doesn't match, cf[%d].a[%d]=%d, cfr[%d].a[%d]=%d\n", (int)i,
|
|
(int)j, (int)cf[i].a[j], (int)i, (int)j, (int)cfr[i].a[j]);
|
|
continue;
|
|
} /* end if */
|
|
if (!H5_FLT_ABS_EQUAL(cf[i].b[j], cfr[i].b[j])) {
|
|
TestErrPrintf("Field b data doesn't match, cf[%d].b[%d]=%f, cfr[%d].b[%d]=%f\n", (int)i,
|
|
(int)j, (double)cf[i].b[j], (int)i, (int)j, (double)cfr[i].b[j]);
|
|
continue;
|
|
} /* end if */
|
|
if (!H5_DBL_ABS_EQUAL(cf[i].c[j], cfr[i].c[j])) {
|
|
TestErrPrintf("Field c data doesn't match, cf[%d].b[%d]=%f, cfr[%d].b[%d]=%f\n", (int)i,
|
|
(int)j, (double)cf[i].c[j], (int)i, (int)j, (double)cfr[i].c[j]);
|
|
continue;
|
|
} /* end if */
|
|
} /* end for */
|
|
} /* end for */
|
|
|
|
status = H5Dclose(dataset);
|
|
CHECK(status, FAIL, "H5Dclose");
|
|
|
|
status = H5Tclose(type);
|
|
CHECK(status, FAIL, "H5Tclose");
|
|
|
|
status = H5Fclose(fid);
|
|
CHECK(status, FAIL, "H5Fclose");
|
|
|
|
HDfree(dtsinfo);
|
|
} /* end test_array_bkg() */
|
|
|
|
/*-------------------------------------------------------------------------
|
|
* Function: test_compat
|
|
*
|
|
* Purpose: Test array datatype compatibility code.
|
|
*
|
|
* Reads file containing old version of datatype object header
|
|
* messages for compound datatypes and verifies reading the older
|
|
* version of the is working correctly.
|
|
*
|
|
* Return: void
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
static void
|
|
test_compat(void)
|
|
{
|
|
const char *testfile = H5_get_srcdir_filename(TESTFILE); /* Corrected test file name */
|
|
hid_t fid1; /* HDF5 File IDs */
|
|
hid_t dataset; /* Dataset ID */
|
|
hid_t tid1; /* Array Datatype ID */
|
|
hid_t tid2; /* Datatype ID */
|
|
hsize_t tdims1[] = {ARRAY1_DIM1};
|
|
int ndims; /* Array rank for reading */
|
|
hsize_t rdims1[H5S_MAX_RANK]; /* Array dimensions for reading */
|
|
H5T_class_t mclass; /* Datatype class for VL */
|
|
int nmemb; /* Number of compound members */
|
|
char * mname; /* Name of compound field */
|
|
size_t off; /* Offset of compound field */
|
|
hid_t mtid; /* Datatype ID for field */
|
|
int i; /* Index variables */
|
|
herr_t ret; /* Generic return value */
|
|
|
|
/* Output message about test being performed */
|
|
MESSAGE(5, ("Testing Array Datatypes Compatibility Functionality\n"));
|
|
|
|
/*
|
|
* Try reading a file that has been prepared that has datasets with
|
|
* compound datatypes which use an older version (version 1) of the
|
|
* datatype object header message for describing the datatype.
|
|
*
|
|
* If this test fails and the datatype object header message version has
|
|
* changed, follow the instructions in gen_old_array.c for regenerating
|
|
* the tarrold.h5 file.
|
|
*/
|
|
|
|
/* Open the testfile */
|
|
fid1 = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT);
|
|
CHECK_I(fid1, "H5Fopen");
|
|
|
|
/* Only try to proceed if the file is around */
|
|
if (fid1 >= 0) {
|
|
/* Open the first dataset (with no array fields) */
|
|
dataset = H5Dopen2(fid1, "Dataset1", H5P_DEFAULT);
|
|
CHECK_I(dataset, "H5Dopen2");
|
|
|
|
/* Get the datatype */
|
|
tid1 = H5Dget_type(dataset);
|
|
CHECK_I(tid1, "H5Dget_type");
|
|
|
|
/* Verify datatype class */
|
|
mclass = H5Tget_class(tid1);
|
|
VERIFY(mclass, H5T_COMPOUND, "H5Tget_class");
|
|
|
|
/* Get the number of compound datatype fields */
|
|
nmemb = H5Tget_nmembers(tid1);
|
|
VERIFY(nmemb, 3, "H5Tget_nmembers");
|
|
|
|
/* Check the 1st field's name */
|
|
mname = H5Tget_member_name(tid1, 0);
|
|
CHECK_PTR(mname, "H5Tget_member_name");
|
|
if (HDstrcmp(mname, "i") != 0)
|
|
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
|
|
H5free_memory(mname);
|
|
|
|
/* Check the 1st field's offset */
|
|
off = H5Tget_member_offset(tid1, 0);
|
|
VERIFY(off, 0, "H5Tget_member_offset");
|
|
|
|
/* Check the 1st field's datatype */
|
|
mtid = H5Tget_member_type(tid1, 0);
|
|
CHECK(mtid, FAIL, "H5Tget_member_type");
|
|
if ((ret = H5Tequal(mtid, H5T_STD_I16LE)) <= 0)
|
|
TestErrPrintf("Compound data type is incorrect!, ret=%d\n", (int)ret);
|
|
ret = H5Tclose(mtid);
|
|
CHECK(mtid, FAIL, "H5Tclose");
|
|
|
|
/* Check the 2nd field's name */
|
|
mname = H5Tget_member_name(tid1, 1);
|
|
CHECK_PTR(mname, "H5Tget_member_name");
|
|
if (HDstrcmp(mname, "f") != 0)
|
|
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
|
|
H5free_memory(mname);
|
|
|
|
/* Check the 2nd field's offset */
|
|
off = H5Tget_member_offset(tid1, 1);
|
|
VERIFY(off, 4, "H5Tget_member_offset");
|
|
|
|
/* Check the 2nd field's datatype */
|
|
mtid = H5Tget_member_type(tid1, 1);
|
|
CHECK(mtid, FAIL, "H5Tget_member_type");
|
|
if ((ret = H5Tequal(mtid, H5T_IEEE_F32LE)) <= 0)
|
|
TestErrPrintf("Compound data type is incorrect!, ret=%d\n", (int)ret);
|
|
ret = H5Tclose(mtid);
|
|
CHECK(mtid, FAIL, "H5Tclose");
|
|
|
|
/* Check the 3rd field's name */
|
|
mname = H5Tget_member_name(tid1, 2);
|
|
CHECK_PTR(mname, "H5Tget_member_name");
|
|
if (HDstrcmp(mname, "l") != 0)
|
|
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
|
|
H5free_memory(mname);
|
|
|
|
/* Check the 3rd field's offset */
|
|
off = H5Tget_member_offset(tid1, 2);
|
|
VERIFY(off, 8, "H5Tget_member_offset");
|
|
|
|
/* Check the 3rd field's datatype */
|
|
mtid = H5Tget_member_type(tid1, 2);
|
|
CHECK(mtid, FAIL, "H5Tget_member_type");
|
|
if ((ret = H5Tequal(mtid, H5T_STD_I32LE)) <= 0)
|
|
TestErrPrintf("Compound data type is incorrect!, ret=%d\n", (int)ret);
|
|
ret = H5Tclose(mtid);
|
|
CHECK(mtid, FAIL, "H5Tclose");
|
|
|
|
/* Close the datatype */
|
|
ret = H5Tclose(tid1);
|
|
CHECK_I(ret, "H5Tclose");
|
|
|
|
/* Close the dataset */
|
|
ret = H5Dclose(dataset);
|
|
CHECK_I(ret, "H5Dclose");
|
|
|
|
/* Open the second dataset (with array fields) */
|
|
dataset = H5Dopen2(fid1, "Dataset2", H5P_DEFAULT);
|
|
CHECK_I(dataset, "H5Dopen2");
|
|
|
|
/* Get the datatype */
|
|
tid1 = H5Dget_type(dataset);
|
|
CHECK_I(tid1, "H5Dget_type");
|
|
|
|
/* Verify datatype class */
|
|
mclass = H5Tget_class(tid1);
|
|
VERIFY(mclass, H5T_COMPOUND, "H5Tget_class");
|
|
|
|
/* Get the number of compound datatype fields */
|
|
nmemb = H5Tget_nmembers(tid1);
|
|
VERIFY(nmemb, 4, "H5Tget_nmembers");
|
|
|
|
/* Check the 1st field's name */
|
|
mname = H5Tget_member_name(tid1, 0);
|
|
CHECK_PTR(mname, "H5Tget_member_name");
|
|
if (mname && HDstrcmp(mname, "i") != 0)
|
|
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
|
|
if (mname)
|
|
H5free_memory(mname);
|
|
|
|
/* Check the 1st field's offset */
|
|
off = H5Tget_member_offset(tid1, 0);
|
|
VERIFY(off, 0, "H5Tget_member_offset");
|
|
|
|
/* Check the 1st field's datatype */
|
|
mtid = H5Tget_member_type(tid1, 0);
|
|
CHECK(mtid, FAIL, "H5Tget_member_type");
|
|
if ((ret = H5Tequal(mtid, H5T_STD_I16LE)) <= 0)
|
|
TestErrPrintf("Compound data type is incorrect!, ret=%d\n", (int)ret);
|
|
ret = H5Tclose(mtid);
|
|
CHECK(mtid, FAIL, "H5Tclose");
|
|
|
|
/* Check the 2nd field's name */
|
|
mname = H5Tget_member_name(tid1, 1);
|
|
CHECK_PTR(mname, "H5Tget_member_name");
|
|
if (mname && HDstrcmp(mname, "f") != 0)
|
|
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
|
|
if (mname)
|
|
H5free_memory(mname);
|
|
|
|
/* Check the 2nd field's offset */
|
|
off = H5Tget_member_offset(tid1, 1);
|
|
VERIFY(off, 4, "H5Tget_member_offset");
|
|
|
|
/* Check the 2nd field's datatype */
|
|
mtid = H5Tget_member_type(tid1, 1);
|
|
CHECK(mtid, FAIL, "H5Tget_member_type");
|
|
|
|
/* Verify datatype class */
|
|
mclass = H5Tget_class(mtid);
|
|
VERIFY(mclass, H5T_ARRAY, "H5Tget_class");
|
|
|
|
/* Check the array rank */
|
|
ndims = H5Tget_array_ndims(mtid);
|
|
VERIFY(ndims, ARRAY1_RANK, "H5Tget_array_ndims");
|
|
|
|
/* Get the array dimensions */
|
|
ret = H5Tget_array_dims2(mtid, rdims1);
|
|
CHECK(ret, FAIL, "H5Tget_array_dims2");
|
|
|
|
/* Check the array dimensions */
|
|
for (i = 0; i < ndims; i++)
|
|
if (rdims1[i] != tdims1[i]) {
|
|
TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE
|
|
", tdims1[%d]=%" PRIuHSIZE "\n",
|
|
i, rdims1[i], i, tdims1[i]);
|
|
continue;
|
|
} /* end if */
|
|
|
|
/* Check the array's base datatype */
|
|
tid2 = H5Tget_super(mtid);
|
|
CHECK(tid2, FAIL, "H5Tget_super");
|
|
|
|
if ((ret = H5Tequal(tid2, H5T_IEEE_F32LE)) <= 0)
|
|
TestErrPrintf("Compound data type is incorrect!, ret=%d\n", (int)ret);
|
|
ret = H5Tclose(tid2);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
ret = H5Tclose(mtid);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Check the 3rd field's name */
|
|
mname = H5Tget_member_name(tid1, 2);
|
|
CHECK_PTR(mname, "H5Tget_member_name");
|
|
if (mname && HDstrcmp(mname, "l") != 0)
|
|
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
|
|
if (mname)
|
|
H5free_memory(mname);
|
|
|
|
/* Check the 3rd field's offset */
|
|
off = H5Tget_member_offset(tid1, 2);
|
|
VERIFY(off, 20, "H5Tget_member_offset");
|
|
|
|
/* Check the 3rd field's datatype */
|
|
mtid = H5Tget_member_type(tid1, 2);
|
|
CHECK(mtid, FAIL, "H5Tget_member_type");
|
|
|
|
/* Verify datatype class */
|
|
mclass = H5Tget_class(mtid);
|
|
VERIFY(mclass, H5T_ARRAY, "H5Tget_class");
|
|
|
|
/* Check the array rank */
|
|
ndims = H5Tget_array_ndims(mtid);
|
|
VERIFY(ndims, ARRAY1_RANK, "H5Tget_array_ndims");
|
|
|
|
/* Get the array dimensions */
|
|
ret = H5Tget_array_dims2(mtid, rdims1);
|
|
CHECK(ret, FAIL, "H5Tget_array_dims2");
|
|
|
|
/* Check the array dimensions */
|
|
for (i = 0; i < ndims; i++)
|
|
if (rdims1[i] != tdims1[i]) {
|
|
TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%" PRIuHSIZE
|
|
", tdims1[%d]=%" PRIuHSIZE "\n",
|
|
i, rdims1[i], i, tdims1[i]);
|
|
continue;
|
|
} /* end if */
|
|
|
|
/* Check the array's base datatype */
|
|
tid2 = H5Tget_super(mtid);
|
|
CHECK(tid2, FAIL, "H5Tget_super");
|
|
|
|
if ((ret = H5Tequal(tid2, H5T_STD_I32LE)) <= 0)
|
|
TestErrPrintf("Compound data type is incorrect!, ret=%d\n", (int)ret);
|
|
ret = H5Tclose(tid2);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
ret = H5Tclose(mtid);
|
|
CHECK(ret, FAIL, "H5Tclose");
|
|
|
|
/* Check the 4th field's name */
|
|
mname = H5Tget_member_name(tid1, 3);
|
|
CHECK_PTR(mname, "H5Tget_member_name");
|
|
if (mname && HDstrcmp(mname, "d") != 0)
|
|
TestErrPrintf("Compound field name doesn't match!, mname=%s\n", mname);
|
|
if (mname)
|
|
H5free_memory(mname);
|
|
|
|
/* Check the 4th field's offset */
|
|
off = H5Tget_member_offset(tid1, 3);
|
|
VERIFY(off, 36, "H5Tget_member_offset");
|
|
|
|
/* Check the 4th field's datatype */
|
|
mtid = H5Tget_member_type(tid1, 3);
|
|
CHECK(mtid, FAIL, "H5Tget_member_type");
|
|
if ((ret = H5Tequal(mtid, H5T_IEEE_F64LE)) <= 0)
|
|
TestErrPrintf("Compound data type is incorrect!, ret=%d\n", (int)ret);
|
|
ret = H5Tclose(mtid);
|
|
CHECK(mtid, FAIL, "H5Tclose");
|
|
|
|
/* Close the datatype */
|
|
ret = H5Tclose(tid1);
|
|
CHECK_I(ret, "H5Tclose");
|
|
|
|
/* Close the dataset */
|
|
ret = H5Dclose(dataset);
|
|
CHECK_I(ret, "H5Dclose");
|
|
|
|
/* Close the file */
|
|
ret = H5Fclose(fid1);
|
|
CHECK_I(ret, "H5Fclose");
|
|
} /* end if */
|
|
else
|
|
HDprintf("***cannot open the pre-created compound datatype test file (%s)\n", testfile);
|
|
|
|
} /* end test_compat() */
|
|
|
|
/*-------------------------------------------------------------------------
|
|
* Function: test_array
|
|
*
|
|
* Purpose: Main array datatype testing routine.
|
|
*
|
|
* Return: void
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
void
|
|
test_array(void)
|
|
{
|
|
/* Output message about test being performed */
|
|
MESSAGE(5, ("Testing Array Datatypes\n"));
|
|
|
|
/* These tests use the same file... */
|
|
test_array_atomic_1d(); /* Test 1-D array of atomic datatypes */
|
|
test_array_atomic_3d(); /* Test 3-D array of atomic datatypes */
|
|
test_array_array_atomic(); /* Test 1-D array of 2-D arrays of atomic datatypes */
|
|
test_array_compound_atomic(); /* Test 1-D array of compound datatypes (with no array fields) */
|
|
test_array_compound_array(); /* Test 1-D array of compound datatypes (with array fields) */
|
|
test_array_vlen_atomic(); /* Test 1-D array of atomic VL datatypes */
|
|
test_array_vlen_array(); /* Test 1-D array of 1-D array VL datatypes */
|
|
test_array_funcs(); /* Test type functions with array types */
|
|
|
|
test_array_bkg(); /* Read compound datatype with array fields and background fields read */
|
|
|
|
/* This test uses a custom file */
|
|
test_compat(); /* Test compatibility changes for compound datatype fields */
|
|
|
|
} /* end test_array() */
|
|
|
|
/*-------------------------------------------------------------------------
|
|
* Function: cleanup_array
|
|
*
|
|
* Purpose: Cleanup temporary test files
|
|
*
|
|
* Return: void
|
|
*
|
|
* Programmer: Quincey Koziol
|
|
* June 8, 1999
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
void
|
|
cleanup_array(void)
|
|
{
|
|
HDremove(FILENAME);
|
|
} /* end cleanup_array() */
|