From 1a114c191d6366558202522df96c2726c0512cc0 Mon Sep 17 00:00:00 2001 From: lrknox Date: Tue, 28 Mar 2017 10:06:18 -0500 Subject: Clear hdf5 1.10 entries from RELEASE.txt in the develop branch. Entries in this branch version of RELEASE.txt should be intended for the future 1.12.0 release. --- release_docs/RELEASE.txt | 359 ++++------------------------------------------- 1 file changed, 27 insertions(+), 332 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 22accd3..d2e73e0 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -4,8 +4,8 @@ HDF5 version 1.11.0 currently under development INTRODUCTION -This document describes the differences between HDF5-1.10.0-patch1 and -HDF5 1.10.1, and contains information on the platforms tested and known problems in HDF5-1.10.1. +This document describes the differences between HDF5-1.11.x and +HDF5 1.10.1, and contains information on the platforms tested and known problems in HDF5-1.11.x. For more details check the HISTORY*.txt files in the HDF5 source. @@ -28,8 +28,8 @@ in 1.10.1?" document: https://support.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew1101.html All new and modified APIs are listed in detail in the "HDF5 Software Changes -from Release to Release" document, in the section "Release 1.8.19 (current -release) versus Release 1.10.1 +from Release to Release" document, in the section "Release 1.10.1 (current +release) versus Release 1.11.x https://support.hdfgroup.org/HDF5/doc1.10/ADGuide/Changes.html @@ -42,7 +42,7 @@ CONTENTS - New Features - Support for new platforms and languages -- Bug Fixes since HDF5-1.10.0-patch1 +- Bug Fixes since HDF5-1.10.1 - Supported Platforms - Tested Configuration Features Summary - More Tested Platforms @@ -54,33 +54,11 @@ New Features Configuration: ------------- - - CMake minimum is now 3.2.2. - (ADB 2017/01/10) - - - Tools folder is separated into source and test folders. This - allows autotools to skip the make command and just execute - the make check command. - (HDFFV-9719 ADB 2016/10/27) + - Library: -------- - - Paged Aggregation - - This is one of the file space management strategies. This strategy - aggregates small metadata and raw data allocations into constant-sized - well-aligned pages, which are suitable for page caching. Paged - aggregation together with the page buffering feature will allow efficient - I/O accesses. - - - Page Buffering - - The page buffering layer in the HDF5 library absorbs small accesses to - the file system. Each page in memory corresponds to a page allocated in - the file. Access to the file system is then performed as a single page - or multiple of pages, if they are contiguous. This ensures that small - accesses to the file system are avoided while providing another caching - layer for improved I/O performance. This feature works in conjunction - with the paged aggregation feature. + - Parallel Library: ----------------- @@ -96,13 +74,11 @@ New Features Tools: ------ - - Add options to h5clear: - -s: clear the status_flags field in the file's superblock - -m: Remove the metadata cache image from the file - (Pull Request #361 QK 2017/03/22) + - High-Level APIs: --------------- + - C Packet Table API ------------------ @@ -119,44 +95,16 @@ Support for new platforms, languages and compilers. ======================================= - -Bug Fixes since HDF5-1.10.0-patch1 release +Bug Fixes since HDF5-1.10.1 release ================================== Library ------- - - Changed the plugins dlopen option from RTLD_NOW to RTLD_LAZY - (PR 201 ADB 2016/12/12) - - - Fix error when copying dataset with attribute which is a compound datatype - consisting of a variable length string. - (HDFFV-7991 VC 2016/08/19, 2016/08/21, 2016/08/24) - - - H5DOappend will not fail if a dataset has no append callback registered. - (HDFFV-9960 VC 2016/08/05, 2016/08/14) - - - Fix the problem where the committed datatype's file location is different - from the file location of an attribute with that committed datatype. - (HDFFV-9940 VC 2016/07/03, 2016/07/06) - - - (a) Throw an error instead of assertion when v1 btree level hits the 1 byte limit. - (b) Modifications to better handle error recovery when conversion by - h5format_convert fails. - (HDFFV-9434 VC 2016/05/29) + - Configuration ------------- - - Configuration will check for the strtoll and strtoull functions - before using alternatives - (PR 340 ADB 2017/03/17) - - - CMake uses a Windows pdb directory variable if available and - will generate both static and shared pdb files. - (HDFFV-9875 ADB 2017/02/06) - - - CMake now builds shared versions of tools. - (HDFFV-10123 ADB 2017/02/01) - - Performance + - ------------- - @@ -166,11 +114,7 @@ Bug Fixes since HDF5-1.10.0-patch1 release Tools ----- - - h5diff correctly ignores strpad in comparing strings. - (HDFFV-10128 ADB 2017/03/03) - - - h5repack now correctly parses the command line filter options. - (HDFFV-10046 ADB 2017/01/24) + - High-Level APIs: ------ @@ -201,18 +145,6 @@ Bug Fixes since HDF5-1.10.0-patch1 release Supported Platforms =================== - Linux 2.6.32-573.22.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) - #1 SMP x86_64 GNU/Linux compilers: - (mayll/platypus) Version 4.4.7 20120313 - Version 4.8.4 - PGI C, Fortran, C++ for 64-bit target on - x86-64; - Version 16.10-0 - Intel(R) C (icc), C++ (icpc), Fortran (icc) - compilers: - Version 15.0.3.187 (Build 20150407) - MPICH 3.1.4 compiled with GCC 4.9.3 - Linux 2.6.32-573.18.1.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) @@ -291,9 +223,7 @@ Mac OS X Mountain Lion 10.8.5 64-bit n y/y n y y y Mac OS X Mavericks 10.9.5 64-bit n y/y n y y ? Mac OS X Yosemite 10.10.5 64-bit n y/y n y y ? Mac OS X El Capitan 10.11.6 64-bit n y/y n y y ? -CentOS 6.7 Linux 2.6.18 x86_64 GNU n y/y n y y y -CentOS 6.7 Linux 2.6.18 x86_64 Intel n y/y n y y y -CentOS 6.7 Linux 2.6.32 x86_64 PGI n y/y n y y y +CentOS 7.2 Linux 2.6.32 x86_64 PGI n y/y n y y y CentOS 7.2 Linux 2.6.32 x86_64 GNU y y/y y y y y CentOS 7.2 Linux 2.6.32 x86_64 Intel n y/y n y y y Linux 2.6.32-573.18.1.el6.ppc64 n y/n n y y y @@ -313,9 +243,7 @@ Mac OS X Mountain Lion 10.8.5 64-bit y n y y Mac OS X Mavericks 10.9.5 64-bit y n y y Mac OS X Yosemite 10.10.5 64-bit y n y y Mac OS X El Capitan 10.11.6 64-bit y n y y -CentOS 6.7 Linux 2.6.18 x86_64 GNU y y y y -CentOS 6.7 Linux 2.6.18 x86_64 Intel y y y n -CentOS 6.7 Linux 2.6.32 x86_64 PGI y y y n +CentOS 7.2 Linux 2.6.32 x86_64 PGI y y y n CentOS 7.2 Linux 2.6.32 x86_64 GNU y y y n CentOS 7.2 Linux 2.6.32 x86_64 Intel y y y n Linux 2.6.32-573.18.1.el6.ppc64 y y y n @@ -328,6 +256,18 @@ More Tested Platforms ===================== The following platforms are not supported but have been tested for this release. + Linux 2.6.32-573.22.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (mayll/platypus) Version 4.4.7 20120313 + Version 4.8.4 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 16.10-0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 15.0.3.187 (Build 20150407) + MPICH 3.1.4 compiled with GCC 4.9.3 + Linux 2.6.32-573.18.1.el6.ppc64 MPICH mpich 3.1.4 compiled with #1 SMP ppc64 GNU/Linux IBM XL C/C++ for Linux, V13.1 (ostrich) and IBM XL Fortran for Linux, V15.1 @@ -350,249 +290,4 @@ The following platforms are not supported but have been tested for this release. Known Problems ============== -* "make check" fails on CYGWIN when building shared lib files is enabled. The - default on Cygwin has been changed to disable shared. It can be enabled with - the --enable-shared configure option but is likely to fail "make check" - with GCC compilers. (LK -2015/04/16) - -* CLANG compiler with the options -fcatch-undefined-behavior and -ftrapv - catches some undefined behavior in the alignment algorithm of the macro DETECT_I - in H5detect.c (Issue 8147). Since the algorithm is trying to detect the alignment - of integers, ideally the flag -fcatch-undefined-behavior shouldn't to be used for - H5detect.c. In the future, we can separate flags for H5detect.c from the rest of - the library. (SLU - 2013/10/16) - -* The 5.9 C++ compiler on Sun failed to compile a C++ test ttypes.cpp. It - complains with this message: - "/home/hdf5/src/H5Vprivate.h", line 130: Error: __func__ is not defined. - - The reason is that __func__ is a predefined identifier in C99 standard. The - HDF5 C library uses it in H5private.h. The test ttypes.cpp includes - H5private.h (H5Tpkg.h<-H5Fprivate.h<-H5Vprivate.h<-H5private.h). Sun's 5.9 - C++ compiler doesn't support __func__, thus fails to compile the C++ test. - But 5.11 C++ compiler does. To check whether your Sun C++ compiler knows this - identifier, try to compile the following simple C++ program: - #include - - int main(void) - { - printf("%s\n", __func__); - return 0; - } - (SLU - 2012/11/5) - -* The C++ and FORTRAN bindings are not currently working on FreeBSD with the - native release 8.2 compilers (4.2.1), but are working with gcc 4.6 from the - ports (and probably gcc releases after that). - (QAK - 2012/10/19) - -* The data conversion test dt_arith.c has failures (segmentation fault) from - "long double" to other datatypes during hard conversion when the library - is built with the default GCC 4.2.1 on Mac Lion system. It only happens - with optimization (-O3, -O2, and -O1). Some newer versions of GCC do not - have this problem. Users should disable optimization or try newer version - of GCC. (Issue 8017. SLU - 2012/6/12) - -* The data conversion test dt_arith.c fails in "long double" to integer - conversion on Ubuntu 11.10 (3.0.0.13 kernal) with GCC 4.6.1 if the library - is built with optimization -O3 or -O2. The older GCC (4.5) or newer kernal - (3.2.2 on Fedora) doesn't have the problem. Users should lower down the - optimization level (-O1 or -O0) by defining CFLAGS in the command line of - "configure" like: - - CFLAGS=-O1 ./configure - - It will overwrite the library's default optimization level. (Issue 7829. - SLU - 2012/2/7) - -* --with-mpe configure option does not work with Mpich2. AKC - 2011/03/10) - -* While working on the 1.8.6 release of HDF5, a bug was discovered that can - occur when reading from a dataset in parallel shortly after it has been - written to collectively. The issue was exposed by a new test in the parallel - HDF5 test suite, but had existed before that. We believe the problem lies with - certain MPI implementations and/or filesystems. - - We have provided a pure MPI test program, as well as a standalone HDF5 - program, that can be used to determine if this is an issue on your system. - They should be run across multiple nodes with a varying number of processes. - These programs can be found at: - http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/ - -* Parallel mode in AIX will fail some of the testcheck_version.sh tests where - it treats "exit(134) the same as if process 0 had received an abort signal. - This is fixed and will be available in the next release. AKC - 2009/11/3 - -* The PathScale MPI implementation, accessing a Panasas file system, would - cause H5Fcreate() with H5F_ACC_EXCL to fail even when the file is not - existing. This is due to the MPI_File_open() call failing if the amode has - the MPI_MODE_EXCL bit set. (See bug 1468 for details.) AKC - 2009/8/11 - -* Parallel tests failed with 16 processes with data inconsistency at testphdf5 - / dataset_readAll. Parallel tests also failed with 32 and 64 processes with - collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks - with MPI IO. (CMC - 2009/04/28) - -* For SNL, spirit/liberty/thunderbird: The serial tests pass but parallel - tests failed with MPI-IO file locking message. AKC - 2007/6/25. -* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers use - -mp -O1 compilation flags to build the libraries. Higher level of optimization - causes failures in several HDF5 library tests. -* For HPUX 11.23 many tools tests failed for 64-bit version when linked to the - shared libraries (tested for 1.8.0-beta2) -* For SNL, Red Storm: only paralle HDF5 is supported. The serial tests pass - and the parallel tests also pass with lots of non-fatal error messages. -* on SUN 5.10 C++ test fails in the "Testing Shared Datatypes with Attributes" test -* configuring with --enable-debug=all produces compiler errors on most - platforms. Users who want to run HDF5 in debug mode should use - --enable-debug rather than --enable-debug=all to enable debugging - information on most modules. -* On Mac OS 10.4, test/dt_arith.c has some errors in conversion from long - double to (unsigned) long long and from (unsigned)long long to long double. -* On Altix SGI with Intel 9.0 testmeta.c would not compile with -O3 - optimization flag. -* On VAX, Scaleoffset filter isn't supported. The filter cannot be applied to - HDF5 data generated on VAX. Scaleoffset filter only supports IEEE standard - for floating-point data. -* On Cray X1, a lone colon on the command line of h5dump --xml (as in - the testh5dumpxml.sh script) is misinterpereted by the operating system - and causes an error. -* On mpich 1.2.5 and 1.2.6, we found that if more than two processes - contribute no IO and the application asks to do IO with collective, we found - that when using 4 processors, a simple collective write will be hung - sometimes. This can be verified with t_mpi test under testpar. -* The dataset created or rewritten with the v1.6.3 library or after can't - be read with the v1.6.2 library or before when Fletcher32 EDC(filter) is - enabled. There was a bug in the calculating code of the Fletcher32 - checksum in the library before v1.6.3. The checksum value wasn't consistent - between big-endian and little-endian systems. This bug was fixed in - Release 1.6.3. However, after fixing the bug, the checksum value is no - longer the same as before on little-endian system. The library release - after 1.6.4 can still read the dataset created or rewritten with the library - of v1.6.2 or before. SLU - 2005/6/30 -* For the version 6(6.02 and 6.04) of Portland Group compiler on AMD Opteron - processor, there's a bug in the compiler for optimization(-O2). The library - failed in several tests but all related to multi driver. The problem has - been reported to the vendor. -* On IBM AIX systems, parallel HDF5 mode will fail some tests with error - messages like "INFO: 0031-XXX ...". This is from the command poe. - Set the environment variable MP_INFOLEVEL to 0 to minimize the messages - and run the tests again. - The tests may fail with messages like "The socket name is already - in use". HDF5 does not use sockets (except for stream-VFD). This is - due to problems of the poe command trying to set up the debug socket. - Check if there are many old /tmp/s.pedb.* staying around. These are - sockets used by the poe command and left behind due to failed commands. - Ask your system administrator to clean them out. Lastly, request IBM - to provide a mean to run poe without the debug socket. - -* The C++ library's tests fails when compiling with PGI C++ compiler. The - workaround until the problem is correctly handled is to use the - flag "--instantiate=local" prior to the configure and build steps, as: - setenv CXX "pgCC --instantiate=local" for pgCC 5.02 and higher - - -* The stream-vfd test uses ip port 10007 for testing. If another - application is already using that port address, the test will hang - indefinitely and has to be terminated by the kill command. To try the - test again, change the port address in test/stream_test.c to one not - being used in the host. - -* The --enable-static-exec configure flag will only statically link libraries - if the static version of that library is present. If only the shared version - of a library exists (i.e., most system libraries on Solaris, AIX, and Mac, - for example, only have shared versions), the flag should still result in a - successful compilation, but note that the installed executables will not be - fully static. Thus, the only guarantee on these systems is that the - executable is statically linked with just the HDF5 library. - -* With the gcc 2.95.2 compiler, HDF 5 uses the `-ansi' flag during - compilation. The ANSI version of the compiler complains about not being - able to handle the `long long' datatype with the warning: - - warning: ANSI C does not support `long long' - - This warning is innocuous and can be safely ignored. - -* Certain platforms give false negatives when testing h5ls: - - Cray J90 and Cray T90IEEE give errors during testing when displaying - some floating-point values. These are benign differences due to - the different precision in the values displayed and h5ls appears to - be dumping floating-point numbers correctly. - -* Not all platforms behave correctly with szip's shared libraries. Szip is - disabled in these cases, and a message is relayed at configure time. Static - libraries should be working on all systems that support szip, and should be - used when shared libraries are unavailable. There is also a configure error - on Altix machines that incorrectly reports when a version of szip without - an encoder is being used. - -* On some platforms that use Intel and Absoft compilers to build HDF5 fortran library, - compilation may fail for fortranlib_test.f90, fflush1.f90 and fflush2.f90 - complaining about exit subroutine. Comment out the line - IF (total_error .ne. 0) CALL exit (total_error) - -* Information about building with PGI and Intel compilers is available in - INSTALL file sections 5.7 and 5.8 - -* On at least one system, (SDSC DataStar), the scheduler (in this case - LoadLeveler) sends job status updates to standard error when you run - any executable that was compiled with the parallel compilers. - - This causes problems when running "make check" on parallel builds, as - many of the tool tests function by saving the output from test runs, - and comparing it to an exemplar. - - The best solution is to reconfigure the target system so it no longer - inserts the extra text. However, this may not be practical. - - In such cases, one solution is to "setenv HDF5_Make_Ignore yes" prior to - the configure and build. This will cause "make check" to continue after - detecting errors in the tool tests. However, in the case of SDSC DataStar, - it also leaves you with some 150 "failed" tests to examine by hand. - - A second solution is to write a script to run serial tests and filter - out the text added by the scheduler. A sample script used on SDSC - DataStar is given below, but you will probably have to customize it - for your installation. - - Observe that the basic idea is to insert the script as the first item - on the command line which executes the the test. The script then - executes the test and filters out the offending text before passing - it on. - - #!/bin/csh - - set STDOUT_FILE=~/bin/serial_filter.stdout - set STDERR_FILE=~/bin/serial_filter.stderr - - rm -f $STDOUT_FILE $STDERR_FILE - - ($* > $STDOUT_FILE) >& $STDERR_FILE - - set RETURN_VALUE=$status - - cat $STDOUT_FILE - - tail +3 $STDERR_FILE - - exit $RETURN_VALUE - - You get the HDF make files and test scipts to execute your filter script - by setting the environment variable "RUNSERIAL" to the full path of the - script prior to running configure for parallel builds. Remember to - "unsetenv RUNSERIAL" before running configure for a serial build. - - Note that the RUNSERIAL environment variable exists so that we can - can prefix serial runs as necessary on the target system. On DataStar, - no prefix is necessary. However on an MPICH system, the prefix might - have to be set to something like "/usr/local/mpi/bin/mpirun -np 1" to - get the serial tests to run at all. - - In such cases, you will have to include the regular prefix in your - filter script. - -* H5Ocopy() does not copy reg_ref attributes correctly when shared-message - is turn on. The value of the reference in the destination attriubte is - wrong. This H5Ocopy problem will affect h5copy tool -- cgit v0.12 From ef297238bd51d4a7fa530172a547952207c4902d Mon Sep 17 00:00:00 2001 From: lrknox Date: Wed, 29 Mar 2017 13:36:52 -0500 Subject: Add LBNL license file and modify COPYING file accordingly. --- COPYING | 15 +++++++++++---- COPYING_LBNL_HDF5 | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 4 deletions(-) create mode 100644 COPYING_LBNL_HDF5 diff --git a/COPYING b/COPYING index 2166ced..51cb4e6 100644 --- a/COPYING +++ b/COPYING @@ -1,13 +1,12 @@ - Copyright Notice and License Terms for HDF5 (Hierarchical Data Format 5) Software Library and Utilities ----------------------------------------------------------------------------- HDF5 (Hierarchical Data Format 5) Software Library and Utilities -Copyright 2006-2016 by The HDF Group. +Copyright (c) 2006, The HDF Group. NCSA HDF5 (Hierarchical Data Format 5) Software Library and Utilities -Copyright 1998-2006 by the Board of Trustees of the University of Illinois. +Copyright (c) 1998-2006, The Board of Trustees of the University of Illinois. All rights reserved. @@ -47,13 +46,21 @@ advised of the possibility of such damage. ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- +Limited portions of HDF5 were developed by Lawrence Berkeley National +Laboratory (LBNL). LBNL's Copyright Notice and Licensing Terms can be +found here: COPYING_LBNL_HDF5 file in this directory or at +http://support.hdfgroup.org/ftp/HDF5/releases/COPYING_LBNL_HDF5. + +----------------------------------------------------------------------------- +----------------------------------------------------------------------------- + Contributors: National Center for Supercomputing Applications (NCSA) at the University of Illinois, Fortner Software, Unidata Program Center (netCDF), The Independent JPEG Group (JPEG), Jean-loup Gailly and Mark Adler (gzip), and Digital Equipment Corporation (DEC). ----------------------------------------------------------------------------- - + Portions of HDF5 were developed with support from the Lawrence Berkeley National Laboratory (LBNL) and the United States Department of Energy under Prime Contract No. DE-AC02-05CH11231. diff --git a/COPYING_LBNL_HDF5 b/COPYING_LBNL_HDF5 new file mode 100644 index 0000000..16fba5d --- /dev/null +++ b/COPYING_LBNL_HDF5 @@ -0,0 +1,49 @@ +Copyright Notice and License Terms for +HDF5 (Hierarchical Data Format 5) Software Library and Utilities +----------------------------------------------------------------------------- + +HDF5 (Hierarchical Data Format 5) +Copyright (c) 2016, The Regents of the University of California, through +Lawrence Berkeley National Laboratory (subject to receipt of any required +approvals from the U.S. Dept. of Energy). + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions, and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions, and the following disclaimer in the documentation + and/or materials provided with the distribution. + +3. Neither the name of the University of California, Lawrence Berkeley +National Laboratory, U.S. Dept. of Energy nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. + +You are under no obligation whatsoever to provide any bug fixes, patches, +or upgrades to the features, functionality or performance of the source +code ("Enhancements") to anyone; however, if you choose to make your +Enhancements available either publicly, or directly to Lawrence Berkeley +National Laboratory, without imposing a separate written license agreement +for such Enhancements, then you hereby grant the following license: +a non-exclusive, royalty-free perpetual license to install, use, modify, +prepare derivative works, incorporate into other computer software, +distribute, and sublicense such enhancements or derivative works thereof, +in binary and source code form. + -- cgit v0.12 From c1f95b28caae290a7c0136537daca9004db055b8 Mon Sep 17 00:00:00 2001 From: lrknox Date: Wed, 29 Mar 2017 13:55:41 -0500 Subject: Revert "Clear hdf5 1.10 entries from RELEASE.txt in the develop branch. Entries" This reverts commit 1a114c191d6366558202522df96c2726c0512cc0. --- release_docs/RELEASE.txt | 359 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 332 insertions(+), 27 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index d2e73e0..22accd3 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -4,8 +4,8 @@ HDF5 version 1.11.0 currently under development INTRODUCTION -This document describes the differences between HDF5-1.11.x and -HDF5 1.10.1, and contains information on the platforms tested and known problems in HDF5-1.11.x. +This document describes the differences between HDF5-1.10.0-patch1 and +HDF5 1.10.1, and contains information on the platforms tested and known problems in HDF5-1.10.1. For more details check the HISTORY*.txt files in the HDF5 source. @@ -28,8 +28,8 @@ in 1.10.1?" document: https://support.hdfgroup.org/HDF5/doc/ADGuide/WhatsNew1101.html All new and modified APIs are listed in detail in the "HDF5 Software Changes -from Release to Release" document, in the section "Release 1.10.1 (current -release) versus Release 1.11.x +from Release to Release" document, in the section "Release 1.8.19 (current +release) versus Release 1.10.1 https://support.hdfgroup.org/HDF5/doc1.10/ADGuide/Changes.html @@ -42,7 +42,7 @@ CONTENTS - New Features - Support for new platforms and languages -- Bug Fixes since HDF5-1.10.1 +- Bug Fixes since HDF5-1.10.0-patch1 - Supported Platforms - Tested Configuration Features Summary - More Tested Platforms @@ -54,11 +54,33 @@ New Features Configuration: ------------- - - + - CMake minimum is now 3.2.2. + (ADB 2017/01/10) + + - Tools folder is separated into source and test folders. This + allows autotools to skip the make command and just execute + the make check command. + (HDFFV-9719 ADB 2016/10/27) Library: -------- - - + - Paged Aggregation + + This is one of the file space management strategies. This strategy + aggregates small metadata and raw data allocations into constant-sized + well-aligned pages, which are suitable for page caching. Paged + aggregation together with the page buffering feature will allow efficient + I/O accesses. + + - Page Buffering + + The page buffering layer in the HDF5 library absorbs small accesses to + the file system. Each page in memory corresponds to a page allocated in + the file. Access to the file system is then performed as a single page + or multiple of pages, if they are contiguous. This ensures that small + accesses to the file system are avoided while providing another caching + layer for improved I/O performance. This feature works in conjunction + with the paged aggregation feature. Parallel Library: ----------------- @@ -74,11 +96,13 @@ New Features Tools: ------ - - + - Add options to h5clear: + -s: clear the status_flags field in the file's superblock + -m: Remove the metadata cache image from the file + (Pull Request #361 QK 2017/03/22) High-Level APIs: --------------- - - C Packet Table API ------------------ @@ -95,16 +119,44 @@ Support for new platforms, languages and compilers. ======================================= - -Bug Fixes since HDF5-1.10.1 release +Bug Fixes since HDF5-1.10.0-patch1 release ================================== Library ------- - - + - Changed the plugins dlopen option from RTLD_NOW to RTLD_LAZY + (PR 201 ADB 2016/12/12) + + - Fix error when copying dataset with attribute which is a compound datatype + consisting of a variable length string. + (HDFFV-7991 VC 2016/08/19, 2016/08/21, 2016/08/24) + + - H5DOappend will not fail if a dataset has no append callback registered. + (HDFFV-9960 VC 2016/08/05, 2016/08/14) + + - Fix the problem where the committed datatype's file location is different + from the file location of an attribute with that committed datatype. + (HDFFV-9940 VC 2016/07/03, 2016/07/06) + + - (a) Throw an error instead of assertion when v1 btree level hits the 1 byte limit. + (b) Modifications to better handle error recovery when conversion by + h5format_convert fails. + (HDFFV-9434 VC 2016/05/29) Configuration ------------- - - + - Configuration will check for the strtoll and strtoull functions + before using alternatives + (PR 340 ADB 2017/03/17) + + - CMake uses a Windows pdb directory variable if available and + will generate both static and shared pdb files. + (HDFFV-9875 ADB 2017/02/06) + + - CMake now builds shared versions of tools. + (HDFFV-10123 ADB 2017/02/01) + + Performance ------------- - @@ -114,7 +166,11 @@ Bug Fixes since HDF5-1.10.1 release Tools ----- - - + - h5diff correctly ignores strpad in comparing strings. + (HDFFV-10128 ADB 2017/03/03) + + - h5repack now correctly parses the command line filter options. + (HDFFV-10046 ADB 2017/01/24) High-Level APIs: ------ @@ -145,6 +201,18 @@ Bug Fixes since HDF5-1.10.1 release Supported Platforms =================== + Linux 2.6.32-573.22.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) + #1 SMP x86_64 GNU/Linux compilers: + (mayll/platypus) Version 4.4.7 20120313 + Version 4.8.4 + PGI C, Fortran, C++ for 64-bit target on + x86-64; + Version 16.10-0 + Intel(R) C (icc), C++ (icpc), Fortran (icc) + compilers: + Version 15.0.3.187 (Build 20150407) + MPICH 3.1.4 compiled with GCC 4.9.3 + Linux 2.6.32-573.18.1.el6.ppc64 gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) #1 SMP ppc64 GNU/Linux g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) (ostrich) GNU Fortran (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4) @@ -223,7 +291,9 @@ Mac OS X Mountain Lion 10.8.5 64-bit n y/y n y y y Mac OS X Mavericks 10.9.5 64-bit n y/y n y y ? Mac OS X Yosemite 10.10.5 64-bit n y/y n y y ? Mac OS X El Capitan 10.11.6 64-bit n y/y n y y ? -CentOS 7.2 Linux 2.6.32 x86_64 PGI n y/y n y y y +CentOS 6.7 Linux 2.6.18 x86_64 GNU n y/y n y y y +CentOS 6.7 Linux 2.6.18 x86_64 Intel n y/y n y y y +CentOS 6.7 Linux 2.6.32 x86_64 PGI n y/y n y y y CentOS 7.2 Linux 2.6.32 x86_64 GNU y y/y y y y y CentOS 7.2 Linux 2.6.32 x86_64 Intel n y/y n y y y Linux 2.6.32-573.18.1.el6.ppc64 n y/n n y y y @@ -243,7 +313,9 @@ Mac OS X Mountain Lion 10.8.5 64-bit y n y y Mac OS X Mavericks 10.9.5 64-bit y n y y Mac OS X Yosemite 10.10.5 64-bit y n y y Mac OS X El Capitan 10.11.6 64-bit y n y y -CentOS 7.2 Linux 2.6.32 x86_64 PGI y y y n +CentOS 6.7 Linux 2.6.18 x86_64 GNU y y y y +CentOS 6.7 Linux 2.6.18 x86_64 Intel y y y n +CentOS 6.7 Linux 2.6.32 x86_64 PGI y y y n CentOS 7.2 Linux 2.6.32 x86_64 GNU y y y n CentOS 7.2 Linux 2.6.32 x86_64 Intel y y y n Linux 2.6.32-573.18.1.el6.ppc64 y y y n @@ -256,18 +328,6 @@ More Tested Platforms ===================== The following platforms are not supported but have been tested for this release. - Linux 2.6.32-573.22.1.el6 GNU C (gcc), Fortran (gfortran), C++ (g++) - #1 SMP x86_64 GNU/Linux compilers: - (mayll/platypus) Version 4.4.7 20120313 - Version 4.8.4 - PGI C, Fortran, C++ for 64-bit target on - x86-64; - Version 16.10-0 - Intel(R) C (icc), C++ (icpc), Fortran (icc) - compilers: - Version 15.0.3.187 (Build 20150407) - MPICH 3.1.4 compiled with GCC 4.9.3 - Linux 2.6.32-573.18.1.el6.ppc64 MPICH mpich 3.1.4 compiled with #1 SMP ppc64 GNU/Linux IBM XL C/C++ for Linux, V13.1 (ostrich) and IBM XL Fortran for Linux, V15.1 @@ -290,4 +350,249 @@ The following platforms are not supported but have been tested for this release. Known Problems ============== +* "make check" fails on CYGWIN when building shared lib files is enabled. The + default on Cygwin has been changed to disable shared. It can be enabled with + the --enable-shared configure option but is likely to fail "make check" + with GCC compilers. (LK -2015/04/16) + +* CLANG compiler with the options -fcatch-undefined-behavior and -ftrapv + catches some undefined behavior in the alignment algorithm of the macro DETECT_I + in H5detect.c (Issue 8147). Since the algorithm is trying to detect the alignment + of integers, ideally the flag -fcatch-undefined-behavior shouldn't to be used for + H5detect.c. In the future, we can separate flags for H5detect.c from the rest of + the library. (SLU - 2013/10/16) + +* The 5.9 C++ compiler on Sun failed to compile a C++ test ttypes.cpp. It + complains with this message: + "/home/hdf5/src/H5Vprivate.h", line 130: Error: __func__ is not defined. + + The reason is that __func__ is a predefined identifier in C99 standard. The + HDF5 C library uses it in H5private.h. The test ttypes.cpp includes + H5private.h (H5Tpkg.h<-H5Fprivate.h<-H5Vprivate.h<-H5private.h). Sun's 5.9 + C++ compiler doesn't support __func__, thus fails to compile the C++ test. + But 5.11 C++ compiler does. To check whether your Sun C++ compiler knows this + identifier, try to compile the following simple C++ program: + #include + + int main(void) + { + printf("%s\n", __func__); + return 0; + } + (SLU - 2012/11/5) + +* The C++ and FORTRAN bindings are not currently working on FreeBSD with the + native release 8.2 compilers (4.2.1), but are working with gcc 4.6 from the + ports (and probably gcc releases after that). + (QAK - 2012/10/19) + +* The data conversion test dt_arith.c has failures (segmentation fault) from + "long double" to other datatypes during hard conversion when the library + is built with the default GCC 4.2.1 on Mac Lion system. It only happens + with optimization (-O3, -O2, and -O1). Some newer versions of GCC do not + have this problem. Users should disable optimization or try newer version + of GCC. (Issue 8017. SLU - 2012/6/12) + +* The data conversion test dt_arith.c fails in "long double" to integer + conversion on Ubuntu 11.10 (3.0.0.13 kernal) with GCC 4.6.1 if the library + is built with optimization -O3 or -O2. The older GCC (4.5) or newer kernal + (3.2.2 on Fedora) doesn't have the problem. Users should lower down the + optimization level (-O1 or -O0) by defining CFLAGS in the command line of + "configure" like: + + CFLAGS=-O1 ./configure + + It will overwrite the library's default optimization level. (Issue 7829. + SLU - 2012/2/7) + +* --with-mpe configure option does not work with Mpich2. AKC - 2011/03/10) + +* While working on the 1.8.6 release of HDF5, a bug was discovered that can + occur when reading from a dataset in parallel shortly after it has been + written to collectively. The issue was exposed by a new test in the parallel + HDF5 test suite, but had existed before that. We believe the problem lies with + certain MPI implementations and/or filesystems. + + We have provided a pure MPI test program, as well as a standalone HDF5 + program, that can be used to determine if this is an issue on your system. + They should be run across multiple nodes with a varying number of processes. + These programs can be found at: + http://www.hdfgroup.org/ftp/HDF5/examples/known_problems/ + +* Parallel mode in AIX will fail some of the testcheck_version.sh tests where + it treats "exit(134) the same as if process 0 had received an abort signal. + This is fixed and will be available in the next release. AKC - 2009/11/3 + +* The PathScale MPI implementation, accessing a Panasas file system, would + cause H5Fcreate() with H5F_ACC_EXCL to fail even when the file is not + existing. This is due to the MPI_File_open() call failing if the amode has + the MPI_MODE_EXCL bit set. (See bug 1468 for details.) AKC - 2009/8/11 + +* Parallel tests failed with 16 processes with data inconsistency at testphdf5 + / dataset_readAll. Parallel tests also failed with 32 and 64 processes with + collective abort of all ranks at t_posix_compliant / allwrite_allread_blocks + with MPI IO. (CMC - 2009/04/28) + +* For SNL, spirit/liberty/thunderbird: The serial tests pass but parallel + tests failed with MPI-IO file locking message. AKC - 2007/6/25. +* On Intel 64 Linux cluster (RH 4, Linux 2.6.9) with Intel 10.0 compilers use + -mp -O1 compilation flags to build the libraries. Higher level of optimization + causes failures in several HDF5 library tests. +* For HPUX 11.23 many tools tests failed for 64-bit version when linked to the + shared libraries (tested for 1.8.0-beta2) +* For SNL, Red Storm: only paralle HDF5 is supported. The serial tests pass + and the parallel tests also pass with lots of non-fatal error messages. +* on SUN 5.10 C++ test fails in the "Testing Shared Datatypes with Attributes" test +* configuring with --enable-debug=all produces compiler errors on most + platforms. Users who want to run HDF5 in debug mode should use + --enable-debug rather than --enable-debug=all to enable debugging + information on most modules. +* On Mac OS 10.4, test/dt_arith.c has some errors in conversion from long + double to (unsigned) long long and from (unsigned)long long to long double. +* On Altix SGI with Intel 9.0 testmeta.c would not compile with -O3 + optimization flag. +* On VAX, Scaleoffset filter isn't supported. The filter cannot be applied to + HDF5 data generated on VAX. Scaleoffset filter only supports IEEE standard + for floating-point data. +* On Cray X1, a lone colon on the command line of h5dump --xml (as in + the testh5dumpxml.sh script) is misinterpereted by the operating system + and causes an error. +* On mpich 1.2.5 and 1.2.6, we found that if more than two processes + contribute no IO and the application asks to do IO with collective, we found + that when using 4 processors, a simple collective write will be hung + sometimes. This can be verified with t_mpi test under testpar. +* The dataset created or rewritten with the v1.6.3 library or after can't + be read with the v1.6.2 library or before when Fletcher32 EDC(filter) is + enabled. There was a bug in the calculating code of the Fletcher32 + checksum in the library before v1.6.3. The checksum value wasn't consistent + between big-endian and little-endian systems. This bug was fixed in + Release 1.6.3. However, after fixing the bug, the checksum value is no + longer the same as before on little-endian system. The library release + after 1.6.4 can still read the dataset created or rewritten with the library + of v1.6.2 or before. SLU - 2005/6/30 +* For the version 6(6.02 and 6.04) of Portland Group compiler on AMD Opteron + processor, there's a bug in the compiler for optimization(-O2). The library + failed in several tests but all related to multi driver. The problem has + been reported to the vendor. +* On IBM AIX systems, parallel HDF5 mode will fail some tests with error + messages like "INFO: 0031-XXX ...". This is from the command poe. + Set the environment variable MP_INFOLEVEL to 0 to minimize the messages + and run the tests again. + The tests may fail with messages like "The socket name is already + in use". HDF5 does not use sockets (except for stream-VFD). This is + due to problems of the poe command trying to set up the debug socket. + Check if there are many old /tmp/s.pedb.* staying around. These are + sockets used by the poe command and left behind due to failed commands. + Ask your system administrator to clean them out. Lastly, request IBM + to provide a mean to run poe without the debug socket. + +* The C++ library's tests fails when compiling with PGI C++ compiler. The + workaround until the problem is correctly handled is to use the + flag "--instantiate=local" prior to the configure and build steps, as: + setenv CXX "pgCC --instantiate=local" for pgCC 5.02 and higher + + +* The stream-vfd test uses ip port 10007 for testing. If another + application is already using that port address, the test will hang + indefinitely and has to be terminated by the kill command. To try the + test again, change the port address in test/stream_test.c to one not + being used in the host. + +* The --enable-static-exec configure flag will only statically link libraries + if the static version of that library is present. If only the shared version + of a library exists (i.e., most system libraries on Solaris, AIX, and Mac, + for example, only have shared versions), the flag should still result in a + successful compilation, but note that the installed executables will not be + fully static. Thus, the only guarantee on these systems is that the + executable is statically linked with just the HDF5 library. + +* With the gcc 2.95.2 compiler, HDF 5 uses the `-ansi' flag during + compilation. The ANSI version of the compiler complains about not being + able to handle the `long long' datatype with the warning: + + warning: ANSI C does not support `long long' + + This warning is innocuous and can be safely ignored. + +* Certain platforms give false negatives when testing h5ls: + - Cray J90 and Cray T90IEEE give errors during testing when displaying + some floating-point values. These are benign differences due to + the different precision in the values displayed and h5ls appears to + be dumping floating-point numbers correctly. + +* Not all platforms behave correctly with szip's shared libraries. Szip is + disabled in these cases, and a message is relayed at configure time. Static + libraries should be working on all systems that support szip, and should be + used when shared libraries are unavailable. There is also a configure error + on Altix machines that incorrectly reports when a version of szip without + an encoder is being used. + +* On some platforms that use Intel and Absoft compilers to build HDF5 fortran library, + compilation may fail for fortranlib_test.f90, fflush1.f90 and fflush2.f90 + complaining about exit subroutine. Comment out the line + IF (total_error .ne. 0) CALL exit (total_error) + +* Information about building with PGI and Intel compilers is available in + INSTALL file sections 5.7 and 5.8 + +* On at least one system, (SDSC DataStar), the scheduler (in this case + LoadLeveler) sends job status updates to standard error when you run + any executable that was compiled with the parallel compilers. + + This causes problems when running "make check" on parallel builds, as + many of the tool tests function by saving the output from test runs, + and comparing it to an exemplar. + + The best solution is to reconfigure the target system so it no longer + inserts the extra text. However, this may not be practical. + + In such cases, one solution is to "setenv HDF5_Make_Ignore yes" prior to + the configure and build. This will cause "make check" to continue after + detecting errors in the tool tests. However, in the case of SDSC DataStar, + it also leaves you with some 150 "failed" tests to examine by hand. + + A second solution is to write a script to run serial tests and filter + out the text added by the scheduler. A sample script used on SDSC + DataStar is given below, but you will probably have to customize it + for your installation. + + Observe that the basic idea is to insert the script as the first item + on the command line which executes the the test. The script then + executes the test and filters out the offending text before passing + it on. + + #!/bin/csh + + set STDOUT_FILE=~/bin/serial_filter.stdout + set STDERR_FILE=~/bin/serial_filter.stderr + + rm -f $STDOUT_FILE $STDERR_FILE + + ($* > $STDOUT_FILE) >& $STDERR_FILE + + set RETURN_VALUE=$status + + cat $STDOUT_FILE + + tail +3 $STDERR_FILE + + exit $RETURN_VALUE + + You get the HDF make files and test scipts to execute your filter script + by setting the environment variable "RUNSERIAL" to the full path of the + script prior to running configure for parallel builds. Remember to + "unsetenv RUNSERIAL" before running configure for a serial build. + + Note that the RUNSERIAL environment variable exists so that we can + can prefix serial runs as necessary on the target system. On DataStar, + no prefix is necessary. However on an MPICH system, the prefix might + have to be set to something like "/usr/local/mpi/bin/mpirun -np 1" to + get the serial tests to run at all. + + In such cases, you will have to include the regular prefix in your + filter script. + +* H5Ocopy() does not copy reg_ref attributes correctly when shared-message + is turn on. The value of the reference in the destination attriubte is + wrong. This H5Ocopy problem will affect h5copy tool -- cgit v0.12 n1208'>1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * 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://support.hdfgroup.org/ftp/HDF5/releases.  *
 * If you do not have access to either file, you may request a copy from     *
 * help@hdfgroup.org.                                                        *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/***********************************************************
*
* Test program:	 th5o
*
* Test public H5O functions for accessing
*
*************************************************************/

#include "testhdf5.h"

#define TEST_FILENAME "th5o_file"

#define RANK 2
#define DIM0 5
#define DIM1 10

#define TEST6_DIM1 100
#define TEST6_DIM2 100


/****************************************************************
**
**  test_h5o_open(): Test H5Oopen function.
**
****************************************************************/
static void
test_h5o_open(void)
{
    hid_t       fid;                        /* HDF5 File ID      */
    hid_t       grp, dset, dtype, dspace;   /* Object identifiers */
    hsize_t     dims[RANK];
    H5I_type_t  id_type;                    /* Type of IDs returned from H5Oopen */
    H5G_info_t  ginfo;                      /* Group info struct */
    H5T_class_t type_class;                 /* Class of the datatype */
    herr_t      ret;                        /* Value returned from API calls */

    /* Create a new HDF5 file */
    fid = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(fid, FAIL, "H5Fcreate");

    /* Create a group, dataset, and committed datatype within the file */
    /* Create the group */
    grp = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(grp, FAIL, "H5Gcreate2");
    ret = H5Gclose(grp);
    CHECK(ret, FAIL, "H5Gclose");

    /* Commit the type inside the group */
    dtype = H5Tcopy(H5T_NATIVE_INT);
    CHECK(dtype, FAIL, "H5Tcopy");
    ret = H5Tcommit2(fid, "group/datatype", dtype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Tcommit2");
    ret = H5Tclose(dtype);
    CHECK(ret, FAIL, "H5Tclose");

    /* Create the data space for the dataset. */
    dims[0] = DIM0;
    dims[1] = DIM1;
    dspace = H5Screate_simple(RANK, dims, NULL);
    CHECK(dspace, FAIL, "H5Screate_simple");

    /* Create the dataset. */
    dset = H5Dcreate2(fid, "dataset", H5T_NATIVE_INT, dspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(dset, FAIL, "H5Dcreate2");
    ret = H5Dclose(dset);
    CHECK(ret, FAIL, "H5Dclose");
    ret = H5Sclose(dspace);
    CHECK(ret, FAIL, "H5Sclose");

    /* Now make sure that H5Oopen can open all three types of objects */
    grp = H5Oopen(fid, "group", H5P_DEFAULT);
    CHECK(grp, FAIL, "H5Oopen");
    dtype = H5Oopen(fid, "group/datatype", H5P_DEFAULT);
    CHECK(dtype, FAIL, "H5Oopen");
    /* Check that we can use the group as a valid location */
    dset = H5Oopen(grp, "/dataset", H5P_DEFAULT);
    CHECK(dset, FAIL, "H5Oopen");

    /* Make sure that each is the right kind of ID */
    id_type = H5Iget_type(grp);
    VERIFY(id_type, H5I_GROUP, "H5Iget_type for group ID");
    id_type = H5Iget_type(dtype);
    VERIFY(id_type, H5I_DATATYPE, "H5Iget_type for datatype ID");
    id_type = H5Iget_type(dset);
    VERIFY(id_type, H5I_DATASET, "H5Iget_type for dataset ID");

    /* Do something more complex with each of the IDs to make sure they "work" */
    ret = H5Gget_info(grp, &ginfo);
    CHECK(ret, FAIL, "H5Gget_info");
    VERIFY(ginfo.nlinks, 1, "H5Gget_info"); /* There should be one object, the datatype */

    type_class = H5Tget_class(dtype);
    VERIFY(type_class, H5T_INTEGER, "H5Tget_class");

    dspace = H5Dget_space(dset);
    CHECK(dspace, FAIL, "H5Dget_space");

    /* Close the IDs */
    ret = H5Sclose(dspace);
    CHECK(ret, FAIL, "H5Sclose");
    ret = H5Gclose(grp);
    CHECK(ret, FAIL, "H5Gclose");
    ret = H5Tclose(dtype);
    CHECK(ret, FAIL, "H5Tclose");
    ret = H5Dclose(dset);
    CHECK(ret, FAIL, "H5Dclose");

    /* Trying to open objects with bogus names should fail gracefully */
    H5E_BEGIN_TRY {
        grp = H5Oopen(fid, "bogus_group", H5P_DEFAULT);
        VERIFY(grp, FAIL, "H5Oopen");
        dtype = H5Oopen(fid, "group/bogus_datatype", H5P_DEFAULT);
        VERIFY(dtype, FAIL, "H5Oopen");
        dset = H5Oopen(fid, "/bogus_dataset", H5P_DEFAULT);
        VERIFY(dset, FAIL, "H5Oopen");
    } H5E_END_TRY

    /* Close the file */
    ret = H5Fclose(fid);
    CHECK(ret, FAIL, "H5Fclose");

    /* Trying to open an object with a bogus file ID should fail */
    H5E_BEGIN_TRY {
        dset = H5Oopen(fid, "dataset", H5P_DEFAULT);
        VERIFY(dset, FAIL, "H5Oopen");
    } H5E_END_TRY
} /* test_h5o_open() */



/****************************************************************
**
**  test_h5o_close(): Test H5Oclose function.
**
****************************************************************/
static void
test_h5o_close(void)
{
    hid_t       fid;                        /* HDF5 File ID      */
    hid_t       grp, dset, dtype, dspace;   /* Object identifiers */
    hsize_t     dims[RANK];
    herr_t      ret;                        /* Value returned from API calls */

    /* Create a new HDF5 file */
    fid = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(fid, FAIL, "H5Fcreate");

    /* Create a group, dataset, and committed datatype within the file */
    /* Create the group and close it with H5Oclose */
    grp = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(grp, FAIL, "H5Gcreate2");
    VERIFY_TYPE(H5Iget_type(grp), H5I_GROUP, H5I_type_t, "%d", "H5Iget_type");
    ret = H5Oclose(grp);
    CHECK(ret, FAIL, "H5Oclose");

    /* Commit the type inside the group */
    dtype = H5Tcopy(H5T_NATIVE_INT);
    CHECK(dtype, FAIL, "H5Tcopy");
    ret = H5Tcommit2(fid, "group/datatype", dtype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Tcommit2");
    ret = H5Oclose(dtype);
    CHECK(ret, FAIL, "H5Oclose");

    /* Create the data space for the dataset. */
    dims[0] = DIM0;
    dims[1] = DIM1;
    dspace = H5Screate_simple(RANK, dims, NULL);
    CHECK(dspace, FAIL, "H5Screate_simple");

    /* Create the dataset. */
    dset = H5Dcreate2(fid, "dataset", H5T_NATIVE_INT, dspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(dset, FAIL, "H5Dcreate2");
    ret = H5Oclose(dset);
    CHECK(ret, FAIL, "H5Oclose");

    /* Attempting to close the data space with H5Oclose should fail */
    H5E_BEGIN_TRY {
       ret = H5Oclose(dspace);
       VERIFY(ret, FAIL, "H5Oclose");
    } H5E_END_TRY
    /* Close the dataspace for real */
    ret = H5Sclose(dspace);
    CHECK(ret, FAIL, "H5Sclose");

    /* Make sure that H5Oclose can close objects opened with H5Oopen */
    grp = H5Oopen(fid, "group", H5P_DEFAULT);
    CHECK(grp, FAIL, "H5Oopen");
    dtype = H5Oopen(fid, "group/datatype", H5P_DEFAULT);
    CHECK(dtype, FAIL, "H5Oopen");
    dset = H5Oopen(fid, "dataset", H5P_DEFAULT);
    CHECK(dset, FAIL, "H5Oopen");

    ret = H5Oclose(grp);
    CHECK(ret, FAIL, "H5Oclose");
    ret = H5Oclose(dtype);
    CHECK(ret, FAIL, "H5Oclose");
    ret = H5Oclose(dset);
    CHECK(ret, FAIL, "H5Oclose");

    /* Make sure H5Oclose can close objects opened with H5*open */
    grp = H5Gopen2(fid, "group", H5P_DEFAULT);
    CHECK(grp, FAIL, "H5Gopen2");
    dtype = H5Topen2(fid, "group/datatype", H5P_DEFAULT);
    CHECK(dtype, FAIL, "H5Topen2");
    dset = H5Dopen2(fid, "dataset", H5P_DEFAULT);
    CHECK(dset, FAIL, "H5Dopen2");

    ret = H5Oclose(grp);
    CHECK(ret, FAIL, "H5Oclose");
    ret = H5Oclose(dtype);
    CHECK(ret, FAIL, "H5Oclose");
    ret = H5Oclose(dset);
    CHECK(ret, FAIL, "H5Oclose");

    /* Close the file */
    ret = H5Fclose(fid);
    CHECK(ret, FAIL, "H5Fclose");
}


/****************************************************************
**
**  test_h5o_open_by_addr(): Test H5Oopen_by_addr function.
**
****************************************************************/
static void
test_h5o_open_by_addr(void)
{
    hid_t       fid;                        /* HDF5 File ID      */
    hid_t       grp, dset, dtype, dspace;   /* Object identifiers */
    H5L_info_t li;                      /* Buffer for H5Lget_info */
    haddr_t grp_addr;                       /* Addresses for objects */
    haddr_t dset_addr;
    haddr_t dtype_addr;
    hsize_t     dims[RANK];
    H5I_type_t  id_type;                    /* Type of IDs returned from H5Oopen */
    H5G_info_t  ginfo;                      /* Group info struct */
    H5T_class_t type_class;                 /* Class of the datatype */
    herr_t      ret;                        /* Value returned from API calls */

    /* Create a new HDF5 file */
    fid = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(fid, FAIL, "H5Fcreate");

    /* Create a group, dataset, and committed datatype within the file */
    /* Create the group */
    grp = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(grp, FAIL, "H5Gcreate2");
    ret = H5Gclose(grp);
    CHECK(ret, FAIL, "H5Gclose");

    /* Commit the type inside the group */
    dtype = H5Tcopy(H5T_NATIVE_INT);
    CHECK(dtype, FAIL, "H5Tcopy");
    ret = H5Tcommit2(fid, "group/datatype", dtype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Tcommit2");
    ret = H5Tclose(dtype);
    CHECK(ret, FAIL, "H5Tclose");

    /* Create the data space for the dataset. */
    dims[0] = DIM0;
    dims[1] = DIM1;
    dspace = H5Screate_simple(RANK, dims, NULL);
    CHECK(dspace, FAIL, "H5Screate_simple");

    /* Create the dataset. */
    dset = H5Dcreate2(fid, "dataset", H5T_NATIVE_INT, dspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(dset, FAIL, "H5Dcreate2");
    ret = H5Dclose(dset);
    CHECK(ret, FAIL, "H5Dclose");
    ret = H5Sclose(dspace);
    CHECK(ret, FAIL, "H5Sclose");

    /* Get address for each object */
    ret = H5Lget_info(fid, "group", &li, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Lget_info");
    grp_addr = li.u.address;
    ret = H5Lget_info(fid, "group/datatype", &li, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Lget_info");
    dtype_addr = li.u.address;
    ret = H5Lget_info(fid, "dataset", &li, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Lget_info");
    dset_addr = li.u.address;

    /* Now make sure that H5Oopen_by_addr can open all three types of objects */
    grp = H5Oopen_by_addr(fid, grp_addr);
    CHECK(grp, FAIL, "H5Oopen_by_addr");
    dtype = H5Oopen_by_addr(fid, dtype_addr);
    CHECK(dtype, FAIL, "H5Oopen_by_addr");
    /* Check that we can use the group ID as a valid location */
    dset = H5Oopen_by_addr(grp, dset_addr);
    CHECK(dset, FAIL, "H5Oopen_by_addr");

    /* Make sure that each is the right kind of ID */
    id_type = H5Iget_type(grp);
    VERIFY(id_type, H5I_GROUP, "H5Iget_type for group ID");
    id_type = H5Iget_type(dtype);
    VERIFY(id_type, H5I_DATATYPE, "H5Iget_type for datatype ID");
    id_type = H5Iget_type(dset);
    VERIFY(id_type, H5I_DATASET, "H5Iget_type for dataset ID");

    /* Do something more complex with each of the IDs to make sure they "work" */
    ret = H5Gget_info(grp, &ginfo);
    CHECK(ret, FAIL, "H5Gget_info");
    VERIFY(ginfo.nlinks, 1, "H5Gget_info"); /* There should be one object, the datatype */

    type_class = H5Tget_class(dtype);
    VERIFY(type_class, H5T_INTEGER, "H5Tget_class");

    dspace = H5Dget_space(dset);
    CHECK(dspace, FAIL, "H5Dget_space");

    /* Close the IDs */
    ret = H5Sclose(dspace);
    CHECK(ret, FAIL, "H5Sclose");
    ret = H5Gclose(grp);
    CHECK(ret, FAIL, "H5Gclose");
    ret = H5Tclose(dtype);
    CHECK(ret, FAIL, "H5Tclose");
    ret = H5Dclose(dset);
    CHECK(ret, FAIL, "H5Dclose");

    /* Try giving some bogus values to H5O_open_by_addr. */
    /* Try to open an object with a bad address */
    grp_addr += 20;
    H5E_BEGIN_TRY{
      grp = H5Oopen_by_addr(fid, grp_addr);
    }H5E_END_TRY
    VERIFY(grp, FAIL, "H5Oopen_by_addr");

    /* For instance, an objectno smaller than the end of the file's superblock should
     * trigger an error */
    grp_addr = 10;
    H5E_BEGIN_TRY{
      grp = H5Oopen_by_addr(fid, grp_addr);
    }H5E_END_TRY
    VERIFY(grp, FAIL, "H5Oopen_by_addr");

    /* Likewise, an objectno larger than the size of the file should fail */
    grp_addr = 0;
    grp_addr = 1000000000;
    H5E_BEGIN_TRY{
      grp = H5Oopen_by_addr(fid, grp_addr);
    }H5E_END_TRY
    VERIFY(grp, FAIL, "H5Oopen_by_addr");

    ret = H5Fclose(fid);
    CHECK(ret, FAIL, "H5Fclose");

    /* Also, trying to open an object without a valid location should fail */
    H5E_BEGIN_TRY{
      dtype = H5Oopen_by_addr(fid, dtype_addr);
    }H5E_END_TRY
    VERIFY(dtype, FAIL, "H5Oopen_by_addr");
} /* test_h5o_open_by_addr() */


/****************************************************************
**
**  test_h5o_refcount(): Test H5O refcounting functions.
**
****************************************************************/
static void
test_h5o_refcount(void)
{
    hid_t       fid;                        /* HDF5 File ID      */
    hid_t       grp, dset, dtype, dspace;   /* Object identifiers */
    H5O_info_t	oinfo;                      /* Object info struct */
    hsize_t     dims[RANK];
    herr_t      ret;                        /* Value returned from API calls */

    /* Create a new HDF5 file */
    fid = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(fid, FAIL, "H5Fcreate");

    /* Create a group, dataset, and committed datatype within the file */
    /* Create the group */
    grp = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(grp, FAIL, "H5Gcreate2");

    /* Commit the type inside the group */
    dtype = H5Tcopy(H5T_NATIVE_INT);
    CHECK(dtype, FAIL, "H5Tcopy");
    ret = H5Tcommit2(fid, "datatype", dtype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Tcommit2");

    /* Create the data space for the dataset. */
    dims[0] = DIM0;
    dims[1] = DIM1;
    dspace = H5Screate_simple(RANK, dims, NULL);
    CHECK(dspace, FAIL, "H5Screate_simple");

    /* Create the dataset. */
    dset = H5Dcreate2(fid, "dataset", H5T_NATIVE_INT, dspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(dset, FAIL, "H5Dcreate2");
    ret = H5Sclose(dspace);
    CHECK(ret, FAIL, "H5Sclose");

    /* Get ref counts for each object.  They should all be 1, since each object has a hard link. */
    ret = H5Oget_info_by_name2(fid, "group", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
    ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
    ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");

    /* Increment each object's reference count. */
    ret = H5Oincr_refcount(grp);
    CHECK(ret, FAIL, "H5Oincr_refcount");
    ret = H5Oincr_refcount(dtype);
    CHECK(ret, FAIL, "H5Oincr_refcount");
    ret = H5Oincr_refcount(dset);
    CHECK(ret, FAIL, "H5Oincr_refcount");

    /* Get ref counts for each object.  They should all be 2 now. */
    ret = H5Oget_info_by_name2(fid, "group", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name");
    ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name");
    ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name");

    /* Decrement the reference counts and check that they decrease back to 1. */
    ret = H5Odecr_refcount(grp);
    CHECK(ret, FAIL, "H5Odecr_refcount");
    ret = H5Odecr_refcount(dtype);
    CHECK(ret, FAIL, "H5Odecr_refcount");
    ret = H5Odecr_refcount(dset);
    CHECK(ret, FAIL, "H5Odecr_refcount");

    ret = H5Oget_info_by_name2(fid, "group", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
    ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
    ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");

    /* Increment the reference counts and then close the file to make sure the increment is permanant */
    ret = H5Oincr_refcount(grp);
    CHECK(ret, FAIL, "H5Oincr_refcount");
    ret = H5Oincr_refcount(dtype);
    CHECK(ret, FAIL, "H5Oincr_refcount");
    ret = H5Oincr_refcount(dset);
    CHECK(ret, FAIL, "H5Oincr_refcount");

    ret = H5Gclose(grp);
    CHECK(ret, FAIL, "H5Gclose");
    ret = H5Tclose(dtype);
    CHECK(ret, FAIL, "H5Tclose");
    ret = H5Dclose(dset);
    CHECK(ret, FAIL, "H5Dclose");
    ret = H5Fclose(fid);
    CHECK(ret, FAIL, "H5Fclose");

    /* Re-open the file and check that the reference counts were really incremented */
    fid = H5Fopen(TEST_FILENAME, H5F_ACC_RDWR, H5P_DEFAULT);
    CHECK(fid, FAIL, "H5Fopen");

    grp = H5Gopen2(fid, "group", H5P_DEFAULT);
    CHECK(grp, FAIL, "H5Gopen2");
    dtype = H5Topen2(fid, "datatype", H5P_DEFAULT);
    CHECK(dtype, FAIL, "H5Topen2");
    dset = H5Dopen2(fid, "dataset", H5P_DEFAULT);
    CHECK(dset, FAIL, "H5Dopen2");

    ret = H5Oget_info_by_name2(fid, "group", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name");
    ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name");
    ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    VERIFY(oinfo.rc, 2, "reference count in H5Oget_info_by_name");

    /* Decrement the reference counts and close the file */
    ret = H5Odecr_refcount(grp);
    CHECK(ret, FAIL, "H5Odecr_refcount");
    ret = H5Odecr_refcount(dtype);
    CHECK(ret, FAIL, "H5Odecr_refcount");
    ret = H5Odecr_refcount(dset);
    CHECK(ret, FAIL, "H5Odecr_refcount");

    ret = H5Gclose(grp);
    CHECK(ret, FAIL, "H5Gclose");
    ret = H5Tclose(dtype);
    CHECK(ret, FAIL, "H5Tclose");
    ret = H5Dclose(dset);
    CHECK(ret, FAIL, "H5Dclose");
    ret = H5Fclose(fid);
    CHECK(ret, FAIL, "H5Fclose");

    /* Re-open the file and check that the reference counts were really decremented */
    fid = H5Fopen(TEST_FILENAME, H5F_ACC_RDWR, H5P_DEFAULT);
    CHECK(fid, FAIL, "H5Fopen");

    grp = H5Gopen2(fid, "group", H5P_DEFAULT);
    CHECK(grp, FAIL, "H5Gopen2");
    dtype = H5Topen2(fid, "datatype", H5P_DEFAULT);
    CHECK(dtype, FAIL, "H5Topen2");
    dset = H5Dopen2(fid, "dataset", H5P_DEFAULT);
    CHECK(dset, FAIL, "H5Dopen2");

    ret = H5Oget_info_by_name2(fid, "group", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
    ret = H5Oget_info_by_name2(fid, "datatype", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");
    ret = H5Oget_info_by_name2(fid, "dataset", &oinfo, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    VERIFY(oinfo.rc, 1, "reference count in H5Oget_info_by_name");

    /* Close the IDs */
    ret = H5Gclose(grp);
    CHECK(ret, FAIL, "H5Gclose");
    ret = H5Tclose(dtype);
    CHECK(ret, FAIL, "H5Tclose");
    ret = H5Dclose(dset);
    CHECK(ret, FAIL, "H5Dclose");

    /* Make sure that bogus IDs return errors properly */
    H5E_BEGIN_TRY {
        ret = H5Oincr_refcount(grp);
        VERIFY(ret, FAIL, "H5Oincr_refcount");
        ret = H5Oincr_refcount(dtype);
        VERIFY(ret, FAIL, "H5Oincr_refcount");
        ret = H5Oincr_refcount(dset);
        VERIFY(ret, FAIL, "H5Oincr_refcount");
        ret = H5Odecr_refcount(grp);
        VERIFY(ret, FAIL, "H5Odecr_refcount");
        ret = H5Odecr_refcount(dtype);
        VERIFY(ret, FAIL, "H5Odecr_refcount");
        ret = H5Odecr_refcount(dset);
        VERIFY(ret, FAIL, "H5Odecr_refcount");
    } H5E_END_TRY

    /* Close the file */
    ret = H5Fclose(fid);
    CHECK(ret, FAIL, "H5Fclose");
} /* test_h5o_refcount() */


/****************************************************************
**
**  test_h5o_plist(): Test object creation properties
**
****************************************************************/
static void
test_h5o_plist(void)
{
    hid_t       fid;                        /* HDF5 File ID      */
    hid_t       grp, dset, dtype, dspace;   /* Object identifiers */
    hid_t       fapl;                       /* File access property list */
    hid_t       gcpl, dcpl, tcpl;           /* Object creation properties */
    unsigned    def_max_compact, def_min_dense; /* Default phase change parameters */
    unsigned    max_compact, min_dense;         /* Actual phase change parameters */
    herr_t      ret;                        /* Value returned from API calls */

    /* Make a FAPL that uses the "use the latest version of the format" flag */
    fapl = H5Pcreate(H5P_FILE_ACCESS);
    CHECK(fapl, FAIL, "H5Pcreate");

    /* Set the "use the latest version of the format" bounds for creating objects in the file */
    ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
    CHECK(ret, FAIL, "H5Pset_libver_bounds");

    /* Create a new HDF5 file */
    fid = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
    CHECK(fid, FAIL, "H5Fcreate");

    /* Create group, dataset & named datatype creation property lists */
    gcpl = H5Pcreate(H5P_GROUP_CREATE);
    CHECK(gcpl, FAIL, "H5Pcreate");
    dcpl = H5Pcreate(H5P_DATASET_CREATE);
    CHECK(dcpl, FAIL, "H5Pcreate");
    tcpl = H5Pcreate(H5P_DATATYPE_CREATE);
    CHECK(tcpl, FAIL, "H5Pcreate");

    /* Retrieve default attribute phase change values */
    ret = H5Pget_attr_phase_change(gcpl, &def_max_compact, &def_min_dense);
    CHECK(ret, FAIL, "H5Pget_attr_phase_change");

    /* Set non-default attribute phase change values on each creation property list */
    ret = H5Pset_attr_phase_change(gcpl, def_max_compact + 1, def_min_dense - 1);
    CHECK(ret, FAIL, "H5Pset_attr_phase_change");
    ret = H5Pset_attr_phase_change(dcpl, def_max_compact + 1, def_min_dense - 1);
    CHECK(ret, FAIL, "H5Pset_attr_phase_change");
    ret = H5Pset_attr_phase_change(tcpl, def_max_compact + 1, def_min_dense - 1);
    CHECK(ret, FAIL, "H5Pset_attr_phase_change");

    /* Retrieve attribute phase change values on each creation property list and verify */
    ret = H5Pget_attr_phase_change(gcpl, &max_compact, &min_dense);
    CHECK(ret, FAIL, "H5Pget_attr_phase_change");
    VERIFY(max_compact, (def_max_compact + 1), "H5Pget_attr_phase_change");
    VERIFY(min_dense, (def_min_dense - 1), "H5Pget_attr_phase_change");
    ret = H5Pget_attr_phase_change(dcpl, &max_compact, &min_dense);
    CHECK(ret, FAIL, "H5Pget_attr_phase_change");
    VERIFY(max_compact, (def_max_compact + 1), "H5Pget_attr_phase_change");
    VERIFY(min_dense, (def_min_dense - 1), "H5Pget_attr_phase_change");
    ret = H5Pget_attr_phase_change(tcpl, &max_compact, &min_dense);
    CHECK(ret, FAIL, "H5Pget_attr_phase_change");
    VERIFY(max_compact, (def_max_compact + 1), "H5Pget_attr_phase_change");
    VERIFY(min_dense, (def_min_dense - 1), "H5Pget_attr_phase_change");

    /* Create a group, dataset, and committed datatype within the file,
     *  using the respective type of creation property lists.
     */

    /* Create the group anonymously and link it in */
    grp = H5Gcreate_anon(fid, gcpl, H5P_DEFAULT);
    CHECK(grp, FAIL, "H5Gcreate_anon");
    ret = H5Olink(grp, fid, "group", H5P_DEFAULT, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Olink");

    /* Commit the type inside the group anonymously and link it in */
    dtype = H5Tcopy(H5T_NATIVE_INT);
    CHECK(dtype, FAIL, "H5Tcopy");
    ret = H5Tcommit_anon(fid, dtype, tcpl, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Tcommit_anon");
    ret = H5Olink(dtype, fid, "datatype", H5P_DEFAULT, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Olink");

    /* Create the dataspace for the dataset. */
    dspace = H5Screate(H5S_SCALAR);
    CHECK(dspace, FAIL, "H5Screate");

    /* Create the dataset anonymously and link it in */
    dset = H5Dcreate_anon(fid, H5T_NATIVE_INT, dspace, dcpl, H5P_DEFAULT);
    CHECK(dset, FAIL, "H5Dcreate_anon");
    ret = H5Olink(dset, fid, "dataset", H5P_DEFAULT, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Olink");
    ret = H5Sclose(dspace);
    CHECK(ret, FAIL, "H5Sclose");

    /* Close current creation property lists */
    ret = H5Pclose(gcpl);
    CHECK(ret, FAIL, "H5Pclose");
    ret = H5Pclose(dcpl);
    CHECK(ret, FAIL, "H5Pclose");
    ret = H5Pclose(tcpl);
    CHECK(ret, FAIL, "H5Pclose");

    /* Retrieve each object's creation property list */
    gcpl = H5Gget_create_plist(grp);
    CHECK(gcpl, FAIL, "H5Gget_create_plist");
    tcpl = H5Tget_create_plist(dtype);
    CHECK(tcpl, FAIL, "H5Tget_create_plist");
    dcpl = H5Dget_create_plist(dset);
    CHECK(dcpl, FAIL, "H5Dget_create_plist");

    /* Retrieve attribute phase change values on each creation property list and verify */
    ret = H5Pget_attr_phase_change(gcpl, &max_compact, &min_dense);
    CHECK(ret, FAIL, "H5Pget_attr_phase_change");
    VERIFY(max_compact, (def_max_compact + 1), "H5Pget_attr_phase_change");
    VERIFY(min_dense, (def_min_dense - 1), "H5Pget_attr_phase_change");
    ret = H5Pget_attr_phase_change(dcpl, &max_compact, &min_dense);
    CHECK(ret, FAIL, "H5Pget_attr_phase_change");
    VERIFY(max_compact, (def_max_compact + 1), "H5Pget_attr_phase_change");
    VERIFY(min_dense, (def_min_dense - 1), "H5Pget_attr_phase_change");
    ret = H5Pget_attr_phase_change(tcpl, &max_compact, &min_dense);
    CHECK(ret, FAIL, "H5Pget_attr_phase_change");
    VERIFY(max_compact, (def_max_compact + 1), "H5Pget_attr_phase_change");
    VERIFY(min_dense, (def_min_dense - 1), "H5Pget_attr_phase_change");

    /* Close current objects */
    ret = H5Pclose(gcpl);
    CHECK(ret, FAIL, "H5Pclose");
    ret = H5Pclose(dcpl);
    CHECK(ret, FAIL, "H5Pclose");
    ret = H5Pclose(tcpl);
    CHECK(ret, FAIL, "H5Pclose");
    ret = H5Gclose(grp);
    CHECK(ret, FAIL, "H5Gclose");
    ret = H5Tclose(dtype);
    CHECK(ret, FAIL, "H5Tclose");
    ret = H5Dclose(dset);
    CHECK(ret, FAIL, "H5Dclose");
    ret = H5Fclose(fid);
    CHECK(ret, FAIL, "H5Fclose");

    /* Re-open the file and check that the object creation properties persist */
    fid = H5Fopen(TEST_FILENAME, H5F_ACC_RDONLY, fapl);
    CHECK(fid, FAIL, "H5Fopen");

    /* Re-open objects */
    grp = H5Gopen2(fid, "group", H5P_DEFAULT);
    CHECK(grp, FAIL, "H5Gopen2");
    dtype = H5Topen2(fid, "datatype", H5P_DEFAULT);
    CHECK(dtype, FAIL, "H5Topen2");
    dset = H5Dopen2(fid, "dataset", H5P_DEFAULT);
    CHECK(dset, FAIL, "H5Dopen2");

    /* Retrieve each object's creation property list */
    gcpl = H5Gget_create_plist(grp);
    CHECK(gcpl, FAIL, "H5Gget_create_plist");
    tcpl = H5Tget_create_plist(dtype);
    CHECK(tcpl, FAIL, "H5Tget_create_plist");
    dcpl = H5Dget_create_plist(dset);
    CHECK(dcpl, FAIL, "H5Dget_create_plist");

    /* Retrieve attribute phase change values on each creation property list and verify */
    ret = H5Pget_attr_phase_change(gcpl, &max_compact, &min_dense);
    CHECK(ret, FAIL, "H5Pget_attr_phase_change");
    VERIFY(max_compact, (def_max_compact + 1), "H5Pget_attr_phase_change");
    VERIFY(min_dense, (def_min_dense - 1), "H5Pget_attr_phase_change");
    ret = H5Pget_attr_phase_change(dcpl, &max_compact, &min_dense);
    CHECK(ret, FAIL, "H5Pget_attr_phase_change");
    VERIFY(max_compact, (def_max_compact + 1), "H5Pget_attr_phase_change");
    VERIFY(min_dense, (def_min_dense - 1), "H5Pget_attr_phase_change");
    ret = H5Pget_attr_phase_change(tcpl, &max_compact, &min_dense);
    CHECK(ret, FAIL, "H5Pget_attr_phase_change");
    VERIFY(max_compact, (def_max_compact + 1), "H5Pget_attr_phase_change");
    VERIFY(min_dense, (def_min_dense - 1), "H5Pget_attr_phase_change");

    /* Close current objects */
    ret = H5Pclose(gcpl);
    CHECK(ret, FAIL, "H5Pclose");
    ret = H5Pclose(dcpl);
    CHECK(ret, FAIL, "H5Pclose");
    ret = H5Pclose(tcpl);
    CHECK(ret, FAIL, "H5Pclose");
    ret = H5Gclose(grp);
    CHECK(ret, FAIL, "H5Gclose");
    ret = H5Tclose(dtype);
    CHECK(ret, FAIL, "H5Tclose");
    ret = H5Dclose(dset);
    CHECK(ret, FAIL, "H5Dclose");
    ret = H5Fclose(fid);
    CHECK(ret, FAIL, "H5Fclose");

    /* Close the FAPL */
    ret = H5Pclose(fapl);
    CHECK(ret, FAIL, "H5Pclose");
} /* test_h5o_plist() */


/****************************************************************
**
**  test_h5o_link(): Test creating link to object
**
****************************************************************/
static void
test_h5o_link(void)
{
    hid_t file_id=-1;
    hid_t group_id=-1;
    hid_t space_id=-1;
    hid_t dset_id=-1;
    hid_t type_id=-1;
    hid_t fapl_id=-1;
    hid_t lcpl_id=-1;
    hsize_t dims[2] = {TEST6_DIM1, TEST6_DIM2};
    htri_t committed;           /* Whether the named datatype is committed */
    H5F_libver_t low, high; /* File format bounds */
    int *wdata;
    int *rdata;
    int i, n;
    herr_t ret;                 /* Value returned from API calls */

    /* Allocate memory buffers */
    /* (These are treated as 2-D buffers) */
    wdata = (int *)HDmalloc((size_t)(TEST6_DIM1 * TEST6_DIM2) * sizeof(int));
    CHECK_PTR(wdata, "HDmalloc");
    rdata = (int *)HDmalloc((size_t)(TEST6_DIM1 * TEST6_DIM2) * sizeof(int));
    CHECK_PTR(rdata, "HDmalloc");

    /* Initialize the raw data */
    for(i = n = 0; i < (TEST6_DIM1 * TEST6_DIM2); i++)
      wdata[i] = n++;

    /* Create the dataspace */
    space_id = H5Screate_simple(2 ,dims, NULL);
    CHECK(space_id, FAIL, "H5Screate_simple");

    /* Create LCPL with intermediate group creation flag set */
    lcpl_id = H5Pcreate(H5P_LINK_CREATE);
    CHECK(lcpl_id, FAIL, "H5Pcreate");
    ret = H5Pset_create_intermediate_group(lcpl_id, TRUE);
    CHECK(ret, FAIL, "H5Pset_create_intermediate_group");

    /* Create a file access property list */
    fapl_id = H5Pcreate(H5P_FILE_ACCESS);
    CHECK(fapl_id, FAIL, "H5Pcreate");

    /* Loop through all the combinations of low/high library format bounds */
    for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
        for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {

            /* Set version bounds */
            H5E_BEGIN_TRY {
                ret = H5Pset_libver_bounds(fapl_id, low, high);
            } H5E_END_TRY;

            if (ret < 0) /* Invalid low/high combinations */
                continue;

            /* Create a new HDF5 file */
            file_id = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id);
            CHECK(file_id, FAIL, "H5Fcreate");

            /* Close the FAPL */
            ret = H5Pclose(fapl_id);
            CHECK(ret, FAIL, "H5Pclose");

            /* Create and commit a datatype with no name */
            type_id = H5Tcopy(H5T_NATIVE_INT);
            CHECK(type_id, FAIL, "H5Fcreate");
            ret = H5Tcommit_anon(file_id, type_id, H5P_DEFAULT, H5P_DEFAULT);
            CHECK(ret, FAIL, "H5Tcommit_anon");
            committed = H5Tcommitted(type_id);
            VERIFY(committed, TRUE, "H5Tcommitted");

            /* Create a dataset with no name using the committed datatype*/
            dset_id = H5Dcreate_anon(file_id, type_id, space_id, H5P_DEFAULT, H5P_DEFAULT);
            CHECK(dset_id, FAIL, "H5Dcreate_anon");

            /* Verify that we can write to and read from the dataset */

            /* Write the data to the dataset */
            ret = H5Dwrite(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, wdata);
            CHECK(ret, FAIL, "H5Dwrite");

            /* Read the data back */
            ret = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
            CHECK(ret, FAIL, "H5Dread");

            /* Verify the data */
            for(i = 0; i < (TEST6_DIM1 * TEST6_DIM2); i++)
                VERIFY(wdata[i], rdata[i], "H5Dread");
    
            /* Create a group with no name*/
            group_id = H5Gcreate_anon(file_id, H5P_DEFAULT, H5P_DEFAULT);
            CHECK(group_id, FAIL, "H5Gcreate_anon");

            /* Link nameless datatype into nameless group */
            ret = H5Olink(type_id, group_id, "datatype", H5P_DEFAULT, H5P_DEFAULT);
            CHECK(ret, FAIL, "H5Olink");

            /* Link nameless dataset into nameless group with intermediate group */
            ret = H5Olink(dset_id, group_id, "inter_group/dataset", lcpl_id, H5P_DEFAULT);
            CHECK(ret, FAIL, "H5Olink");

            /* Close IDs for dataset and datatype */
            ret = H5Dclose(dset_id);
            CHECK(ret, FAIL, "H5Dclose");
            ret = H5Tclose(type_id);
            CHECK(ret, FAIL, "H5Tclose");

            /* Re-open datatype using new link */
            type_id = H5Topen2(group_id, "datatype", H5P_DEFAULT);
            CHECK(type_id, FAIL, "H5Topen2");

            /* Link nameless group to root group and close the group ID*/
            ret = H5Olink(group_id, file_id, "/group", H5P_DEFAULT, H5P_DEFAULT);
            CHECK(ret, FAIL, "H5Olink");
            ret = H5Gclose(group_id);
            CHECK(ret, FAIL, "H5Gclose");

            /* Open dataset through root group and verify its data */
            dset_id = H5Dopen2(file_id, "/group/inter_group/dataset", H5P_DEFAULT);
            CHECK(dset_id, FAIL, "H5Dopen2");

            /* Read data from dataset */
            ret = H5Dread(dset_id, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata);
            CHECK(ret, FAIL, "H5Dread");
            for(i = 0; i < (TEST6_DIM1 * TEST6_DIM2); i++)
                VERIFY(wdata[i], rdata[i], "H5Dread");

            /* Close open IDs */
            ret = H5Dclose(dset_id);
            CHECK(ret, FAIL, "H5Dclose");
            ret = H5Tclose(type_id);
            CHECK(ret, FAIL, "H5Tclose");
            ret = H5Fclose(file_id);
            CHECK(ret, FAIL, "H5Fclose");
        } /* for high */
    } /* for low */

    /* Close remaining IDs */
    ret = H5Sclose(space_id);
    CHECK(ret, FAIL, "H5Sclose");
    ret = H5Pclose(lcpl_id);
    CHECK(ret, FAIL, "H5Pclose");

    /* Release buffers */
    HDfree(wdata);
    HDfree(rdata);
} /* end test_h5o_link() */


/****************************************************************
**
**  test_h5o_comment(): Test H5Oset(get)_comment functions.
**
****************************************************************/
static void
test_h5o_comment(void)
{
    hid_t       fid;                        /* HDF5 File ID      */
    hid_t       grp, dset, dtype, dspace;   /* Object identifiers */
    hid_t       attr_space, attr_id;
    hsize_t     dims[RANK];
    hsize_t     attr_dims = 1;
    int         attr_value = 5;
    const char  *file_comment = "file comment";
    const char  *grp_comment = "group comment";
    const char  *dset_comment = "dataset comment";
    const char  *dtype_comment = "datatype comment";
    char        check_comment[64];
    ssize_t     comment_len = 0;
    ssize_t     len;
    herr_t      ret;                        /* Value returned from API calls */
    int         ret_value;

    /* Create a new HDF5 file */
    fid = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(fid, FAIL, "H5Fcreate");

    /* Create an attribute for the file */
    attr_space = H5Screate_simple(1, &attr_dims, NULL);
    CHECK(attr_space, FAIL, "H5Screate_simple");
    attr_id = H5Acreate2(fid, "file attribute", H5T_NATIVE_INT, attr_space, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(attr_id, FAIL, "H5Acreate2");
    ret = H5Awrite(attr_id, H5T_NATIVE_INT, &attr_value);
    CHECK(ret, FAIL, "H5Awrite");

    /* Putting a comment on the file through its attribute */
    ret = H5Oset_comment(attr_id, file_comment);
    CHECK(ret, FAIL, "H5Oset_comment");

    ret = H5Sclose(attr_space);
    CHECK(ret, FAIL, "H5Sclose");

    ret = H5Aclose(attr_id);
    CHECK(ret, FAIL, "H5Aclose");

    /* Create a group, dataset, and committed datatype within the file */
    /* Create the group */
    grp = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(grp, FAIL, "H5Gcreate2");

    /* Putting a comment on the group */
    ret = H5Oset_comment(grp, grp_comment);
    CHECK(ret, FAIL, "H5Oset_comment");

    ret = H5Gclose(grp);
    CHECK(ret, FAIL, "H5Gclose");

    /* Commit the type inside the group */
    dtype = H5Tcopy(H5T_NATIVE_INT);
    CHECK(dtype, FAIL, "H5Tcopy");
    ret = H5Tcommit2(fid, "group/datatype", dtype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Tcommit2");

    /* Putting a comment on the committed data type */
    ret = H5Oset_comment(dtype, dtype_comment);
    CHECK(ret, FAIL, "H5Oset_comment");

    ret = H5Tclose(dtype);
    CHECK(ret, FAIL, "H5Tclose");

    /* Create the data space for the dataset. */
    dims[0] = DIM0;
    dims[1] = DIM1;
    dspace = H5Screate_simple(RANK, dims, NULL);
    CHECK(dspace, FAIL, "H5Screate_simple");

    /* Create the dataset. */
    dset = H5Dcreate2(fid, "dataset", H5T_NATIVE_INT, dspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(dset, FAIL, "H5Dcreate2");

    /* Putting a comment on the dataset */
    ret = H5Oset_comment(dset, dset_comment);
    CHECK(ret, FAIL, "H5Oset_comment");

    /* Putting a comment on the dataspace.  It's supposed to fail. */
    H5E_BEGIN_TRY {
        ret = H5Oset_comment(dspace, "dataspace comment");
    } H5E_END_TRY;
    VERIFY(ret, FAIL, "H5Oset_comment");

    /* Close the file */
    ret = H5Dclose(dset);
    CHECK(ret, FAIL, "H5Dclose");
    ret = H5Sclose(dspace);
    CHECK(ret, FAIL, "H5Sclose");
    ret = H5Fclose(fid);
    CHECK(ret, FAIL, "H5Fclose");


    /* Now make sure that the comments are correct all 4 types of objects */
    /* Open file */
    fid = H5Fopen(TEST_FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
    CHECK(fid, FAIL, "H5Fopen");

    /* Getting the comment on the file and verify it */
    comment_len = H5Oget_comment(fid, NULL, (size_t)0);
    CHECK(comment_len, FAIL, "H5Oget_comment");

    len = H5Oget_comment(fid, check_comment, (size_t)comment_len+1);
    CHECK(len, FAIL, "H5Oget_comment");

    ret_value = HDstrcmp(file_comment, check_comment);
    VERIFY(ret_value, 0, "H5Oget_comment");

    /* Open the group */
    grp = H5Gopen2(fid, "group", H5P_DEFAULT);
    CHECK(grp, FAIL, "H5Gopen2");

    /* Getting the comment on the group and verify it */
    comment_len = H5Oget_comment(grp, NULL, (size_t)0);
    CHECK(comment_len, FAIL, "H5Oget_comment");

    len = H5Oget_comment(grp, check_comment, (size_t)comment_len+1);
    CHECK(len, FAIL, "H5Oget_comment");

    ret_value = HDstrcmp(grp_comment, check_comment);
    VERIFY(ret_value, 0, "H5Oget_comment");

    /* Open the datatype */
    dtype = H5Topen2(fid, "group/datatype", H5P_DEFAULT);
    CHECK(dtype, FAIL, "H5Topen2");

    /* Getting the comment on the datatype and verify it */
    comment_len = H5Oget_comment(dtype, NULL, (size_t)0);
    CHECK(comment_len, FAIL, "H5Oget_comment");

    len = H5Oget_comment(dtype, check_comment, (size_t)comment_len+1);
    CHECK(len, FAIL, "H5Oget_comment");

    ret_value = HDstrcmp(dtype_comment, check_comment);
    VERIFY(ret_value, 0, "H5Oget_comment");

    /* Open the dataset */
    dset = H5Dopen2(fid, "dataset", H5P_DEFAULT);
    CHECK(dset, FAIL, "H5Dopen2");

    /* Getting the comment on the dataset and verify it */
    comment_len = H5Oget_comment(dset, NULL, (size_t)0);
    CHECK(comment_len, FAIL, "H5Oget_comment");

    len = H5Oget_comment(dset, check_comment, (size_t)comment_len+1);
    CHECK(ret, len, "H5Oget_comment");

    ret_value = HDstrcmp(dset_comment, check_comment);
    VERIFY(ret_value, 0, "H5Oget_comment");


    /* Close the IDs */
    ret = H5Gclose(grp);
    CHECK(ret, FAIL, "H5Gclose");
    ret = H5Tclose(dtype);
    CHECK(ret, FAIL, "H5Tclose");
    ret = H5Dclose(dset);
    CHECK(ret, FAIL, "H5Dclose");

    /* Close the file */
    ret = H5Fclose(fid);
    CHECK(ret, FAIL, "H5Fclose");

} /* test_h5o_comment() */


/****************************************************************
**
**  test_h5o_comment_by_name(): Test H5Oset(get)_comment_by_name functions.
**
****************************************************************/
static void
test_h5o_comment_by_name(void)
{
    hid_t       fid;                        /* HDF5 File ID      */
    hid_t       grp, dset, dtype, dspace;   /* Object identifiers */
    hid_t       attr_space, attr_id;
    hsize_t     dims[RANK];
    hsize_t     attr_dims = 1;
    int         attr_value = 5;
    const char  *file_comment = "file comment by name";
    const char  *grp_comment = "group comment by name";
    const char  *dset_comment = "dataset comment by name";
    const char  *dtype_comment = "datatype comment by name";
    char        check_comment[64];
    ssize_t     comment_len = 0;
    ssize_t     len;
    herr_t      ret;                        /* Value returned from API calls */
    int         ret_value;

    /* Create a new HDF5 file */
    fid = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(fid, FAIL, "H5Fcreate");

    /* Create an attribute for the file */
    attr_space = H5Screate_simple(1, &attr_dims, NULL);
    CHECK(attr_space, FAIL, "H5Screate_simple");
    attr_id = H5Acreate2(fid, "file attribute", H5T_NATIVE_INT, attr_space, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(attr_id, FAIL, "H5Acreate2");
    ret = H5Awrite(attr_id, H5T_NATIVE_INT, &attr_value);
    CHECK(ret, FAIL, "H5Awrite");

    /* Putting a comment on the file through its attribute */
    ret = H5Oset_comment_by_name(attr_id, ".", file_comment, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oset_comment_by_name");

    ret = H5Sclose(attr_space);
    CHECK(ret, FAIL, "H5Sclose");

    ret = H5Aclose(attr_id);
    CHECK(ret, FAIL, "H5Aclose");

    /* Create a group, dataset, and committed datatype within the file */
    /* Create the group */
    grp = H5Gcreate2(fid, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(grp, FAIL, "H5Gcreate2");

    /* Putting a comment on the group */
    ret = H5Oset_comment_by_name(fid, "group", grp_comment, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oset_comment_by_name");

    /* Commit the type inside the group */
    dtype = H5Tcopy(H5T_NATIVE_INT);
    CHECK(dtype, FAIL, "H5Tcopy");
    ret = H5Tcommit2(fid, "group/datatype", dtype, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Tcommit2");

    /* Putting a comment on the committed data type */
    ret = H5Oset_comment_by_name(grp, "datatype", dtype_comment, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oset_comment_by_name");

    ret = H5Tclose(dtype);
    CHECK(ret, FAIL, "H5Tclose");

    ret = H5Gclose(grp);
    CHECK(ret, FAIL, "H5Gclose");

    /* Create the data space for the dataset. */
    dims[0] = DIM0;
    dims[1] = DIM1;
    dspace = H5Screate_simple(RANK, dims, NULL);
    CHECK(dspace, FAIL, "H5Screate_simple");

    /* Create the dataset. */
    dset = H5Dcreate2(fid, "dataset", H5T_NATIVE_INT, dspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(dset, FAIL, "H5Dcreate2");

    /* Putting a comment on the dataset */
    ret = H5Oset_comment_by_name(fid, "dataset", dset_comment, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oset_comment_by_name");

    /* Putting a comment on the dataspace.  It's supposed to fail. */
    H5E_BEGIN_TRY {
        ret = H5Oset_comment_by_name(dspace, ".", "dataspace comment", H5P_DEFAULT);
    } H5E_END_TRY;
    VERIFY(ret, FAIL, "H5Oset_comment");

    /* Close the file */
    ret = H5Dclose(dset);
    CHECK(ret, FAIL, "H5Dclose");
    ret = H5Sclose(dspace);
    CHECK(ret, FAIL, "H5Sclose");
    ret = H5Fclose(fid);
    CHECK(ret, FAIL, "H5Fclose");

    /* Now make sure that the comments are correct all 4 types of objects */
    /* Open file */
    fid = H5Fopen(TEST_FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
    CHECK(fid, FAIL, "H5Fopen");

    /* Getting the comment on the file and verify it */
    comment_len = H5Oget_comment_by_name(fid, ".", NULL, (size_t)0, H5P_DEFAULT);
    CHECK(comment_len, FAIL, "H5Oget_comment_by_name");

    len = H5Oget_comment_by_name(fid, ".", check_comment, (size_t)comment_len+1, H5P_DEFAULT);
    CHECK(len, FAIL, "H5Oget_comment_by_name");

    ret_value = HDstrcmp(file_comment, check_comment);
    VERIFY(ret_value, 0, "H5Oget_comment_by_name");

    /* Open the group */
    grp = H5Gopen2(fid, "group", H5P_DEFAULT);
    CHECK(grp, FAIL, "H5Gopen2");

    /* Getting the comment on the group and verify it */
    comment_len = H5Oget_comment_by_name(fid, "group", NULL, (size_t)0, H5P_DEFAULT);
    CHECK(comment_len, FAIL, "H5Oget_comment_by_name");

    len = H5Oget_comment_by_name(fid, "group", check_comment, (size_t)comment_len+1, H5P_DEFAULT);
    CHECK(len, FAIL, "H5Oget_comment_by_name");

    ret_value = HDstrcmp(grp_comment, check_comment);
    VERIFY(ret_value, 0, "H5Oget_comment_by_name");

    /* Getting the comment on the datatype and verify it */
    comment_len = H5Oget_comment_by_name(grp, "datatype", NULL, (size_t)0, H5P_DEFAULT);
    CHECK(comment_len, FAIL, "H5Oget_comment_by_name");

    len = H5Oget_comment_by_name(grp, "datatype", check_comment, (size_t)comment_len+1, H5P_DEFAULT);
    CHECK(len, FAIL, "H5Oget_comment");

    ret_value = HDstrcmp(dtype_comment, check_comment);
    VERIFY(ret_value, 0, "H5Oget_comment_by_name");

    /* Getting the comment on the dataset and verify it */
    comment_len = H5Oget_comment_by_name(fid, "dataset", NULL, (size_t)0, H5P_DEFAULT);
    CHECK(comment_len, FAIL, "H5Oget_comment_by_name");

    len = H5Oget_comment_by_name(fid, "dataset", check_comment, (size_t)comment_len+1, H5P_DEFAULT);
    CHECK(len, FAIL, "H5Oget_comment_by_name");

    ret_value = HDstrcmp(dset_comment, check_comment);
    VERIFY(ret_value, 0, "H5Oget_comment_by_name");

    /* Close the IDs */
    ret = H5Gclose(grp);
    CHECK(ret, FAIL, "H5Gclose");

    /* Close the file */
    ret = H5Fclose(fid);
    CHECK(ret, FAIL, "H5Fclose");

} /* test_h5o_comment_by_name() */


/****************************************************************
**
**  test_h5o_getinfo_same_file():  Test that querying the object info for
**      objects in the same file will return the same file "number"
**
****************************************************************/
static void
test_h5o_getinfo_same_file(void)
{
    hid_t       fid1, fid2;             /* HDF5 File ID */
    hid_t       gid1, gid2;             /* Group IDs */
    H5O_info_t	oinfo1, oinfo2;         /* Object info structs */
    herr_t      ret;                    /* Value returned from API calls */

    /* Create a new HDF5 file */
    fid1 = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(fid1, FAIL, "H5Fcreate");

    /* Create two groups in the file */
    gid1 = H5Gcreate2(fid1, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(gid1, FAIL, "H5Gcreate2");
    gid2 = H5Gcreate2(fid1, "group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(gid2, FAIL, "H5Gcreate2");

    /* Reset object info */
    HDmemset(&oinfo1, 0, sizeof(oinfo1));
    HDmemset(&oinfo2, 0, sizeof(oinfo2));

    /* Query the object info for each object, through group IDs */
    ret = H5Oget_info2(gid1, &oinfo1, H5O_INFO_BASIC);
    CHECK(ret, FAIL, "H5Oget_info");
    ret = H5Oget_info2(gid2, &oinfo2, H5O_INFO_BASIC);
    CHECK(ret, FAIL, "H5Oget_info");

    VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info");

    /* Reset object info */
    HDmemset(&oinfo1, 0, sizeof(oinfo1));
    HDmemset(&oinfo2, 0, sizeof(oinfo2));

    /* Query the object info for each object, by name */
    ret = H5Oget_info_by_name2(fid1, "group1", &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    ret = H5Oget_info_by_name2(fid1, "group2", &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");

    VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info");

    /* Close everything */
    ret = H5Gclose(gid1);
    CHECK(ret, FAIL, "H5Gclose");
    ret = H5Gclose(gid2);
    CHECK(ret, FAIL, "H5Gclose");
    ret = H5Fclose(fid1);
    CHECK(ret, FAIL, "H5Fclose");


    /* Open file twice */
    fid1 = H5Fopen(TEST_FILENAME, H5F_ACC_RDWR, H5P_DEFAULT);
    CHECK(fid1, FAIL, "H5Fopen");
    fid2 = H5Fopen(TEST_FILENAME, H5F_ACC_RDWR, H5P_DEFAULT);
    CHECK(fid2, FAIL, "H5Fopen");

    /* Open the two groups in the file */
    gid1 = H5Gopen2(fid1, "group1", H5P_DEFAULT);
    CHECK(gid1, FAIL, "H5Gopen2");
    gid2 = H5Gopen2(fid2, "group2", H5P_DEFAULT);
    CHECK(gid2, FAIL, "H5Gopen2");

    /* Reset object info */
    HDmemset(&oinfo1, 0, sizeof(oinfo1));
    HDmemset(&oinfo2, 0, sizeof(oinfo2));

    /* Query the object info for each object, through group IDs */
    ret = H5Oget_info2(gid1, &oinfo1, H5O_INFO_BASIC);
    CHECK(ret, FAIL, "H5Oget_info");
    ret = H5Oget_info2(gid2, &oinfo2, H5O_INFO_BASIC);
    CHECK(ret, FAIL, "H5Oget_info");

    VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info");

    /* Reset object info */
    HDmemset(&oinfo1, 0, sizeof(oinfo1));
    HDmemset(&oinfo2, 0, sizeof(oinfo2));

    /* Query the object info for each object, by name */
    ret = H5Oget_info_by_name2(fid1, "group1", &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    ret = H5Oget_info_by_name2(fid1, "group2", &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");

    VERIFY(oinfo1.fileno, oinfo2.fileno, "file number from H5Oget_info");

    /* Close everything */
    ret = H5Gclose(gid1);
    CHECK(ret, FAIL, "H5Gclose");
    ret = H5Gclose(gid2);
    CHECK(ret, FAIL, "H5Gclose");
    ret = H5Fclose(fid1);
    CHECK(ret, FAIL, "H5Fclose");
    ret = H5Fclose(fid2);
    CHECK(ret, FAIL, "H5Fclose");

} /* test_h5o_getinfo_same_file() */

#ifndef H5_NO_DEPRECATED_SYMBOLS

/****************************************************************
**
**  visit_obj_cb():
**      This is the callback function invoked by H5Ovisit1() in 
**      test_h5o_getinfo_visit():
**      --Verify that the object info returned to the callback
**        function is the same as H5Oget_info2().
**
****************************************************************/
static int
visit_obj_cb(hid_t group_id, const char *name, const H5O_info_t *oinfo1,
    void H5_ATTR_UNUSED *_op_data)
{
    H5O_info_t oinfo2;  /* Object info structs */

    /* Verify the object info for "group1", "group2" and the root group */
    if(!(HDstrcmp(name, "group1"))) {
        H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_NUM_ATTRS, H5P_DEFAULT);
        VERIFY(oinfo1->num_attrs, oinfo2.num_attrs, "obj info from H5Ovisit1");
    } else if(!(HDstrcmp(name, "group2"))) {
        H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_HDR, H5P_DEFAULT);
        VERIFY(oinfo1->hdr.nmesgs, oinfo2.hdr.nmesgs, "obj info from H5Ovisit1/H5Oget_info2");
        VERIFY(oinfo1->hdr.nchunks, oinfo2.hdr.nchunks, "obj info from H5Ovisit1/H5Oget_info2");
    } else if(!(HDstrcmp(name, "."))) {
        H5Oget_info_by_name2(group_id, name, &oinfo2, H5O_INFO_META_SIZE, H5P_DEFAULT);
        VERIFY(oinfo1->meta_size.obj.index_size, oinfo2.meta_size.obj.index_size, "obj info from H5Ovisit1/H5Oget_info2");
        VERIFY(oinfo1->meta_size.obj.heap_size, oinfo2.meta_size.obj.heap_size, "obj info from H5Ovisit1/H5Oget_info2");
    }

    return(H5_ITER_CONT);
} /* end visit_obj_cb() */


/****************************************************************
**
**  test_h5o_getinfo_visit():  
**    Verify that the object info returned via H5Oget_info1()
**    and H5Oget_info2() are the same.
**    Verify that the object info retrieved via H5Ovisit1() is
**    the same as H5Oget_info2().
**
****************************************************************/
static void
test_h5o_getinfo_visit(void)
{
    hid_t fid = -1;             /* HDF5 File ID */
    hid_t gid1 = -1, gid2 = -1; /* Group IDs */
    hid_t sid = -1;             /* Dataspace ID */
    hid_t aid = -1;             /* Attribute ID */
    H5O_info_t oinfo1, oinfo2;  /* Object info structs */
    char attrname[25];          /* Attribute name */
    int j;                      /* Local index variable */
    herr_t ret;                 /* Value returned from API calls */

    /* Create an HDF5 file */
    fid = H5Fcreate(TEST_FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(fid, FAIL, "H5Fcreate");

    /* Create "group1" in the file */
    gid1 = H5Gcreate2(fid, "group1", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(gid1, FAIL, "H5Gcreate2");

    /* Create dataspace */
    sid = H5Screate(H5S_SCALAR);
    CHECK(sid, FAIL, "H5Screate");

    /* Attach 10 attributes to "group1" */
    for(j = 0; j <10; j++) {
        /* Create the attribute name */
        sprintf(attrname, "attr%u", j);
        /* Create the attribute */
        aid = H5Acreate2(gid1, attrname, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT);
        CHECK(aid, FAIL, "H5Acreate2");
        /* Close the attribute */
        ret = H5Aclose(aid);
        CHECK(ret, FAIL, "H5Aclose");
    }

    /* Create "group2" in the file */
    gid2 = H5Gcreate2(fid, "group2", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
    CHECK(gid2, FAIL, "H5Gcreate2");

    /* Reset object info */
    HDmemset(&oinfo1, 0, sizeof(oinfo1));
    HDmemset(&oinfo2, 0, sizeof(oinfo2));

    /* Query the object info for "group1" via H5Oget_info1 and H5Oget_info2 */
    ret = H5Oget_info1(gid1, &oinfo1);
    CHECK(ret, FAIL, "H5Oget_info");
    ret = H5Oget_info2(gid1, &oinfo2, H5O_INFO_BASIC|H5O_INFO_NUM_ATTRS);
    CHECK(ret, FAIL, "H5Oget_info");

    /* Verify the object info for "group1" is correct */
    VERIFY(oinfo1.fileno, oinfo2.fileno, "obj info from H5Oget_info1/2");
    VERIFY(oinfo1.num_attrs, oinfo2.num_attrs, "obj info from H5Oget_info1/2");

    /* Reset object info */
    HDmemset(&oinfo1, 0, sizeof(oinfo1));
    HDmemset(&oinfo2, 0, sizeof(oinfo2));

    /* Query the object info for "group2" via H5Oget_info1 and H5Oget_info2 */
    ret = H5Oget_info_by_name1(fid, "group2", &oinfo1, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");
    ret = H5Oget_info_by_name2(fid, "group2", &oinfo2, H5O_INFO_HDR|H5O_INFO_META_SIZE, H5P_DEFAULT);
    CHECK(ret, FAIL, "H5Oget_info_by_name");

    /* Verify the object info for "group2" is correct */
    VERIFY(oinfo1.hdr.nmesgs, oinfo2.hdr.nmesgs, "obj info from H5Oget_info1/2");
    VERIFY(oinfo1.hdr.nchunks, oinfo2.hdr.nchunks, "obj info from H5Oget_info1/2");
    VERIFY(oinfo1.meta_size.obj.index_size, oinfo2.meta_size.obj.index_size, "obj info from H5Oget_info1/2");
    VERIFY(oinfo1.meta_size.obj.heap_size, oinfo2.meta_size.obj.heap_size, "obj info from H5Oget_info1/2");

    /* Close everything */
    ret = H5Gclose(gid1);
    CHECK(ret, FAIL, "H5Gclose");
    ret = H5Gclose(gid2);
    CHECK(ret, FAIL, "H5Gclose");

    /* Verify the object info returned to the callback function is correct */
    ret = H5Ovisit1(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, NULL);

    /* Close the file */
    ret = H5Fclose(fid);
    CHECK(ret, FAIL, "H5Fclose");

} /* test_h5o_getinfo_visit() */

#endif /* H5_NO_DEPRECATED_SYMBOLS */


/****************************************************************
**
**  test_h5o(): Main H5O (generic object) testing routine.
**
****************************************************************/
void
test_h5o(void)
{
    /* Output message about test being performed */
    MESSAGE(5, ("Testing Objects\n"));

    test_h5o_open();		/* Test generic open function */
    test_h5o_open_by_addr();	/* Test opening objects by address */
    test_h5o_close();		/* Test generic close function */
    test_h5o_refcount();        /* Test incrementing and decrementing reference count */
    test_h5o_plist();           /* Test object creation properties */
    test_h5o_link();            /* Test object link routine */
    test_h5o_comment();         /* Test routines for comment */
    test_h5o_comment_by_name(); /* Test routines for comment by name */
    test_h5o_getinfo_same_file(); /* Test info for objects in the same file */
#ifndef H5_NO_DEPRECATED_SYMBOLS
    test_h5o_getinfo_visit();   /* Test object info for H5Oget_info1/2 and H5Ovisit1 */
#endif
} /* test_h5o() */


/*-------------------------------------------------------------------------
 * Function:	cleanup_h5o
 *
 * Purpose:	Cleanup temporary test files
 *
 * Return:	none
 *
 * Programmer:	James Laird
 *              June 3, 2006
 *
 *-------------------------------------------------------------------------
 */
void
cleanup_h5o(void)
{
    remove(TEST_FILENAME);
}