diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-11-16 20:45:05 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-11-16 20:45:05 (GMT) |
commit | d2b87ec47ebdb096c331c7b62a195b9cea2f33ae (patch) | |
tree | a066f01361afaf5df457cef612bb0bb9fd80fe18 /hl/src | |
parent | ee5a1e07350f0dcf3ef07d9443aa2f4c073392f4 (diff) | |
download | hdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.zip hdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.tar.gz hdf5-d2b87ec47ebdb096c331c7b62a195b9cea2f33ae.tar.bz2 |
[svn-r17896] Description:
Bring r17546:17895 from trunk to revise_chunks branch. Changes to
fixed and extensible array dataset chunk indexing code to accommodate changes
to private APIs in those interfaces. Also, other adjustments to source code
and expected output in response to changes on the trunk.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.6.2 (amazon) in debug mode
Mac OS X/32 10.6.2 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'hl/src')
-rw-r--r-- | hl/src/H5DS.c | 28 | ||||
-rw-r--r-- | hl/src/Makefile.am | 4 | ||||
-rw-r--r-- | hl/src/Makefile.in | 30 |
3 files changed, 44 insertions, 18 deletions
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c index 8e697f1..e15c132 100644 --- a/hl/src/H5DS.c +++ b/hl/src/H5DS.c @@ -129,6 +129,7 @@ herr_t H5DSattach_scale(hid_t did, hssize_t nelmts; hid_t sid; /* space ID */ hid_t tid = -1; /* attribute type ID */ + hid_t ntid = -1; /* attribute native type ID */ hid_t aid = -1; /* attribute ID */ int rank; /* rank of dataset */ hsize_t *dims=NULL; /* dimension of the "REFERENCE_LIST" array */ @@ -472,6 +473,9 @@ herr_t H5DSattach_scale(hid_t did, if((tid = H5Aget_type(aid)) < 0) goto out; + + if((ntid = H5Tget_native_type(tid, H5T_DIR_DEFAULT)) < 0) + goto out; /* get and save the old reference(s) */ if((sid = H5Aget_space(aid)) < 0) @@ -487,7 +491,7 @@ herr_t H5DSattach_scale(hid_t did, if (dsbuf == NULL) goto out; - if (H5Aread(aid,tid,dsbuf) < 0) + if (H5Aread(aid,ntid,dsbuf) < 0) goto out; /* close */ @@ -495,6 +499,8 @@ herr_t H5DSattach_scale(hid_t did, goto out; if (H5Aclose(aid) < 0) goto out; + if (H5Tclose(ntid) < 0) + goto out; /*------------------------------------------------------------------------- * create a new attribute @@ -586,6 +592,7 @@ out: H5E_BEGIN_TRY { H5Sclose(sid); H5Aclose(aid); + H5Tclose(ntid); H5Tclose(tid); } H5E_END_TRY; return FAIL; @@ -631,6 +638,7 @@ herr_t H5DSdetach_scale(hid_t did, hid_t did_i; /* dataset ID in REFERENCE_LIST */ hid_t sid; /* space ID */ hid_t tid = -1; /* attribute type ID */ + hid_t ntid = -1; /* attribute native type ID */ hid_t aid = -1; /* attribute ID */ int rank; /* rank of dataset */ ds_list_t *dsbuf = NULL; /* array of attribute data in the DS pointing to the dataset */ @@ -823,6 +831,9 @@ herr_t H5DSdetach_scale(hid_t did, if((tid = H5Aget_type(aid)) < 0) goto out; + + if((ntid = H5Tget_native_type(tid, H5T_DIR_DEFAULT)) < 0) + goto out; /* get and save the old reference(s) */ if((sid = H5Aget_space(aid)) < 0) @@ -835,7 +846,7 @@ herr_t H5DSdetach_scale(hid_t did, if(dsbuf == NULL) goto out; - if (H5Aread(aid,tid,dsbuf) < 0) + if (H5Aread(aid,ntid,dsbuf) < 0) goto out; for(i=0; i<nelmts; i++) @@ -879,6 +890,8 @@ herr_t H5DSdetach_scale(hid_t did, goto out; if (H5Aclose(aid) < 0) goto out; + if (H5Tclose(ntid) < 0) + goto out; /*------------------------------------------------------------------------- * check if we found the pointed dataset @@ -961,6 +974,7 @@ out: H5E_BEGIN_TRY { H5Sclose(sid); H5Aclose(aid); + H5Tclose(ntid); H5Tclose(tid); if (dsbuf) @@ -1024,6 +1038,7 @@ htri_t H5DSis_attached(hid_t did, hssize_t nelmts; hid_t sid; /* space ID */ hid_t tid = -1; /* attribute type ID */ + hid_t ntid = -1; /* attribute native type ID */ hid_t aid = -1; /* attribute ID */ int rank; /* rank of dataset */ ds_list_t *dsbuf; /* array of attribute data in the DS pointing to the dataset */ @@ -1187,7 +1202,10 @@ htri_t H5DSis_attached(hid_t did, if((tid = H5Aget_type(aid)) < 0) goto out; - + + if((ntid = H5Tget_native_type(tid, H5T_DIR_DEFAULT)) < 0) + goto out; + /* get and save the old reference(s) */ if((sid = H5Aget_space(aid)) < 0) goto out; @@ -1200,7 +1218,7 @@ htri_t H5DSis_attached(hid_t did, if (dsbuf == NULL) goto out; - if (H5Aread(aid,tid,dsbuf) < 0) + if (H5Aread(aid,ntid,dsbuf) < 0) goto out; /*------------------------------------------------------------------------- @@ -1242,6 +1260,8 @@ htri_t H5DSis_attached(hid_t did, /* close */ if (H5Sclose(sid) < 0) goto out; + if (H5Tclose(ntid) < 0) + goto out; if (H5Tclose(tid) < 0) goto out; if (H5Aclose(aid) < 0) diff --git a/hl/src/Makefile.am b/hl/src/Makefile.am index 3ee186e..0eecbbb 100644 --- a/hl/src/Makefile.am +++ b/hl/src/Makefile.am @@ -22,13 +22,13 @@ include $(top_srcdir)/config/commence.am include $(top_srcdir)/config/lt_vers.am # Add include directories to the C preprocessor flags -AM_CPPFLAGS=-I$(top_srcdir)/src +AM_CPPFLAGS+=-I$(top_srcdir)/src # This library is our main target. lib_LTLIBRARIES=libhdf5_hl.la # Add libtool numbers to the HDF5 hl library (from config/lt_vers.am) -libhdf5_hl_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) +libhdf5_hl_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) libhdf5_hl_la_SOURCES=H5DS.c H5IM.c H5LT.c H5LTanalyze.c H5LTparse.c H5PT.c H5TB.c diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 9df4093..35282d2 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -120,6 +120,18 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@ AMTAR = @AMTAR@ + +# H5_CFLAGS holds flags that should be used when building hdf5, +# but which should not be exported to h5cc for building other programs. +# AM_CFLAGS is an automake construct which should be used by Makefiles +# instead of CFLAGS, as CFLAGS is reserved solely for the user to define. +AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ + +# Add include directories to the C preprocessor flags +AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ -I$(top_srcdir)/src +AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ +AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ +AM_LDFLAGS = @AM_LDFLAGS@ AM_MAKEFLAGS = @AM_MAKEFLAGS@ AR = @AR@ @@ -133,21 +145,18 @@ BYTESEX = @BYTESEX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_VERSION = @CC_VERSION@ - -# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5, -# but which shouldn't be exported to h5cc for building other programs. -CFLAGS = @CFLAGS@ @H5_CFLAGS@ +CFLAGS = @CFLAGS@ CLEARFILEBUF = @CLEARFILEBUF@ CODESTACK = @CODESTACK@ CONFIG_DATE = @CONFIG_DATE@ CONFIG_MODE = @CONFIG_MODE@ CONFIG_USER = @CONFIG_USER@ CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@ +CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_PKG = @DEBUG_PKG@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@ @@ -170,7 +179,7 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@ +FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FGREP = @FGREP@ @@ -371,17 +380,14 @@ 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 = 37 +LT_VERS_REVISION = 41 LT_VERS_AGE = 0 -# Add include directories to the C preprocessor flags -AM_CPPFLAGS = -I$(top_srcdir)/src - # This library is our main target. lib_LTLIBRARIES = libhdf5_hl.la # Add libtool numbers to the HDF5 hl library (from config/lt_vers.am) -libhdf5_hl_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) +libhdf5_hl_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) libhdf5_hl_la_SOURCES = H5DS.c H5IM.c H5LT.c H5LTanalyze.c H5LTparse.c H5PT.c H5TB.c # Public header files (to be installed) |