diff options
author | Robb Matzke <matzke@llnl.gov> | 1999-04-30 15:54:52 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1999-04-30 15:54:52 (GMT) |
commit | cc2184b6efd25633b8a27cb23d57380e2f28a5b4 (patch) | |
tree | 6b276ffc0f426d101a06c84d271e64e882fa66a9 /src/H5D.c | |
parent | 2be6b9f63c53e20add431b497a13929d2df049a8 (diff) | |
download | hdf5-cc2184b6efd25633b8a27cb23d57380e2f28a5b4.zip hdf5-cc2184b6efd25633b8a27cb23d57380e2f28a5b4.tar.gz hdf5-cc2184b6efd25633b8a27cb23d57380e2f28a5b4.tar.bz2 |
[svn-r1240] Changes since 19990427
----------------------
./tools/h5ls.c
Added a `--address' (`-a') switch which causes h5ls to display
file addresses for raw data. For contiguous datasets it's just
a nice simple number, but for chunked datasets it's a list of
logical dataset coordinates, file addresses, filter masks, and
storage sizes.
Changed `--dump' switch to `--data'.
./src/H5D.c
./src/H5F.c
./src/H5Fprivate.h
Enhanced the indexed-storage B-tree iterator so it can dump
raw data addresses (and other info) to the standard error
stream.
Added H5Ddebug() so h5ls has a way to dump addresses for
datasets. I'm not sure what else this API function should do,
so I think we should discuss it before we document it. So far,
h5ls is the only thing that uses it, and we can easily change
that.
./src/H5Tconv.c
./test/dtypes.c
Finally had a chance to verify Paul's H5T_conv_s_s (general
string to string conversions) bug fixes and incorporate them
into H5T_conv_f_f (general floating-point to floating-point
conversions) and H5T_conv_i_i (general integer to integer
conversons). Thanks Paul.
./src/H5D.c
./src/H5S.c
./src/H5Sprivate.h
Added performance timers around data space read and write
callbacks. They were already there for the gather/scatter
callbacks.
The timings for read/write callbacks are displayed along with
gather/scatter when data space debugging is turned on.
./bin/iostats
Updated to print totals. Added a `--fast' option that doesn't
do any output except the totals and is much faster.
./bin/trace
Changed __unused__ to UNUSED to match source code.
./config/gnu-flags
Updated error message for pgcc. I've sent bug reports to the
pgcc people but the new version still has the same bug.
./configure.in
./config/conclude.in
./config/depend.in
Fixed dependencies for non-GNU makes when run in a directory
other than the hdf5 source tree.
Updated GNU `make dep' rules to copy the distributed
dependencies for non-GNU makes into the source tree when run
in some other directory.
Diffstat (limited to 'src/H5D.c')
-rw-r--r-- | src/H5D.c | 61 |
1 files changed, 61 insertions, 0 deletions
@@ -1545,6 +1545,9 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, * application's buffer. This saves at least one mem-to-mem copy. */ if (H5T_IS_NOOP(tpath) && sconv->read) { +#ifdef H5S_DEBUG + H5_timer_begin(&timer); +#endif status = (sconv->read)(dataset->ent.file, &(dataset->layout), &(dataset->create_parms->pline), &(dataset->create_parms->efl), @@ -1561,6 +1564,12 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, * fall through and xfer the data in the more roundabout way */ } else { /* direct xfer accomplished successfully */ +#ifdef H5S_DEBUG + H5_timer_end(&(sconv->stats[1].read_timer), &timer); + sconv->stats[1].read_nbytes += nelmts * + H5T_get_size(dataset->type); + sconv->stats[1].read_ncalls++; +#endif goto succeed; } #ifdef H5D_DEBUG @@ -1920,6 +1929,9 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, * application buffer to file. */ if (H5T_IS_NOOP(tpath) && sconv->write) { +#ifdef H5S_DEBUG + H5_timer_begin(&timer); +#endif status = (sconv->write)(dataset->ent.file, &(dataset->layout), &(dataset->create_parms->pline), &(dataset->create_parms->efl), @@ -1936,6 +1948,11 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space, * fall through and xfer the data in the more roundabout way */ } else { /* direct xfer accomplished successfully */ +#ifdef H5S_DEBUG + H5_timer_end(&(sconv->stats[0].write_timer), &timer); + sconv->stats[0].write_nbytes += nelmts * H5T_get_size(mem_type); + sconv->stats[0].write_ncalls++; +#endif goto succeed; } #ifdef H5D_DEBUG @@ -2515,3 +2532,47 @@ H5D_get_storage_size(H5D_t *dset) FUNC_LEAVE(size); } + + +/*------------------------------------------------------------------------- + * Function: H5Ddebug + * + * Purpose: Prints various information about a dataset. This function is + * not to be documented in the API at this time. + * + * Return: Success: Non-negative + * + * Failure: Negative + * + * Programmer: Robb Matzke + * Wednesday, April 28, 1999 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5Ddebug(hid_t dset_id, unsigned UNUSED flags) +{ + H5D_t *dset=NULL; + + FUNC_ENTER(H5Ddebug, FAIL); + H5TRACE2("e","iIu",dset_id,flags); + + /* Check args */ + if (H5I_DATASET!=H5I_get_type(dset_id) || + NULL==(dset=H5I_object(dset_id))) { + HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset"); + } + + /* Print B-tree information */ + if (H5D_CHUNKED==dset->layout.type) { + H5F_istore_dump_btree(dset->ent.file, stdout, dset->layout.ndims, + &(dset->layout.addr)); + } else if (H5D_CONTIGUOUS==dset->layout.type) { + HDfprintf(stdout, " %-10s %a\n", "Address:", + &(dset->layout.addr)); + } + + FUNC_LEAVE(SUCCEED); +} |