diff options
author | Robb Matzke <matzke@llnl.gov> | 1999-03-30 11:38:34 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1999-03-30 11:38:34 (GMT) |
commit | f003dead4d1701aedd7833354ede73c6eb93a971 (patch) | |
tree | e64999eb9d666aedd808f1c91f4a2be8676d6881 /src/H5S.c | |
parent | 804fae33ced79c63a2c7fa2adc8537c80597fb33 (diff) | |
download | hdf5-f003dead4d1701aedd7833354ede73c6eb93a971.zip hdf5-f003dead4d1701aedd7833354ede73c6eb93a971.tar.gz hdf5-f003dead4d1701aedd7833354ede73c6eb93a971.tar.bz2 |
[svn-r1169] ./configure.in
./configure [REGENERATED]
./src/H5D.c
./src/H5O.c
Removed H5AC, H5B, and H5T from the default list of packages
to debug (because they're pretty expensive debugging), and
added H5O. Also fixed a bug for undefined variable in H5D when
H5S debugging is turned on but H5T debugging is turned off.
./config/conclude.in
Fixed installation of header files for building in a directory
other than the source directory. This fixes a bug where
H5config.h wasn't being installed.
./src/H5.c
./src/H5A.c
./src/H5D.c
./src/H5F.c
./src/H5G.c
./src/H5I.c
./src/H5Iprivate.h
./src/H5P.c
./src/H5R.c
./src/H5RA.c
./src/H5S.c
./src/H5T.c
./src/H5TB.c
./src/H5Tprivate.h
./src/H5Z.c
./src/H5detect.c
./src/H5private.h
Changed the way the library shuts down again. Now it handles
cycles between packages and isn't so sensitive to dependencies
between packages. A package might shut down only to be
restarted to process a request from some other package being
shut down. Loops are detected after 100 iteractions and the
shutdown is aborted with a message on standard error. This
also makes it a lot easier to debug.
./src/H5A.c
Fixed H5A_write() and H5A_read() so they pass a non-null
background buffer to the conversion functions. This is
necessary when an attribute has a compound data type.
./src/H5Flow.c
./src/H5Fprivate.h
./src/H5Fsec2.c
Reindented new Win32 stuff.
./src/H5Odtype.c
Fixed a bug when enumeration types are used in a compound data
type. The byte pointer wasn't incremented after the type
information was written.
./tools/h5ls.c
Compound data types display their total size because it's not
always obvious from looking at the members.
Scalar attributes show their space as `scalar' instead of
`{}'.
The index value is not printed for attributes that have only a
few values. Instead the word `Data:' is printed on the first
line of attribute data.
Named types display their data type only if verbose output was
requested.
Diffstat (limited to 'src/H5S.c')
-rw-r--r-- | src/H5S.c | 184 |
1 files changed, 98 insertions, 86 deletions
@@ -108,10 +108,11 @@ H5S_init_interface(void) EXAMPLES REVISION LOG --------------------------------------------------------------------------*/ -void -H5S_term_interface(intn status) +intn +H5S_term_interface(void) { size_t i; + intn n=0; #ifdef H5S_DEBUG int j, nprints=0; @@ -119,99 +120,110 @@ H5S_term_interface(intn status) char buf[256]; #endif - if (interface_initialize_g>0) { + if (interface_initialize_g) { + if ((n=H5I_nmembers(H5I_DATASPACE))) { + H5I_clear_group(H5I_DATASPACE); + } else { #ifdef H5S_DEBUG - /* - * Print statistics about each conversion path. - */ - if (H5DEBUG(S)) { - for (i=0; i<H5S_nconv_g; i++) { - path = H5S_conv_g[i]; - for (j=0; j<2; j++) { - if (0==path->stats[j].gath_ncalls && - 0==path->stats[j].scat_ncalls && - 0==path->stats[j].bkg_ncalls) { - continue; - } - if (0==nprints++) { - fprintf(H5DEBUG(S), "H5S: data space conversion " - "statistics:\n"); - fprintf(H5DEBUG(S), - " %-16s %10s %10s %8s %8s %8s %10s\n", - "Memory <> File", "Bytes", "Calls", - "User", "System", "Elapsed", "Bandwidth"); - fprintf(H5DEBUG(S), - " %-16s %10s %10s %8s %8s %8s %10s\n", - "--------------", "-----", "-----", - "----", "------", "-------", "---------"); - } - - /* Summary */ - sprintf(buf, "%s %c %s", - path->m->name, 0==j?'>':'<', path->f->name); - fprintf(H5DEBUG(S), " %-16s\n", buf); - - /* Gather */ - if (path->stats[j].gath_ncalls) { - H5_bandwidth(buf, (double)(path->stats[j].gath_nbytes), - path->stats[j].gath_timer.etime); - HDfprintf(H5DEBUG(S), - " %16s %10Hu %10Hu %8.2f %8.2f %8.2f " - "%10s\n", "gather", - path->stats[j].gath_nbytes, - path->stats[j].gath_ncalls, - path->stats[j].gath_timer.utime, - path->stats[j].gath_timer.stime, - path->stats[j].gath_timer.etime, - buf); - } - - /* Scatter */ - if (path->stats[j].scat_ncalls) { - H5_bandwidth(buf, (double)(path->stats[j].scat_nbytes), - path->stats[j].scat_timer.etime); - HDfprintf(H5DEBUG(S), - " %16s %10Hu %10Hu %8.2f %8.2f %8.2f " - "%10s\n", "scatter", - path->stats[j].scat_nbytes, - path->stats[j].scat_ncalls, - path->stats[j].scat_timer.utime, - path->stats[j].scat_timer.stime, - path->stats[j].scat_timer.etime, - buf); - } - - /* Background */ - if (path->stats[j].bkg_ncalls) { - H5_bandwidth(buf, (double)(path->stats[j].bkg_nbytes), - path->stats[j].bkg_timer.etime); - HDfprintf(H5DEBUG(S), - " %16s %10Hu %10Hu %8.2f %8.2f %8.2f " - "%10s\n", "background", - path->stats[j].bkg_nbytes, - path->stats[j].bkg_ncalls, - path->stats[j].bkg_timer.utime, - path->stats[j].bkg_timer.stime, - path->stats[j].bkg_timer.etime, - buf); + /* + * Print statistics about each conversion path. + */ + if (H5DEBUG(S)) { + for (i=0; i<H5S_nconv_g; i++) { + path = H5S_conv_g[i]; + for (j=0; j<2; j++) { + if (0==path->stats[j].gath_ncalls && + 0==path->stats[j].scat_ncalls && + 0==path->stats[j].bkg_ncalls) { + continue; + } + if (0==nprints++) { + fprintf(H5DEBUG(S), "H5S: data space conversion " + "statistics:\n"); + fprintf(H5DEBUG(S), + " %-16s %10s %10s %8s %8s %8s %10s\n", + "Memory <> File", "Bytes", "Calls", + "User", "System", "Elapsed", "Bandwidth"); + fprintf(H5DEBUG(S), + " %-16s %10s %10s %8s %8s %8s %10s\n", + "--------------", "-----", "-----", + "----", "------", "-------", "---------"); + } + + /* Summary */ + sprintf(buf, "%s %c %s", + path->m->name, 0==j?'>':'<', path->f->name); + fprintf(H5DEBUG(S), " %-16s\n", buf); + + /* Gather */ + if (path->stats[j].gath_ncalls) { + H5_bandwidth(buf, + (double)(path->stats[j].gath_nbytes), + path->stats[j].gath_timer.etime); + HDfprintf(H5DEBUG(S), + " %16s %10Hu %10Hu %8.2f %8.2f %8.2f " + "%10s\n", "gather", + path->stats[j].gath_nbytes, + path->stats[j].gath_ncalls, + path->stats[j].gath_timer.utime, + path->stats[j].gath_timer.stime, + path->stats[j].gath_timer.etime, + buf); + } + + /* Scatter */ + if (path->stats[j].scat_ncalls) { + H5_bandwidth(buf, + (double)(path->stats[j].scat_nbytes), + path->stats[j].scat_timer.etime); + HDfprintf(H5DEBUG(S), + " %16s %10Hu %10Hu %8.2f %8.2f %8.2f " + "%10s\n", "scatter", + path->stats[j].scat_nbytes, + path->stats[j].scat_ncalls, + path->stats[j].scat_timer.utime, + path->stats[j].scat_timer.stime, + path->stats[j].scat_timer.etime, + buf); + } + + /* Background */ + if (path->stats[j].bkg_ncalls) { + H5_bandwidth(buf, + (double)(path->stats[j].bkg_nbytes), + path->stats[j].bkg_timer.etime); + HDfprintf(H5DEBUG(S), + " %16s %10Hu %10Hu %8.2f %8.2f %8.2f " + "%10s\n", "background", + path->stats[j].bkg_nbytes, + path->stats[j].bkg_ncalls, + path->stats[j].bkg_timer.utime, + path->stats[j].bkg_timer.stime, + path->stats[j].bkg_timer.etime, + buf); + } } } } - } #endif - /* Free data types */ - H5I_destroy_group(H5I_DATASPACE); + /* Free data types */ + H5I_destroy_group(H5I_DATASPACE); - /* Clear/free conversion table */ - HDmemset(H5S_fconv_g, 0, sizeof(H5S_fconv_g)); - HDmemset(H5S_mconv_g, 0, sizeof(H5S_mconv_g)); - for (i=0; i<H5S_nconv_g; i++) H5MM_xfree(H5S_conv_g[i]); - H5S_conv_g = H5MM_xfree(H5S_conv_g); - H5S_nconv_g = H5S_aconv_g = 0; + /* Clear/free conversion table */ + HDmemset(H5S_fconv_g, 0, sizeof(H5S_fconv_g)); + HDmemset(H5S_mconv_g, 0, sizeof(H5S_mconv_g)); + for (i=0; i<H5S_nconv_g; i++) H5MM_xfree(H5S_conv_g[i]); + H5S_conv_g = H5MM_xfree(H5S_conv_g); + H5S_nconv_g = H5S_aconv_g = 0; + + /* Shut down interface */ + interface_initialize_g = 0; + n = 1; /*H5I*/ + } } - interface_initialize_g = status; + return n; } |