diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-01-27 15:26:05 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-01-27 15:26:05 (GMT) |
commit | 2cbd7f1b3cd50d21279ef81093632cb7bf6f97ea (patch) | |
tree | 02a4d0547091bfd3d50de4a88c03d8f841e0d524 | |
parent | f7ae23e639951e27b1b02d4ce1ba65a8b77963d2 (diff) | |
download | hdf5-2cbd7f1b3cd50d21279ef81093632cb7bf6f97ea.zip hdf5-2cbd7f1b3cd50d21279ef81093632cb7bf6f97ea.tar.gz hdf5-2cbd7f1b3cd50d21279ef81093632cb7bf6f97ea.tar.bz2 |
[svn-r16357] Description:
Bring r16307:16347 back from trunk into revise_chunks branch
Tested on:
FreeBSD/32 6.3 (duty)
(h5committest not required on this branch)
44 files changed, 873 insertions, 262 deletions
@@ -1,4 +1,4 @@ -HDF5 version 1.9.27 currently under development +HDF5 version 1.9.29 currently under development ==> README.txt <== Messages to be sent to the list should be sent to "<list>@hdfgroup.org". diff --git a/bin/COPYING b/bin/COPYING index ef0cbaf..6903daf 100755 --- a/bin/COPYING +++ b/bin/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. diff --git a/c++/COPYING b/c++/COPYING index ef0cbaf..6903daf 100755 --- a/c++/COPYING +++ b/c++/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. diff --git a/config/COPYING b/config/COPYING index ef0cbaf..6903daf 100755 --- a/config/COPYING +++ b/config/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. diff --git a/config/craynv b/config/craynv index ec88a77..9371ac3 100644 --- a/config/craynv +++ b/config/craynv @@ -21,7 +21,7 @@ # Disabling Dependency Tracking # --------------------- # -# The Cray X1 machines that THG tests on seem to have trouble doing +# The Cray X1 machines that The HDF Group tests on seem to have trouble doing # dependency tracking (probably because they use Cray's C++ compiler, # which autoconf may not recognize). Until this is fixed by autoconf # or a user complains, disable dependency tracking on Crays. diff --git a/config/lt_vers.am b/config/lt_vers.am index 72af096..64bacbe 100644 --- a/config/lt_vers.am +++ b/config/lt_vers.am @@ -17,7 +17,7 @@ # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 17 +LT_VERS_REVISION = 19 LT_VERS_AGE = 0 ## If the API changes *at all*, increment LT_VERS_INTERFACE and @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.in Id: configure.in 16305 2009-01-14 13:10:53Z koziol . +# From configure.in Id: configure.in 16329 2009-01-18 11:04:40Z hdftest . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for HDF5 1.9.27. +# Generated by GNU Autoconf 2.61 for HDF5 1.9.29. # # Report bugs to <help@hdfgroup.org>. # @@ -724,8 +724,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.9.27' -PACKAGE_STRING='HDF5 1.9.27' +PACKAGE_VERSION='1.9.29' +PACKAGE_STRING='HDF5 1.9.29' PACKAGE_BUGREPORT='help@hdfgroup.org' ac_unique_file="src/H5.c" @@ -1501,7 +1501,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.9.27 to adapt to many kinds of systems. +\`configure' configures HDF5 1.9.29 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1571,7 +1571,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.9.27:";; + short | recursive ) echo "Configuration of HDF5 1.9.29:";; esac cat <<\_ACEOF @@ -1753,7 +1753,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.9.27 +HDF5 configure 1.9.29 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1767,7 +1767,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.9.27, which was +It was created by HDF5 $as_me 1.9.29, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ @@ -2462,7 +2462,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.9.27' + VERSION='1.9.29' cat >>confdefs.h <<_ACEOF @@ -51948,7 +51948,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.9.27, which was +This file was extended by HDF5 $as_me 1.9.29, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -52001,7 +52001,7 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -HDF5 config.status 1.9.27 +HDF5 config.status 1.9.29 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.in b/configure.in index ee19951..05cd52d 100644 --- a/configure.in +++ b/configure.in @@ -26,7 +26,7 @@ dnl dnl NOTE: Don't forget to change the version number here when we do a dnl release!!! dnl -AC_INIT([HDF5], [1.9.27], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.9.29], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AM_CONFIG_HEADER([src/H5config.h]) diff --git a/fortran/COPYING b/fortran/COPYING index ef0cbaf..6903daf 100755 --- a/fortran/COPYING +++ b/fortran/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. diff --git a/hl/c++/COPYING b/hl/c++/COPYING index ef0cbaf..6903daf 100755 --- a/hl/c++/COPYING +++ b/hl/c++/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. diff --git a/hl/fortran/COPYING b/hl/fortran/COPYING index ef0cbaf..6903daf 100755 --- a/hl/fortran/COPYING +++ b/hl/fortran/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. diff --git a/hl/src/COPYING b/hl/src/COPYING index ef0cbaf..6903daf 100755 --- a/hl/src/COPYING +++ b/hl/src/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. diff --git a/hl/test/COPYING b/hl/test/COPYING index ef0cbaf..6903daf 100755 --- a/hl/test/COPYING +++ b/hl/test/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. diff --git a/hl/tools/COPYING b/hl/tools/COPYING index ef0cbaf..6903daf 100755 --- a/hl/tools/COPYING +++ b/hl/tools/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. diff --git a/perform/COPYING b/perform/COPYING index ef0cbaf..6903daf 100755 --- a/perform/COPYING +++ b/perform/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. diff --git a/release_docs/COPYING b/release_docs/COPYING index ef0cbaf..6903daf 100755 --- a/release_docs/COPYING +++ b/release_docs/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 51320d0..230cb8c 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.9.27 currently under development +HDF5 version 1.9.29 currently under development ================================================================================ @@ -10,8 +10,8 @@ tested and known problems in HDF5-1.9.x. For more details check the HISTORY*.txt files in the HDF5 source. -Links to HDF5 1.9.x source code can be found on THG's development -FTP server at the following location: +Links to HDF5 1.9.x source code can be found on The HDF Group's +development FTP server at the following location: ftp://ftp.hdfgroup.uiuc.edu/pub/outgoing/hdf5/snapshots User documentation for the snapshot can be accessed directly at this location: http://www.hdfgroup.uiuc.edu/HDF5/doc_dev_snapshot/H5_dev/ @@ -141,40 +141,42 @@ Bug Fixes since HDF5-1.8.0 release Library ------- + - Fixed a bug where H5Tpack wouldn't remove trailing space from an + otherwise packed compound type. (NAF - 2009/01/14) - Fixed up some old v2 btree assertions that get run in debug mode that were previously failing on compilation, and removed some of the more heavily outdated and non-rewritable ones. (MAM - 2008/12/15) - Fixed a bug that could cause problems when "automatically" unmounting - multiple files. (NAF - 2008/11/17) + multiple files. (NAF - 2008/11/17) - H5Ovisit and H5Ovisit_by_name will now properly terminate when the callback function returns a positive value on the starting object. (NAF - 2008/11/03) - Fixed an error where a null message could be created that was larger - than could be written to the file. (NAF - 2008/10/23) + than could be written to the file. (NAF - 2008/10/23) - Corrected error with family/split/multi VFD not updating driver info when "latest" version of the file format used. (QAK - 2008/10/14) - Corrected alignment+threshold errors to work correctly when metadata aggregation is enabled. (QAK - 2008/10/06) - Changed H5Fget_obj_count and H5Fget_obj_ids to ignore objects registered - by the library for internal library use. (NAF - 2008/10/06) + by the library for internal library use. (NAF - 2008/10/06) - Fixed potential memory leak during compound conversion. (NAF - 2008/10/06) - Changed the return value of H5Fget_obj_count from INT to SSIZE_T. Also changed the return value of H5Fget_obj_ids from HERR_T to SSIZE_T and the type of the parameter MAX_OBJS from INT to SIZE_T. (SLU - 2008/09/26) - Fixed an issue that could cause data to be improperly overwritten - during compound type conversion. (NAF - 2008/09/19) + during compound type conversion. (NAF - 2008/09/19) - Fixed pointer alignment violations that could occur during vlen - conversion. (NAF - 2008/09/16) + conversion. (NAF - 2008/09/16) - Fixed problem where library could cause a segmentation fault when an invalid location ID was given to H5Giterate(). (QAK - 2008/08/19) - Fixed improper shutdown when objects have reference count > 1. The library now tracks reference count due to the application separately - from that due to internal library routines. (NAF - 2008/08/19) + from that due to internal library routines. (NAF - 2008/08/19) - Fixed assertion failure caused by incorrect array datatype version. (NAF - 2008/08/08) - Fixed an issue where mount point traversal would fail when using - multiple handles for the child. (NAF - 2008/08/07) + multiple handles for the child. (NAF - 2008/08/07) - Fixed an issue where mount points were inaccessible when using multiple file handles for the parent. The mount table is now in the shared file structure (the parent pointer is still in the top structure). diff --git a/src/COPYING b/src/COPYING index ef0cbaf..6903daf 100755 --- a/src/COPYING +++ b/src/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. @@ -600,6 +600,8 @@ done: "The HDF5 header files used to compile this application do not match\n" \ "the version used by the HDF5 library to which this application is linked.\n" \ "Data corruption or segmentation faults may occur if the application continues.\n" \ + "This can happen when an application was compiled by one version of HDF5 but\n" \ + "linked with a different version of static or shared HDF5 library.\n" \ "You should recompile the application or check your shared library related\n" \ "settings such as 'LD_LIBRARY_PATH'.\n" @@ -541,6 +541,11 @@ if ( ( (entry_ptr) == NULL ) || \ * Updated H5C__UPDATE_STATS_FOR_PROTECT() to keep stats on * read and write protects. * + * MAM -- 1/15/09 + * Created H5C__UPDATE_MAX_INDEX_SIZE_STATS to contain + * common code within macros that update the maximum + * index, clean_index, and dirty_index statistics fields. + * ***********************************************************************/ #define H5C__UPDATE_CACHE_HIT_RATE_STATS(cache_ptr, hit) \ @@ -551,6 +556,18 @@ if ( ( (entry_ptr) == NULL ) || \ #if H5C_COLLECT_CACHE_STATS +#define H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ + if ( (cache_ptr)->index_size > (cache_ptr)->max_index_size ) \ + (cache_ptr)->max_index_size = (cache_ptr)->index_size; \ + if ( (cache_ptr)->clean_index_size > \ + (cache_ptr)->max_clean_index_size ) \ + (cache_ptr)->max_clean_index_size = \ + (cache_ptr)->clean_index_size; \ + if ( (cache_ptr)->dirty_index_size > \ + (cache_ptr)->max_dirty_index_size ) \ + (cache_ptr)->max_dirty_index_size = \ + (cache_ptr)->dirty_index_size; + #define H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr) \ (((cache_ptr)->dirty_pins)[(entry_ptr)->type->id])++; @@ -582,16 +599,7 @@ if ( ( (entry_ptr) == NULL ) || \ } \ if ( (entry_ptr)->size < (new_size) ) { \ ((cache_ptr)->size_increases[(entry_ptr)->type->id])++; \ - if ( (cache_ptr)->index_size > (cache_ptr)->max_index_size ) \ - (cache_ptr)->max_index_size = (cache_ptr)->index_size; \ - if ( (cache_ptr)->clean_index_size > \ - (cache_ptr)->max_clean_index_size ) \ - (cache_ptr)->max_clean_index_size = \ - (cache_ptr)->clean_index_size; \ - if ( (cache_ptr)->dirty_index_size > \ - (cache_ptr)->max_dirty_index_size ) \ - (cache_ptr)->max_dirty_index_size = \ - (cache_ptr)->dirty_index_size; \ + H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \ (cache_ptr)->max_slist_size = (cache_ptr)->slist_size; \ if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \ @@ -686,16 +694,7 @@ if ( ( (entry_ptr) == NULL ) || \ } \ if ( (cache_ptr)->index_len > (cache_ptr)->max_index_len ) \ (cache_ptr)->max_index_len = (cache_ptr)->index_len; \ - if ( (cache_ptr)->index_size > (cache_ptr)->max_index_size ) \ - (cache_ptr)->max_index_size = (cache_ptr)->index_size; \ - if ( (cache_ptr)->clean_index_size > \ - (cache_ptr)->max_clean_index_size ) \ - (cache_ptr)->max_clean_index_size = \ - (cache_ptr)->clean_index_size; \ - if ( (cache_ptr)->dirty_index_size > \ - (cache_ptr)->max_dirty_index_size ) \ - (cache_ptr)->max_dirty_index_size = \ - (cache_ptr)->dirty_index_size; \ + H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ if ( (cache_ptr)->slist_len > (cache_ptr)->max_slist_len ) \ (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \ if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \ @@ -723,16 +722,7 @@ if ( ( (entry_ptr) == NULL ) || \ } \ if ( (cache_ptr)->index_len > (cache_ptr)->max_index_len ) \ (cache_ptr)->max_index_len = (cache_ptr)->index_len; \ - if ( (cache_ptr)->index_size > (cache_ptr)->max_index_size ) \ - (cache_ptr)->max_index_size = (cache_ptr)->index_size; \ - if ( (cache_ptr)->clean_index_size > \ - (cache_ptr)->max_clean_index_size ) \ - (cache_ptr)->max_clean_index_size = \ - (cache_ptr)->clean_index_size; \ - if ( (cache_ptr)->dirty_index_size > \ - (cache_ptr)->max_dirty_index_size ) \ - (cache_ptr)->max_dirty_index_size = \ - (cache_ptr)->dirty_index_size; \ + H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ if ( (cache_ptr)->pl_len > (cache_ptr)->max_pl_len ) \ (cache_ptr)->max_pl_len = (cache_ptr)->pl_len; \ if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \ @@ -783,16 +773,7 @@ if ( ( (entry_ptr) == NULL ) || \ } \ if ( (cache_ptr)->index_len > (cache_ptr)->max_index_len ) \ (cache_ptr)->max_index_len = (cache_ptr)->index_len; \ - if ( (cache_ptr)->index_size > (cache_ptr)->max_index_size ) \ - (cache_ptr)->max_index_size = (cache_ptr)->index_size; \ - if ( (cache_ptr)->clean_index_size > \ - (cache_ptr)->max_clean_index_size ) \ - (cache_ptr)->max_clean_index_size = \ - (cache_ptr)->clean_index_size; \ - if ( (cache_ptr)->dirty_index_size > \ - (cache_ptr)->max_dirty_index_size ) \ - (cache_ptr)->max_dirty_index_size = \ - (cache_ptr)->dirty_index_size; \ + H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ if ( (cache_ptr)->slist_len > (cache_ptr)->max_slist_len ) \ (cache_ptr)->max_slist_len = (cache_ptr)->slist_len; \ if ( (cache_ptr)->slist_size > (cache_ptr)->max_slist_size ) \ @@ -815,16 +796,7 @@ if ( ( (entry_ptr) == NULL ) || \ } \ if ( (cache_ptr)->index_len > (cache_ptr)->max_index_len ) \ (cache_ptr)->max_index_len = (cache_ptr)->index_len; \ - if ( (cache_ptr)->index_size > (cache_ptr)->max_index_size ) \ - if ( (cache_ptr)->clean_index_size > \ - (cache_ptr)->max_clean_index_size ) \ - (cache_ptr)->max_clean_index_size = \ - (cache_ptr)->clean_index_size; \ - if ( (cache_ptr)->dirty_index_size > \ - (cache_ptr)->max_dirty_index_size ) \ - (cache_ptr)->max_dirty_index_size = \ - (cache_ptr)->dirty_index_size; \ - (cache_ptr)->max_index_size = (cache_ptr)->index_size; \ + H5C__UPDATE_MAX_INDEX_SIZE_STATS(cache_ptr) \ if ( (cache_ptr)->pl_len > (cache_ptr)->max_pl_len ) \ (cache_ptr)->max_pl_len = (cache_ptr)->pl_len; \ if ( (cache_ptr)->pl_size > (cache_ptr)->max_pl_size ) \ @@ -901,7 +873,6 @@ if ( ( (cache_ptr) == NULL ) || \ ( (cache_ptr)->index_size != \ ((cache_ptr)->clean_index_size + \ (cache_ptr)->dirty_index_size) ) ) { \ - HDassert(0); /* JRM */ \ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, fail_val, \ "Pre HT insert SC failed") \ } @@ -927,7 +898,6 @@ if ( ( (cache_ptr) == NULL ) || \ ( (cache_ptr)->index_size != \ ((cache_ptr)->clean_index_size + \ (cache_ptr)->dirty_index_size) ) ) { \ - HDassert(0); /* JRM */ \ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Pre HT remove SC failed") \ } @@ -983,18 +953,18 @@ if ( ( (cache_ptr) == NULL ) || \ ( (new_size) <= 0 ) || \ ( ( (cache_ptr)->index_len == 1 ) && \ ( (cache_ptr)->index_size != (old_size) ) ) || \ + ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + \ + (cache_ptr)->dirty_index_size) ) || \ + ( (entry_ptr == NULL) ) || \ + ( ( !( was_clean ) || \ + ( (cache_ptr)->clean_index_size < (old_size) ) ) && \ + ( ( (was_clean) ) || \ + ( (cache_ptr)->dirty_index_size < (old_size) ) ) ) \ ( (entry_ptr) == NULL ) ) { \ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ "Pre HT entry size change SC failed") \ -} \ -HDassert( (cache_ptr)->index_size == \ - ((cache_ptr)->clean_index_size + \ - (cache_ptr)->dirty_index_size) ); \ -HDassert( (entry_ptr) != NULL ); \ -HDassert( ( ( was_clean ) && \ - ( (cache_ptr)->clean_index_size >= (old_size) ) ) || \ - ( ( ! (was_clean) ) && \ - ( (cache_ptr)->dirty_index_size >= (old_size) ) ) ); +} #define H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \ entry_ptr) \ @@ -1002,57 +972,62 @@ if ( ( (cache_ptr) == NULL ) || \ ( (cache_ptr)->index_len <= 0 ) || \ ( (cache_ptr)->index_size <= 0 ) || \ ( (new_size) > (cache_ptr)->index_size ) || \ + ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + \ + (cache_ptr)->dirty_index_size) ) || \ + ( ( !((entry_ptr)->is_dirty ) || \ + ( (cache_ptr)->dirty_index_size < (new_size) ) ) && \ + ( ( ((entry_ptr)->is_dirty) ) || \ + ( (cache_ptr)->clean_index_size < (new_size) ) ) ) \ ( ( (cache_ptr)->index_len == 1 ) && \ ( (cache_ptr)->index_size != (new_size) ) ) ) { \ HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ "Post HT entry size change SC failed") \ -} \ -HDassert( (cache_ptr)->index_size == \ - ((cache_ptr)->clean_index_size + \ - (cache_ptr)->dirty_index_size) ); \ -HDassert( ( ( (entry_ptr)->is_dirty ) && \ - ( (cache_ptr)->dirty_index_size >= (new_size) ) ) || \ - ( ( ! ((entry_ptr)->is_dirty) ) && \ - ( (cache_ptr)->clean_index_size >= (new_size) ) ) ); - -#define H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr) \ -{ \ - HDassert( (cache_ptr) != NULL ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (cache_ptr)->index_len > 0 ); \ - HDassert( (entry_ptr) != NULL ); \ - HDassert( (entry_ptr)->is_dirty == FALSE ); \ - HDassert( (cache_ptr)->index_size >= (entry_ptr)->size ); \ - HDassert( (cache_ptr)->dirty_index_size >= (entry_ptr)->size ); \ - HDassert( (cache_ptr)->index_size == \ - ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ); \ -} -/* JRM */ -#define H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr) \ -{ \ - HDassert( (cache_ptr) != NULL ); \ - HDassert( (cache_ptr)->magic == H5C__H5C_T_MAGIC ); \ - HDassert( (cache_ptr)->index_len > 0 ); \ - HDassert( (entry_ptr) != NULL ); \ - HDassert( (entry_ptr)->is_dirty == TRUE ); \ - HDassert( (cache_ptr)->index_size >= (entry_ptr)->size ); \ - HDassert( (cache_ptr)->clean_index_size >= (entry_ptr)->size ); \ - HDassert( (cache_ptr)->index_size == \ - ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ); \ +} + +#define H5C__PRE_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr) \ +if ( \ + ( (cache_ptr) == NULL ) || \ + ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ + ( (cache_ptr)->index_len <= 0 ) || \ + ( (entry_ptr) == NULL ) || \ + ( (entry_ptr)->is_dirty != FALSE ) || \ + ( (cache_ptr)->index_size < (entry_ptr)->size ) || \ + ( (cache_ptr)->dirty_index_size < (entry_ptr)->size ) || \ + ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "Pre HT update for entry clean SC failed") \ } -#define H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr) \ -{ \ - HDassert( (cache_ptr)->index_size == \ - ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ); \ +#define H5C__PRE_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr) \ +if ( \ + ( (cache_ptr) == NULL ) || \ + ( (cache_ptr)->magic != H5C__H5C_T_MAGIC ) || \ + ( (cache_ptr)->index_len <= 0 ) || \ + ( (entry_ptr) == NULL ) || \ + ( (entry_ptr)->is_dirty != TRUE ) || \ + ( (cache_ptr)->index_size < (entry_ptr)->size ) || \ + ( (cache_ptr)->clean_index_size < (entry_ptr)->size ) || \ + ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "Pre HT update for entry dirty SC failed") \ } -#define H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr) \ -{ \ - HDassert( (cache_ptr)->index_size == \ - ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ); \ +#define H5C__POST_HT_UPDATE_FOR_ENTRY_CLEAN_SC(cache_ptr, entry_ptr) \ +if ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "Post HT update for entry clean SC failed") \ } +#define H5C__POST_HT_UPDATE_FOR_ENTRY_DIRTY_SC(cache_ptr, entry_ptr) \ +if ( (cache_ptr)->index_size != \ + ((cache_ptr)->clean_index_size + (cache_ptr)->dirty_index_size) ) { \ + HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, \ + "Post HT update for entry dirty SC failed") \ +} #else /* H5C_DO_SANITY_CHECKS */ diff --git a/src/H5Lexternal.c b/src/H5Lexternal.c index 2c6b3a3..8637429 100644 --- a/src/H5Lexternal.c +++ b/src/H5Lexternal.c @@ -121,6 +121,8 @@ H5L_getenv_prefix_name(char **env_prefix/*in,out*/) * * Programmer: Vailin Choi, April 2, 2008 * + * Modification: Raymond Lu, 14 Jan. 2009 + * Added support for OpenVMS pathname --------------------------------------------------------------------------*/ static herr_t H5L_build_name(char *prefix, char *file_name, char **full_name/*out*/) @@ -140,8 +142,10 @@ H5L_build_name(char *prefix, char *file_name, char **full_name/*out*/) /* Copy the prefix into the buffer */ HDstrcpy(*full_name, prefix); +#ifndef H5_VMS if (!CHECK_DELIMITER(prefix[prefix_len-1])) HDstrcat(*full_name, DIR_SEPS); +#endif /* Add the external link's filename to the prefix supplied */ HDstrcat(*full_name, file_name); @@ -2973,8 +2973,10 @@ H5T_create(H5T_class_t type, size_t size) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); dt->shared->type = type; - if(type==H5T_COMPOUND) + if(type==H5T_COMPOUND) { dt->shared->u.compnd.packed=TRUE; /* Start out packed */ + dt->shared->u.compnd.sorted=H5T_SORT_VALUE; /* Start out sorted by value */ + } /* end if */ else if(type==H5T_OPAQUE) /* Initialize the tag in case it's not set later. A null tag will * cause problems for later operations. */ @@ -3173,13 +3175,16 @@ H5T_copy(const H5T_t *old_dt, H5T_copy_t method) * name and type fields of each new member with copied values. * That is, H5T_copy() is a deep copy. */ - new_dt->shared->u.compnd.memb = H5MM_malloc(new_dt->shared->u.compnd.nalloc * - sizeof(H5T_cmemb_t)); - if (NULL==new_dt->shared->u.compnd.memb) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); - - HDmemcpy(new_dt->shared->u.compnd.memb, old_dt->shared->u.compnd.memb, - new_dt->shared->u.compnd.nmembs * sizeof(H5T_cmemb_t)); + /* Only malloc if space has been allocated for members - NAF */ + if(new_dt->shared->u.compnd.nalloc > 0) { + new_dt->shared->u.compnd.memb = H5MM_malloc(new_dt->shared->u.compnd.nalloc * + sizeof(H5T_cmemb_t)); + if (NULL==new_dt->shared->u.compnd.memb) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); + + HDmemcpy(new_dt->shared->u.compnd.memb, old_dt->shared->u.compnd.memb, + new_dt->shared->u.compnd.nmembs * sizeof(H5T_cmemb_t)); + } /* end if */ for(i = 0; i < new_dt->shared->u.compnd.nmembs; i++) { unsigned j; diff --git a/src/H5Tcompound.c b/src/H5Tcompound.c index d9b5974..02d6bd1 100644 --- a/src/H5Tcompound.c +++ b/src/H5Tcompound.c @@ -45,6 +45,11 @@ /******************/ /* Local Typedefs */ /******************/ +/* "Key" (+ user data) for bsearch callback */ +typedef struct{ + size_t offset; /* Offset of member to be added */ + const H5T_cmemb_t *max_under; /* Member with maximum offset seen that is not above "offset" */ +} H5T_insert_compar_t; /********************/ @@ -416,6 +421,48 @@ done: /*------------------------------------------------------------------------- + * Function: H5T_insert_compar + * + * Purpose: Callback function for bsearch called from H5T_insert. + * Reports whether obj has a lower of higher offset than + * that stored in key. Also keeps track of the highest + * offset seen that is not higher than that in key. + * + * Return: -1 if key < obj + * 0 if key == obj + * 1 if key > obj + * + * Programmer: Neil Fortner + * Wednesday, January 7, 1998 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static int +H5T_insert_compar(const void *_key, const void *_obj) +{ + H5T_insert_compar_t *key = *(H5T_insert_compar_t * const *)_key; /* User data */ + const H5T_cmemb_t *memb = (const H5T_cmemb_t *)_obj; /* Compound member being examined */ + int ret_value; /* Return value */ + + FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_insert_compar) + + if(key->offset > memb->offset) { + if(key->max_under == NULL || memb->offset > key->max_under->offset) + key->max_under = memb; + ret_value = 1; + } /* end if */ + else if(key->offset < memb->offset) + ret_value = -1; + else + ret_value = 0; /* Should not happen */ + + FUNC_LEAVE_NOAPI(ret_value) +} /* end H5T_insert_compar() */ + + +/*------------------------------------------------------------------------- * Function: H5T_insert * * Purpose: Adds a new MEMBER to the compound datatype PARENT. The new @@ -435,6 +482,8 @@ H5T_insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member) { unsigned idx; /* Index of member to insert */ size_t total_size; + H5T_insert_compar_t key; /* Key for bsearch compare function */ + H5T_insert_compar_t *keyptr = &key; /* Pointer to key */ unsigned i; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ @@ -451,20 +500,39 @@ H5T_insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member) if(!HDstrcmp(parent->shared->u.compnd.memb[i].name, name)) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "member name is not unique") - /* Does the new member overlap any existing member ? */ total_size = member->shared->size; - for(i = 0; i < parent->shared->u.compnd.nmembs; i++) - if((offset <= parent->shared->u.compnd.memb[i].offset && - (offset + total_size) > parent->shared->u.compnd.memb[i].offset) || - (parent->shared->u.compnd.memb[i].offset <= offset && - (parent->shared->u.compnd.memb[i].offset + - parent->shared->u.compnd.memb[i].size) > offset)) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "member overlaps with another member") /* Does the new member overlap the end of the compound type? */ if((offset + total_size) > parent->shared->size) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "member extends past end of compound type") + if(parent->shared->u.compnd.sorted != H5T_SORT_VALUE) + if(H5T_sort_value(parent, NULL) < 0) + HGOTO_ERROR(H5E_INTERNAL, H5E_CANTCOMPARE, FAIL, "value sort failed") + + /* Find the position to insert the new member */ + if(parent->shared->u.compnd.nmembs == 0) + idx = 0; + else { + /* Key value (including user data) for compar callback */ + key.offset = offset; + key.max_under = NULL; + + /* Do a binary search on the offsets of the (now sorted) members. We do + * not expect to find an exact match (if we do it is an error), rely on + * the user data in the key to keep track of the closest member below + * the new member. */ + if(NULL != HDbsearch(&keyptr, parent->shared->u.compnd.memb, parent->shared->u.compnd.nmembs, + sizeof(parent->shared->u.compnd.memb[0]), H5T_insert_compar)) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "member overlaps with another member") + idx = (key.max_under == NULL) ? 0 : (unsigned) (key.max_under - parent->shared->u.compnd.memb + 1); + } /* end else */ + + /* Does the new member overlap any existing member ? */ + if((idx < parent->shared->u.compnd.nmembs && (offset + total_size) > parent->shared->u.compnd.memb[idx].offset) || + (idx && (parent->shared->u.compnd.memb[idx-1].offset + parent->shared->u.compnd.memb[idx-1].size) > offset)) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINSERT, FAIL, "member overlaps with another member") + /* Increase member array if necessary */ if(parent->shared->u.compnd.nmembs >= parent->shared->u.compnd.nalloc) { unsigned na = MAX(1, parent->shared->u.compnd.nalloc * 2); @@ -476,38 +544,68 @@ H5T_insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member) parent->shared->u.compnd.memb = x; } /* end if */ - /* Add member to end of member array */ - idx = parent->shared->u.compnd.nmembs; - parent->shared->u.compnd.memb[idx].name = H5MM_xstrdup(name); - parent->shared->u.compnd.memb[idx].offset = offset; - parent->shared->u.compnd.memb[idx].size = total_size; - parent->shared->u.compnd.memb[idx].type = H5T_copy(member, H5T_COPY_ALL); - - parent->shared->u.compnd.sorted = H5T_SORT_NONE; - parent->shared->u.compnd.nmembs++; - - /* Determine if the compound datatype stayed packed */ + /* Determine if the compound datatype stays packed */ if(parent->shared->u.compnd.packed) { /* Check if the member type is packed */ - if(H5T_is_packed(parent->shared->u.compnd.memb[idx].type) > 0) { + if(H5T_is_packed(member) > 0) { if(idx == 0) { /* If the is the first member, the datatype is not packed * if the first member isn't at offset 0 */ - if(parent->shared->u.compnd.memb[idx].offset > 0) + if(offset > 0) parent->shared->u.compnd.packed = FALSE; } /* end if */ else { /* If the is not the first member, the datatype is not * packed if the new member isn't adjoining the previous member */ - if(parent->shared->u.compnd.memb[idx].offset != (parent->shared->u.compnd.memb[idx - 1].offset + parent->shared->u.compnd.memb[idx - 1].size)) + if(offset != (parent->shared->u.compnd.memb[idx - 1].offset + parent->shared->u.compnd.memb[idx - 1].size)) parent->shared->u.compnd.packed = FALSE; } /* end else */ } /* end if */ else parent->shared->u.compnd.packed = FALSE; } /* end if */ + else + /* Check if inserting this member causes the parent to become packed */ + /* First check if it completely closes a gap */ + /* No need to check if it's being appended to the end */ + if(idx != parent->shared->u.compnd.nmembs + && (offset + total_size) == parent->shared->u.compnd.memb[idx].offset + && (idx == 0 ? offset == 0 : (parent->shared->u.compnd.memb[idx-1].offset + + parent->shared->u.compnd.memb[idx-1].size) == offset) + && H5T_is_packed(member) > 0) { + + /* Start out packed */ + parent->shared->u.compnd.packed = TRUE; + + /* Check if the entire type is now packed */ + if((idx != 0 && parent->shared->u.compnd.memb[0].offset != 0) + || !H5T_is_packed(parent->shared->u.compnd.memb[0].type)) + parent->shared->u.compnd.packed = FALSE; + else + for(i = 1; i < parent->shared->u.compnd.nmembs; i++) + if((i != idx && parent->shared->u.compnd.memb[i].offset + != (parent->shared->u.compnd.memb[i - 1].offset + + parent->shared->u.compnd.memb[i - 1].size)) + || !H5T_is_packed(parent->shared->u.compnd.memb[i].type)) { + parent->shared->u.compnd.packed = FALSE; + break; + } /* end if */ + } /* end if */ + + /* Reshape the memb array to accomodate the new member */ + if(idx != parent->shared->u.compnd.nmembs) + HDmemmove(&parent->shared->u.compnd.memb[idx+1], &parent->shared->u.compnd.memb[idx], + (parent->shared->u.compnd.nmembs - idx) * sizeof(parent->shared->u.compnd.memb[0])); + + /* Add member to member array */ + parent->shared->u.compnd.memb[idx].name = H5MM_xstrdup(name); + parent->shared->u.compnd.memb[idx].offset = offset; + parent->shared->u.compnd.memb[idx].size = total_size; + parent->shared->u.compnd.memb[idx].type = H5T_copy(member, H5T_COPY_ALL); + + parent->shared->u.compnd.nmembs++; /* Set the "force conversion" flag if the field's datatype indicates */ if(member->shared->force_conv == TRUE) @@ -631,8 +729,13 @@ H5T_is_packed(const H5T_t *dt) dt = dt->shared->parent; /* If this is a compound datatype, check if it is packed */ - if(dt->shared->type == H5T_COMPOUND) - ret_value = (htri_t)dt->shared->u.compnd.packed; + if(dt->shared->type == H5T_COMPOUND) { + H5T_compnd_t *compnd = &(dt->shared->u.compnd); /* Convenience pointer to compound info */ + ret_value = (htri_t)(compnd->packed && compnd->nmembs > 0 + && compnd->memb[compnd->nmembs - 1].offset + + compnd->memb[compnd->nmembs - 1].size + == dt->shared->size); + } /* end if */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_is_packed() */ diff --git a/src/H5private.h b/src/H5private.h index 63bbcf4..2f75f86 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1375,8 +1375,7 @@ extern char *strdup(const char *s); #define HDpthread_self_ulong() ((unsigned long)pthread_self()) #endif /* HDpthread_self_ulong */ - -#ifdef H5_HAVE_WINDOW_PATH +#if defined(H5_HAVE_WINDOW_PATH) /* directory delimiter for Windows: slash and backslash are acceptable on Windows */ #define DIR_SLASH_SEPC '/' @@ -1397,6 +1396,18 @@ extern char *strdup(const char *s); (ptr = slash); \ } +#elif defined(H5_HAVE_VMS_PATH) + +/* OpenVMS pathname: <disk name>$<partition>:[path]<file name> + * i.g. SYS$SYSUSERS:[LU.HDF5.SRC]H5system.c */ +#define DIR_SEPC '.' +#define DIR_SEPS "." +#define CHECK_DELIMITER(SS) (SS == DIR_SEPC) +#define CHECK_ABSOLUTE(NAME) (strrchr(NAME, ':') && strrchr(NAME, '[')) +#define CHECK_ABS_DRIVE(NAME) (0) +#define CHECK_ABS_PATH(NAME) (0) +#define GET_LAST_DELIMITER(NAME, ptr) ptr = strrchr(NAME, ']'); + #else #define DIR_SEPC '/' diff --git a/src/H5public.h b/src/H5public.h index cf9ff14..c1a8449 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -71,10 +71,10 @@ extern "C" { /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 9 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 27 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 29 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.9.27" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.9.29" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/H5system.c b/src/H5system.c index 8f91e2f..8956e9b 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -597,9 +597,12 @@ HDremove_all(const char *fname) * * Programmer: Vailin Choi * April 2, 2008 - * Modifications: 2nd Oct, 2008; Vailin Choi + * Modifications: 2nd Oct, 2008; Vailin Choi * Remove compiler warning for "if condition" - * + * + * Raymond Lu + * 14 Jan. 2009 + * Add support for OpenVMS pathname *------------------------------------------------------------------------- */ #define MAX_PATH_LEN 1024 @@ -620,6 +623,8 @@ H5_build_extpath(const char *name, char **extpath/*out*/) /* * Unix: name[0] is a "/" * Windows: name[0-2] is "<drive letter>:\" or "<drive-letter>:/" + * OpenVMS: <disk name>$<partition>:[path]<file name> + * i.g. SYS$SYSUSERS:[LU.HDF5.SRC]H5system.c */ if (CHECK_ABSOLUTE(name)) { if ((full_path=H5MM_strdup(name)) == NULL) @@ -634,6 +639,7 @@ H5_build_extpath(const char *name, char **extpath/*out*/) * Windows: name[0-1] is "<drive-letter>:" * Get current working directory on the drive specified in NAME * Unix: does not apply + * OpenVMS: does not apply */ if (CHECK_ABS_DRIVE(name)) { drive = name[0] - 'A' + 1; @@ -643,12 +649,13 @@ H5_build_extpath(const char *name, char **extpath/*out*/) * Windows: name[0] is a '/' or '\' * Get current drive * Unix: does not apply + * OpenVMS: does not apply */ } else if (CHECK_ABS_PATH(name) && ((drive=HDgetdrive()) != 0)) { sprintf(cwdpath, "%c:%c", (drive+'A'-1), name[0]); retcwd = cwdpath; HDstrcpy(new_name, &name[1]); - } else /* totally relative for both Unix and Windows: get current working directory */ + } else /* totally relative for Unix, Windows, and OpenVMS: get current working directory */ retcwd = HDgetcwd(cwdpath, MAX_PATH_LEN); if (retcwd != NULL) { @@ -659,9 +666,24 @@ H5_build_extpath(const char *name, char **extpath/*out*/) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed") HDstrcpy(full_path, cwdpath); +#ifdef H5_VMS + /* If the file name contains relative path, cut off the beginning bracket. Also cut off the + * ending bracket of CWDPATH to combine the full path name. i.g. + * cwdpath = SYS$SYSUSERS:[LU.HDF5.TEST] + * new_name = [.tmp]extlinks.h5 + * full_path = SYS$SYSUSERS:[LU.HDF5.TEST.tmp]extlinks.h5 + */ + if(new_name[0] == '[') { + char *tmp = new_name; + full_path[cwdlen-1] = '\0'; + HDstrcat(full_path, ++tmp); + } else + HDstrcat(full_path, new_name); +#else if (!CHECK_DELIMITER(cwdpath[cwdlen-1])) HDstrcat(full_path, DIR_SEPS); HDstrcat(full_path, new_name); +#endif } } diff --git a/src/Makefile.in b/src/Makefile.in index 8d71154..0a08832 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -408,7 +408,7 @@ CHECK_CLEANFILES = *.chkexe *.chklog *.clog # Add libtool shared library version numbers to the HDF5 library # See libtool versioning documentation online. LT_VERS_INTERFACE = 6 -LT_VERS_REVISION = 17 +LT_VERS_REVISION = 19 LT_VERS_AGE = 0 H5detect_CFLAGS = -g diff --git a/test/COPYING b/test/COPYING index ef0cbaf..6903daf 100755 --- a/test/COPYING +++ b/test/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. diff --git a/test/cache.c b/test/cache.c index 24c1f6c..8c1e328 100644 --- a/test/cache.c +++ b/test/cache.c @@ -23,11 +23,6 @@ #include "H5Iprivate.h" #include "H5ACprivate.h" #include "cache_common.h" -#include <sys/types.h> -#include <time.h> -#include <unistd.h> -#include <stdio.h> -#include <math.h> /* private function declarations: */ diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index c6ba30b..c05844e 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -23,6 +23,7 @@ #define H5T_PACKAGE #include "H5Tpkg.h" /*to turn off hardware conversions*/ +#include "H5Iprivate.h" #include "h5test.h" @@ -120,6 +121,7 @@ typedef struct { #define NX 100u #define NY 2000u +#define PACK_NMEMBS 100 /*------------------------------------------------------------------------- @@ -600,7 +602,7 @@ test_compound (char *filename, hid_t fapl) if ((s8_m_sid = H5Screate_simple (2, h_size, NULL)) < 0) goto error; /* Read the dataset */ - s8 = calloc ((size_t)(h_size[0]*h_size[1]), sizeof(s1_t)); + s8 = (s1_t *) calloc ((size_t)(h_size[0]*h_size[1]), sizeof(s1_t)); assert (s8); if (H5Dread (dataset, s1_tid, s8_m_sid, s8_f_sid, H5P_DEFAULT, s8) < 0) { goto error; @@ -767,7 +769,7 @@ test_compound (char *filename, hid_t fapl) f_offset[1] = NY/3; h_size[0] = 2*NX/3 - f_offset[0]; h_size[1] = 2*NY/3 - f_offset[1]; - s11 = malloc ((size_t)h_size[0]*(size_t)h_size[1]*sizeof(s4_t)); + s11 = (s4_t *) malloc ((size_t)h_size[0]*(size_t)h_size[1]*sizeof(s4_t)); assert (s11); /* Initialize */ @@ -1717,6 +1719,248 @@ error: return 1; } +/* Error macro that outputs the state of the randomly generated variables so the + * failure can be reproduced */ +#define PACK_OOO_ERROR \ +{ \ + int _i; \ + H5_FAILED(); AT(); \ + printf(" Insertion order ="); \ + for(_i=0; _i<PACK_NMEMBS; _i++) \ + printf(" %d", order[_i]); \ + printf("\n Inner compound order = %d, location = %d\n", sub_cmpd_order, order[sub_cmpd_order]); \ + fflush(stdout); \ + goto error; \ +} + + +/*------------------------------------------------------------------------- + * Function: test_pack_ooo + * + * Purpose: Test inserting fields into a compound out of offset order. + * Verifies that the compound + * + * Return: Success: 0 + * + * Failure: 1 + * + * Programmer: Neil Fortner + * Thursday, 22 January 2009 + * + * Modifications: + *------------------------------------------------------------------------- + */ +static int +test_pack_ooo(void) +{ + hid_t cmpd, sub_cmpd; /* Datatype IDs */ + H5T_t *dt; /* Datatype pointer */ + unsigned order[PACK_NMEMBS]; /* Order of insertion */ + unsigned free_order[PACK_NMEMBS]; /* Index of remaining free slots in order */ + unsigned num_free; /* Number of free slots in order */ + unsigned sub_cmpd_order; /* Order to insert the inner compound */ + char name[6]; /* Member name */ + unsigned i, j; /* Indices */ + + HDsrand((unsigned) time(NULL)); + + /* Initialize "free_order" array to indicate that all slots in order are + * free */ + for(i=0; i<PACK_NMEMBS; i++) + free_order[i] = i; + + /* Create "order" array */ + for(i=0; i<PACK_NMEMBS; i++) { + /* Generate index into free_order array */ + num_free = PACK_NMEMBS - i; + j = HDrand() % num_free; + + /* Update order array at the randomly generated (but guaranteed to be + * free) location */ + order[free_order[j]] = i; + + /* Reshape free_order to remove j (which is no longer free) */ + if(j < (num_free - 1)) + HDmemmove(&free_order[j], &free_order[j+1], (num_free - j - 1) * sizeof(free_order[0])); + } /* end for */ + + /* Generate order to insert inner compound type */ + sub_cmpd_order = HDrand() % PACK_NMEMBS; + + TESTING("random member insertion with empty compound subtype"); + + /* Create inner compound type. It will be empty for the first run */ + if((sub_cmpd = H5Tcreate(H5T_COMPOUND, 4)) < 0) PACK_OOO_ERROR + + /* Create main compound type, with extra space at the end */ + if((cmpd = H5Tcreate(H5T_COMPOUND, (4 * PACK_NMEMBS) + 1)) < 0) PACK_OOO_ERROR + + /* Insert the compound members in the random order previously generated */ + for(i=0; i<PACK_NMEMBS; i++) { + sprintf(name, "%05d", i); + if(i == sub_cmpd_order) { + if(H5Tinsert(cmpd, name, 4 * order[i], sub_cmpd) < 0) PACK_OOO_ERROR + } else + if(H5Tinsert(cmpd, name, 4 * order[i], H5T_STD_I32BE) < 0) PACK_OOO_ERROR + } /* end for */ + + /* Verify that the compound is not packed */ + if(NULL == (dt = (H5T_t *) H5I_object_verify(cmpd, H5I_DATATYPE))) PACK_OOO_ERROR + if(dt->shared->u.compnd.packed) PACK_OOO_ERROR + + /* Close the main compound */ + if(H5Tclose(cmpd) < 0) PACK_OOO_ERROR + + PASSED(); + + TESTING("random member insertion with full compound subtype"); + + /* Complete the inner compound type */ + if(H5Tinsert(sub_cmpd, "int", 0, H5T_STD_I32LE) < 0) PACK_OOO_ERROR + + /* Recreate main compound type */ + if((cmpd = H5Tcreate(H5T_COMPOUND, (4 * PACK_NMEMBS) + 1)) < 0) PACK_OOO_ERROR + + /* Insert the compound members in the random order previously generated */ + for(i=0; i<PACK_NMEMBS; i++) { + sprintf(name, "%05d", i); + if(i == sub_cmpd_order) { + if(H5Tinsert(cmpd, name, 4 * order[i], sub_cmpd) < 0) PACK_OOO_ERROR + } else + if(H5Tinsert(cmpd, name, 4 * order[i], H5T_STD_I32BE) < 0) PACK_OOO_ERROR + } /* end for */ + + /* Verify that the compound is packed */ + if(NULL == (dt = (H5T_t *) H5I_object_verify(cmpd, H5I_DATATYPE))) PACK_OOO_ERROR + if(!dt->shared->u.compnd.packed) PACK_OOO_ERROR + + /* Close */ + if(H5Tclose(cmpd) < 0) PACK_OOO_ERROR + if(H5Tclose(sub_cmpd) < 0) PACK_OOO_ERROR + + PASSED(); + + /* Change to reverse ordering, insert compound last */ + for(i=0; i<PACK_NMEMBS; i++) + order[i] = PACK_NMEMBS - i - 1; + sub_cmpd_order = PACK_NMEMBS - 1; + + TESTING("reverse member insertion with empty compound subtype"); + + /* Create inner compound type. It will be empty for the first run */ + if((sub_cmpd = H5Tcreate(H5T_COMPOUND, 4)) < 0) TEST_ERROR + + /* Create main compound type, with extra space at the end */ + if((cmpd = H5Tcreate(H5T_COMPOUND, (4 * PACK_NMEMBS) + 1)) < 0) TEST_ERROR + + /* Insert the compound members in the reverse order previously generated */ + for(i=0; i<PACK_NMEMBS; i++) { + sprintf(name, "%05d", i); + if(i == sub_cmpd_order) { + if(H5Tinsert(cmpd, name, 4 * order[i], sub_cmpd) < 0) TEST_ERROR + } else + if(H5Tinsert(cmpd, name, 4 * order[i], H5T_STD_I32BE) < 0) TEST_ERROR + } /* end for */ + + /* Verify that the compound is not packed */ + if(NULL == (dt = (H5T_t *) H5I_object_verify(cmpd, H5I_DATATYPE))) TEST_ERROR + if(dt->shared->u.compnd.packed) TEST_ERROR + + /* Close the main compound */ + if(H5Tclose(cmpd) < 0) TEST_ERROR + + PASSED(); + + TESTING("reverse member insertion with full compound subtype"); + + /* Complete the inner compound type */ + if(H5Tinsert(sub_cmpd, "int", 0, H5T_STD_I32LE) < 0) TEST_ERROR + + /* Recreate main compound type */ + if((cmpd = H5Tcreate(H5T_COMPOUND, (4 * PACK_NMEMBS) + 1)) < 0) TEST_ERROR + + /* Insert the compound members in the reverse order previously generated */ + for(i=0; i<PACK_NMEMBS; i++) { + sprintf(name, "%05d", i); + if(i == sub_cmpd_order) { + if(H5Tinsert(cmpd, name, 4 * order[i], sub_cmpd) < 0) TEST_ERROR + } else + if(H5Tinsert(cmpd, name, 4 * order[i], H5T_STD_I32BE) < 0) TEST_ERROR + } /* end for */ + + /* Verify that the compound is packed */ + if(NULL == (dt = (H5T_t *) H5I_object_verify(cmpd, H5I_DATATYPE))) TEST_ERROR + if(!dt->shared->u.compnd.packed) TEST_ERROR + + /* Close */ + if(H5Tclose(cmpd) < 0) TEST_ERROR + if(H5Tclose(sub_cmpd) < 0) TEST_ERROR + + PASSED(); + + /* Change to forward ordering, insert compound first */ + sub_cmpd_order = 0; + + TESTING("forward member insertion with empty compound subtype"); + + /* Create inner compound type. It will be empty for the first run */ + if((sub_cmpd = H5Tcreate(H5T_COMPOUND, 4)) < 0) TEST_ERROR + + /* Create main compound type, with extra space at the end */ + if((cmpd = H5Tcreate(H5T_COMPOUND, (4 * PACK_NMEMBS) + 1)) < 0) TEST_ERROR + + /* Insert the compound members in forward order */ + for(i=0; i<PACK_NMEMBS; i++) { + sprintf(name, "%05d", i); + if(i == sub_cmpd_order) { + if(H5Tinsert(cmpd, name, 4 * i, sub_cmpd) < 0) TEST_ERROR + } else + if(H5Tinsert(cmpd, name, 4 * i, H5T_STD_I32BE) < 0) TEST_ERROR + } /* end for */ + + /* Verify that the compound is not packed */ + if(NULL == (dt = (H5T_t *) H5I_object_verify(cmpd, H5I_DATATYPE))) TEST_ERROR + if(dt->shared->u.compnd.packed) TEST_ERROR + + /* Close the main compound */ + if(H5Tclose(cmpd) < 0) TEST_ERROR + + PASSED(); + + TESTING("forward member insertion with full compound subtype"); + + /* Complete the inner compound type */ + if(H5Tinsert(sub_cmpd, "int", 0, H5T_STD_I32LE) < 0) TEST_ERROR + + /* Recreate main compound type */ + if((cmpd = H5Tcreate(H5T_COMPOUND, (4 * PACK_NMEMBS) + 1)) < 0) TEST_ERROR + + /* Insert the compound members in forward order */ + for(i=0; i<PACK_NMEMBS; i++) { + sprintf(name, "%05d", i); + if(i == sub_cmpd_order) { + if(H5Tinsert(cmpd, name, 4 * i, sub_cmpd) < 0) TEST_ERROR + } else + if(H5Tinsert(cmpd, name, 4 * i, H5T_STD_I32BE) < 0) TEST_ERROR + } /* end for */ + + /* Verify that the compound is packed */ + if(NULL == (dt = (H5T_t *) H5I_object_verify(cmpd, H5I_DATATYPE))) TEST_ERROR + if(!dt->shared->u.compnd.packed) TEST_ERROR + + /* Close */ + if(H5Tclose(cmpd) < 0) TEST_ERROR + if(H5Tclose(sub_cmpd) < 0) TEST_ERROR + + PASSED(); + + return 0; + +error: + puts("*** DATASET TESTS FAILED ***"); + return 1; +} + /*------------------------------------------------------------------------- * Function: main @@ -1768,6 +2012,9 @@ main (int argc, char *argv[]) h5_fixname(FILENAME[2], fapl_id, fname, sizeof(fname)); nerrors += test_hdf5_dst_subset(fname, fapl_id); + puts("Testing that compound types can be packed out of order:"); + nerrors += test_pack_ooo(); + if (nerrors) { printf("***** %u FAILURE%s! *****\n", nerrors, 1==nerrors?"":"S"); diff --git a/test/dtypes.c b/test/dtypes.c index f5bc930..3aad1a7 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -2958,8 +2958,6 @@ test_compound_16(void) } cmpd_struct; cmpd_struct wdata1 = {1254, 5471}; - cmpd_struct rdata; - int wdata2[2] = {1, 2}; int obj_count; hid_t file; hid_t cmpd_m_tid, cmpd_f_tid, int_id; @@ -3026,6 +3024,129 @@ error: /*------------------------------------------------------------------------- + * Function: test_compound_17 + * + * Purpose: Tests that compound types are packed correctly when they + * only have extra space at the end. The compounds are + * "hidden" inside arrays to make sure that they are still + * detected correctly. + * + * Return: Success: 0 + * + * Failure: number of errors + * + * Programmer: Neil Fortner + * Tuesday, January 13, 2009 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static int +test_compound_17(void) +{ + hid_t file; + hid_t cmpd_int, arr_int, cmpd_ext, arr_ext, tmp_dt; + hsize_t dims[1] = {2}; + char filename[1024]; + + TESTING("that H5Tpack removes trailing bytes"); + + /* Create inner compound datatype. This type will be "packed" according + * to the internal field, but will have trailing space at the end. */ + if((cmpd_int = H5Tcreate(H5T_COMPOUND, 4)) < 0) TEST_ERROR + if(H5Tinsert(cmpd_int, "c", 0, H5T_NATIVE_CHAR) < 0) TEST_ERROR + + /* Create inner array datatype */ + if((arr_int = H5Tarray_create2(cmpd_int, 1, dims)) < 0) TEST_ERROR + + /* Create outer compound datatype. This type will be truly packed, with no + * trailing space. However, the internal compound contained within is not + * packed. */ + if((cmpd_ext = H5Tcreate(H5T_COMPOUND, 8)) < 0) TEST_ERROR + if(H5Tinsert(cmpd_ext, "arr", 0, arr_int) < 0) TEST_ERROR + + /* Create outer array datatype */ + if((arr_ext = H5Tarray_create2(cmpd_ext, 1, dims)) < 0) TEST_ERROR + + /* Try packing the internal array. Size should be 2 after packing. */ + if((tmp_dt = H5Tcopy(arr_int)) < 0) TEST_ERROR + if(H5Tpack(tmp_dt) < 0) TEST_ERROR + if(2 != H5Tget_size(tmp_dt)) { + H5_FAILED(); AT(); + printf(" Size after packing: %d; expected: 2\n", H5Tget_size(tmp_dt)); + goto error; + } + if(H5Tclose(tmp_dt) < 0) TEST_ERROR + + /* Try packing the external array. Size should be 4 after packing. */ + if((tmp_dt = H5Tcopy(arr_ext)) < 0) TEST_ERROR + if(H5Tpack(tmp_dt) < 0) TEST_ERROR + if(4 != H5Tget_size(tmp_dt)) { + H5_FAILED(); AT(); + printf(" Size after packing: %d; expected: 4\n", H5Tget_size(tmp_dt)); + goto error; + } + if(H5Tclose(tmp_dt) < 0) TEST_ERROR + + /* Now we will commit arr_int and arr_ext to a file, and verify that they + * are still packed correctly after opening them from the file */ + /* Create File */ + h5_fixname(FILENAME[3], H5P_DEFAULT, filename, sizeof filename); + if((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR + + /* Commit the datatypes. Note that they are still unpacked. */ + if(H5Tcommit2(file, "arr_int", arr_int, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + if(H5Tcommit2(file, "arr_ext", arr_ext, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0) TEST_ERROR + + /* Close IDs */ + if(H5Tclose(cmpd_int) < 0) TEST_ERROR + if(H5Tclose(arr_int) < 0) TEST_ERROR + if(H5Tclose(cmpd_ext) < 0) TEST_ERROR + if(H5Tclose(arr_ext) < 0) TEST_ERROR + if(H5Fclose(file) < 0) TEST_ERROR + + /* Reopen file */ + if((file = H5Fopen(filename, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) TEST_ERROR + + /* Open committed array datatypes */ + if((arr_int = H5Topen2(file, "arr_int", H5P_DEFAULT)) < 0) TEST_ERROR + if((arr_ext = H5Topen2(file, "arr_ext", H5P_DEFAULT)) < 0) TEST_ERROR + + /* Try packing the internal array. Size should be 2 after packing. */ + if((tmp_dt = H5Tcopy(arr_int)) < 0) TEST_ERROR + if(H5Tpack(tmp_dt) < 0) TEST_ERROR + if(2 != H5Tget_size(tmp_dt)) { + H5_FAILED(); AT(); + printf(" Size after packing: %d; expected: 2\n", H5Tget_size(tmp_dt)); + goto error; + } + if(H5Tclose(tmp_dt) < 0) TEST_ERROR + + /* Try packing the external array. Size should be 4 after packing. */ + if((tmp_dt = H5Tcopy(arr_ext)) < 0) TEST_ERROR + if(H5Tpack(tmp_dt) < 0) TEST_ERROR + if(4 != H5Tget_size(tmp_dt)) { + H5_FAILED(); AT(); + printf(" Size after packing: %d; expected: 4\n", H5Tget_size(tmp_dt)); + goto error; + } + if(H5Tclose(tmp_dt) < 0) TEST_ERROR + + /* Close IDs */ + if(H5Tclose(arr_int) < 0) TEST_ERROR + if(H5Tclose(arr_ext) < 0) TEST_ERROR + if(H5Fclose(file) < 0) TEST_ERROR + + PASSED(); + return 0; + +error: + return 1; +} /* end test_compound_17() */ + + +/*------------------------------------------------------------------------- * Function: test_query * * Purpose: Tests query functions of compound and enumeration types. @@ -5719,6 +5840,7 @@ main(void) nerrors += test_compound_14(); nerrors += test_compound_15(); nerrors += test_compound_16(); + nerrors += test_compound_17(); nerrors += test_conv_enum_1(); nerrors += test_conv_enum_2(); nerrors += test_conv_bitfield(); diff --git a/test/links.c b/test/links.c index d807352..11728aa 100644 --- a/test/links.c +++ b/test/links.c @@ -35,6 +35,7 @@ /* File for external link test. Created with gen_udlinks.c */ #define LINKED_FILE "be_extlink2.h5" +#ifdef H5_VMS const char *FILENAME[] = { "links0", "links1", @@ -48,10 +49,60 @@ const char *FILENAME[] = { "links6", /* 9 */ "links7", /* 10 */ "links8", /* 11 */ - "extlinks0", /* 12: main files */ - "tmp/extlinks0", /* 13: */ - "extlinks1", /* 14: target files */ - "tmp/extlinks1", /* 15: */ + "extlinks0", /* 12: main files */ + "[.tmp]extlinks0", /* 13: */ + "extlinks1", /* 14: target files */ + "[.tmp]extlinks1", /* 15: */ + "extlinks2", /* 16: */ + "[.tmp]extlinks2", /* 17: */ + "extlinks3", /* 18: */ + "[.tmp]extlinks3", /* 19: */ + "extlinks4", /* 20: */ + "[.tmp]extlinks4", /* 21: */ + "extlinks5", /* 22: */ + "[.tmp]extlinks6", /* 23: */ + "extlinks7", /* 24: */ + "[.tmp]extlinks7", /* 25: */ + "[.tmp]extlinks8", /* 26: */ + "extlinks9", /* 27: */ + "[.tmp]extlinks9", /* 28: */ + "extlinks10", /* 29: */ /* TESTS for windows */ + "[.tmp]extlinks10", /* 30: */ + "[.tmp]extlinks11", /* 31: */ + "[.tmp]extlinks12", /* 32: */ + "extlinks13", /* 33: */ + "[.tmp]extlinks13", /* 34: */ + "[.tmp]extlinks14", /* 35: */ + "[.tmp]extlinks15", /* 36: */ + "extlinks16A", /* 37: */ /* TESTS for H5P_set_elink_fapl */ + "extlinks16B", /* 38: */ + "extlinks17", /* 39: */ + "extlinks18A", /* 40: */ + "extlinks18B", /* 41: */ + "extlinks19A", /* 42: */ + "extlinks19B", /* 43: */ + NULL +}; + +#define TMPDIR "[.tmp]" +#else +const char *FILENAME[] = { + "links0", + "links1", + "links2", + "links3", + "links4a", /* 4 */ + "links4b", /* 5 */ + "links4c", /* 6 */ + "links4d", /* 7 */ + "links5", /* 8 */ + "links6", /* 9 */ + "links7", /* 10 */ + "links8", /* 11 */ + "extlinks0", /* 12: main files */ + "tmp/extlinks0", /* 13: */ + "extlinks1", /* 14: target files */ + "tmp/extlinks1", /* 15: */ "extlinks2", /* 16: */ "tmp/extlinks2", /* 17: */ "extlinks3", /* 18: */ @@ -83,7 +134,9 @@ const char *FILENAME[] = { NULL }; -#define TMPDIR "tmp" +#define TMPDIR "tmp" +#endif + #define FAMILY_SIZE 1024 #define CORE_INCREMENT 1024 #define NUM400 400 @@ -2825,6 +2878,37 @@ external_link_prefix(hid_t fapl, hbool_t new_format) /*------------------------------------------------------------------------- + * Function: fix_ext_filename + * + * Purpose: Internal function to append path to file name. It handles + * path name of Unix, Windows, and OpenVMS. + * + * Return: void + * + * Programmer: Raymond Lu + * 14 Jan. 2009 + *------------------------------------------------------------------------- + */ +static void +fix_ext_filename(char *path_name, char *cwd, const char *file_name) +{ + HDstrcpy(path_name, cwd); + +#ifdef H5_VMS + if(file_name[0] == '[') { + char *tmp = file_name; + path_name[strlen(cwd)-1] = '\0'; + HDstrcat(path_name, ++tmp); + } else + HDstrcat(path_name, file_name); +#else + HDstrcat(path_name, "/"); + HDstrcat(path_name, file_name); +#endif +} + + +/*------------------------------------------------------------------------- * Function: external_link_abs_mainpath: test 3 * * Purpose: 1. target link: "extlinks3" @@ -2871,10 +2955,9 @@ external_link_abs_mainpath(hid_t fapl, hbool_t new_format) * set up name for main file: * Linux: "/CWD/tmp/extlinks0" * Window: "<cur drive>:/CWD/tmp/extlinks0" + * OpenVMS: "<cur disk>$<partition>:[CWD.tmp]extlinks0" */ - HDstrcpy(tmpname, cwdpath); - HDstrcat(tmpname, "/"); - HDstrcat(tmpname, FILENAME[13]); + fix_ext_filename(tmpname, cwdpath, FILENAME[13]); h5_fixname(tmpname, fapl, filename1, sizeof filename1); /* Create the target file */ @@ -3052,9 +3135,7 @@ external_link_cwd(hid_t fapl, hbool_t new_format) * Linux: "/CWD/tmp/extlinks0" * Windows: "<cur drive>:/CWD/tmp/extlinks0" */ - HDstrcpy(tmpname, cwdpath); - HDstrcat(tmpname, "/"); - HDstrcat(tmpname, FILENAME[13]); + fix_ext_filename(tmpname, cwdpath, FILENAME[13]); h5_fixname(tmpname, fapl, filename1, sizeof filename1); /* Create the target file */ @@ -3147,9 +3228,7 @@ external_link_abstar(hid_t fapl, hbool_t new_format) * Linux: "/CWD/tmp/extlinks6" * Windows: "<cur drive>:/CWD/tmp/extlinks6" */ - HDstrcpy(tmpname, cwdpath); - HDstrcat(tmpname, "/"); - HDstrcat(tmpname, FILENAME[23]); + fix_ext_filename(tmpname, cwdpath, FILENAME[23]); h5_fixname(tmpname, fapl, filename2, sizeof filename2); /* set up name for target file: "tmp/extlinks6" */ @@ -3246,9 +3325,7 @@ external_link_abstar_cur(hid_t fapl, hbool_t new_format) * Linux: "/CWD/tmp/extlinks7" * Windows: "<cur drive>:/CWD/tmp/extlinks7" */ - HDstrcpy(tmpname, cwdpath); - HDstrcat(tmpname, "/"); - HDstrcat(tmpname, FILENAME[25]); + fix_ext_filename(tmpname, cwdpath, FILENAME[25]); h5_fixname(tmpname, fapl, filename2, sizeof filename2); /* Create the target file */ @@ -3539,9 +3616,7 @@ external_set_elink_fapl1(hid_t fapl, hbool_t new_format) * Linux: "/CWD/tmp/extlinks0" * Windows: "<cur drive>:/CWD/tmp/extlinks0" */ - HDstrcpy(tmpname, cwdpath); - HDstrcat(tmpname, "/"); - HDstrcat(tmpname, FILENAME[13]); + fix_ext_filename(tmpname, cwdpath, FILENAME[13]); h5_fixname(tmpname, fapl, filename1, sizeof filename1); /* create "family" fapl */ @@ -3741,9 +3816,7 @@ external_set_elink_fapl2(hid_t fapl, hbool_t new_format) * Linux: "/CWD/tmp/extlinks0" * Windows: "<cur drive>:/CWD/tmp/extlinks0" */ - HDstrcpy(tmpname, cwdpath); - HDstrcat(tmpname, "/"); - HDstrcat(tmpname, FILENAME[13]); + fix_ext_filename(tmpname, cwdpath, FILENAME[13]); h5_fixname(tmpname, fapl, filename1, sizeof filename1); /* create fapl for the target file to be a "core" file */ @@ -12645,6 +12718,7 @@ main(void) nerrors += ud_hard_links(fapl2) < 0 ? 1 : 0; /* requires new format groups */ nerrors += ud_link_reregister(fapl2) < 0 ? 1 : 0; /* requires new format groups */ } /* end if */ + nerrors += ud_callbacks(my_fapl, new_format) < 0 ? 1 : 0; nerrors += ud_link_errors(my_fapl, new_format) < 0 ? 1 : 0; nerrors += lapl_udata(my_fapl, new_format) < 0 ? 1 : 0; diff --git a/test/stab.c b/test/stab.c index 9ce3cfe..b57b542 100644 --- a/test/stab.c +++ b/test/stab.c @@ -856,7 +856,6 @@ no_compact(hid_t fapl2) /* Verify that file is correct size */ if(file_size != empty_size) TEST_ERROR - PASSED(); return 0; @@ -1153,4 +1152,3 @@ error: puts("*** TESTS FAILED ***"); return 1; } - diff --git a/testpar/COPYING b/testpar/COPYING index ef0cbaf..6903daf 100755 --- a/testpar/COPYING +++ b/testpar/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. diff --git a/tools/COPYING b/tools/COPYING index ef0cbaf..6903daf 100755 --- a/tools/COPYING +++ b/tools/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. diff --git a/tools/h5diff/testh5diff.sh b/tools/h5diff/testh5diff.sh index 2089321..811b9d8 100755 --- a/tools/h5diff/testh5diff.sh +++ b/tools/h5diff/testh5diff.sh @@ -65,6 +65,7 @@ DIFF='diff -c' nerrors=0 verbose=yes pmode= # default to run h5diff tests +mydomainname=`domainname 2>/dev/null` # The build (current) directory might be different than the source directory. if test -z "$srcdir"; then @@ -561,8 +562,13 @@ TESTING $H5DIFF -v $SRCFILE2 $SRCFILE2 TOOLTEST h5diff_90.txt -v $FILE2 $FILE2 # 10. read by hyperslab, print indexes -TESTING $H5DIFF -v $SRCFILE9 $SRCFILE10 -TOOLTEST h5diff_100.txt -v $FILE9 $FILE10 +if test -n "$pmode" -a "$mydomainname" = hdfgroup.uiuc.edu; then + # skip this test which sometimes hangs in some THG machines + SKIP -v $SRCFILE9 $SRCFILE10 +else + TESTING $H5DIFF -v $SRCFILE9 $SRCFILE10 + TOOLTEST h5diff_100.txt -v $FILE9 $FILE10 +fi # 11. floating point comparison TESTING $H5DIFF -v $SRCFILE1 $SRCFILE1 g1/d1 g1/d2 diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index e5f065c..5481d23 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -1825,8 +1825,8 @@ hsize_t diff_datum(void *_mem1, { float temp1_float; float temp2_float; - int isnan1; - int isnan2; + int isnan1=0; + int isnan2=0; assert(type_size==sizeof(float)); @@ -1847,8 +1847,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_FLOAT,&temp1_float); + isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + } if ( !isnan1 && !isnan2) { @@ -1877,8 +1880,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_FLOAT,&temp1_float); + isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + } if ( !isnan1 && !isnan2) { @@ -1927,8 +1933,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_FLOAT,&temp1_float); + isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + } if ( !isnan1 && !isnan2) { @@ -1992,8 +2001,8 @@ hsize_t diff_datum(void *_mem1, { double temp1_double; double temp2_double; - int isnan1; - int isnan2; + int isnan1=0; + int isnan2=0; assert(type_size==sizeof(double)); @@ -2014,8 +2023,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); + isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + } if ( !isnan1 && !isnan2) { @@ -2045,8 +2057,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); + isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + } if ( !isnan1 && !isnan2) { @@ -2095,8 +2110,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_DOUBLE,&temp1_double); + isnan2 = my_isnan(FLT_DOUBLE,&temp2_double); + } if ( !isnan1 && !isnan2) { @@ -2163,8 +2181,8 @@ hsize_t diff_datum(void *_mem1, { long double temp1_double; long double temp2_double; - int isnan1; - int isnan2; + int isnan1=0; + int isnan2=0; assert(type_size==sizeof(long double)); @@ -2185,8 +2203,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); + isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); + } if ( !isnan1 && !isnan2) { @@ -2216,8 +2237,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); + isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); + } if ( !isnan1 && !isnan2) { @@ -2266,8 +2290,11 @@ hsize_t diff_datum(void *_mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); - isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_LDOUBLE,&temp1_double); + isnan2 = my_isnan(FLT_LDOUBLE,&temp2_double); + } if ( !isnan1 && !isnan2) { @@ -2755,8 +2782,8 @@ hsize_t diff_float(unsigned char *mem1, hsize_t i; double per; int both_zero; - int isnan1; - int isnan2; + int isnan1=0; + int isnan2=0; /*------------------------------------------------------------------------- @@ -2775,8 +2802,11 @@ hsize_t diff_float(unsigned char *mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_FLOAT,&temp1_float); + isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + } if ( !isnan1 && !isnan2) { @@ -2813,8 +2843,11 @@ hsize_t diff_float(unsigned char *mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_FLOAT,&temp1_float); + isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + } if ( !isnan1 && !isnan2) { @@ -2872,8 +2905,11 @@ hsize_t diff_float(unsigned char *mem1, * detect NaNs *------------------------------------------------------------------------- */ - isnan1 = my_isnan(FLT_FLOAT,&temp1_float); - isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + if ( options->do_nans ) + { + isnan1 = my_isnan(FLT_FLOAT,&temp1_float); + isnan2 = my_isnan(FLT_FLOAT,&temp2_float); + } if ( !isnan1 && !isnan2) { diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 71a2449..52d65fe 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -525,7 +525,7 @@ h5tools_simple_prefix(FILE *stream, const h5tool_format_t *info, * Deref in h5tools_str_sprint() instead so recursive types are * handled correctly. * - * Pedro Vicente Nunes, THG, 2005-10-19 + * Pedro Vicente Nunes, The HDF Group, 2005-10-19 * pass to the prefix in h5tools_simple_prefix the total position * instead of the current stripmine position i; this is necessary * to print the array indices diff --git a/vms/COPYING b/vms/COPYING index ef0cbaf..6903daf 100755 --- a/vms/COPYING +++ b/vms/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. diff --git a/vms/src/h5pubconf.h b/vms/src/h5pubconf.h index 34dbac1..fd9393e 100644 --- a/vms/src/h5pubconf.h +++ b/vms/src/h5pubconf.h @@ -1,4 +1,3 @@ - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * Copyright by the Board of Trustees of the University of Illinois. * @@ -100,6 +99,13 @@ /* Define to 1 if you have the `fseek64' function. */ /* #undef H5_HAVE_FSEEK64 */ +/* Define if the compiler understands C99 designated initialization of structs + and unions */ +#define H5_HAVE_C99_DESIGNATED_INITIALIZER 1 + +/* Define if the compiler understands the __func__ keyword */ +#define H5_HAVE_C99_FUNC 1 + /* Define if the function stack tracing code is to be compiled in */ /*#define H5_HAVE_CODESTACK 1*/ @@ -349,6 +355,9 @@ /* Define to 1 if you have the `waitpid' function. */ /*#undefine H5_HAVE_WAITPID */ +/* Define if your system has OpenVMS path name. This macro is added by hand. */ +#define H5_HAVE_VMS_PATH 1 + /* Define to 1 if you have the <winsock.h> header file. */ /* #undef H5_HAVE_WINSOCK_H */ @@ -391,13 +400,13 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.27" +#define H5_PACKAGE_STRING "HDF5 1.9.29" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.27" +#define H5_PACKAGE_VERSION "1.9.29" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "ll" @@ -551,7 +560,7 @@ #define H5_ULLONG_TO_LDOUBLE_PRECISION 1 /* Version number of package */ -#define H5_VERSION "1.9.27" +#define H5_VERSION "1.9.29" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ diff --git a/windows/COPYING b/windows/COPYING index ef0cbaf..6903daf 100755 --- a/windows/COPYING +++ b/windows/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. diff --git a/windows/src/H5pubconf.h b/windows/src/H5pubconf.h index 9956cbc..3f36974 100755 --- a/windows/src/H5pubconf.h +++ b/windows/src/H5pubconf.h @@ -475,13 +475,13 @@ #define H5_PACKAGE_NAME "HDF5" /* Define to the full name and version of this package. */ -#define H5_PACKAGE_STRING "HDF5 1.9.27" +#define H5_PACKAGE_STRING "HDF5 1.9.29" /* Define to the one symbol short name of this package. */ #define H5_PACKAGE_TARNAME "hdf5" /* Define to the version of this package. */ -#define H5_PACKAGE_VERSION "1.9.27" +#define H5_PACKAGE_VERSION "1.9.29" /* Width for printf() for type `long long' or `__int64', use `ll' */ #define H5_PRINTF_LL_WIDTH "I64" @@ -638,7 +638,7 @@ /* #undef H5_USING_MEMCHECKER */ /* Version number of package */ -#define H5_VERSION "1.9.27" +#define H5_VERSION "1.9.29" /* Define if vsnprintf() returns the correct value for formatted strings that don't fit into size allowed */ diff --git a/windows_vnet/COPYING b/windows_vnet/COPYING index ef0cbaf..6903daf 100755 --- a/windows_vnet/COPYING +++ b/windows_vnet/COPYING @@ -1,5 +1,5 @@ - Copyright by The HDF Group (THG) and + Copyright by The HDF Group and The Board of Trustees of the University of Illinois. All rights reserved. |