diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2007-10-03 19:48:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2007-10-03 19:48:00 +0000 |
commit | 69c20fb28b2522080b81ddd151b05cea9943c87c (patch) | |
tree | 43aae3bff85b51dc8a3c2265b5d0fac387039150 /Carpet/CarpetIOHDF5/src/Output.cc | |
parent | d7ae6754804f8636d774725d2daa5e9c4a30dc32 (diff) |
CarpetIOHDF5: Record time spent in I/O
darcs-hash:20071003194857-dae7b-d8bb68e9c4ee52559fea874b3f80a57eebf9650f.gz
Diffstat (limited to 'Carpet/CarpetIOHDF5/src/Output.cc')
-rw-r--r-- | Carpet/CarpetIOHDF5/src/Output.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Carpet/CarpetIOHDF5/src/Output.cc b/Carpet/CarpetIOHDF5/src/Output.cc index 2e5795d09..94b1b6822 100644 --- a/Carpet/CarpetIOHDF5/src/Output.cc +++ b/Carpet/CarpetIOHDF5/src/Output.cc @@ -29,6 +29,7 @@ static int AddAttributes (const cGH *const cctkGH, const char *fullname, int WriteVarUnchunked (const cGH* const cctkGH, hid_t outfile, + long long & io_bytes, const ioRequest* const request, bool called_from_checkpoint) { @@ -228,6 +229,9 @@ int WriteVarUnchunked (const cGH* const cctkGH, overlapshape, NULL)); HDF5_ERROR (H5Dwrite (memdataset, memdatatype, overlap_dataspace, dataspace, H5P_DEFAULT, data)); + io_bytes += + H5Sget_simple_extent_npoints (overlap_dataspace) * + H5Tget_size (filedatatype); HDF5_ERROR (H5Sclose (overlap_dataspace)); // Add metadata information on the first time through @@ -277,6 +281,7 @@ int WriteVarUnchunked (const cGH* const cctkGH, int WriteVarChunkedSequential (const cGH* const cctkGH, hid_t outfile, + long long & io_bytes, const ioRequest* const request, bool called_from_checkpoint) { @@ -406,6 +411,9 @@ int WriteVarChunkedSequential (const cGH* const cctkGH, HDF5_ERROR (dataspace = H5Screate_simple (group.dim, shape, NULL)); HDF5_ERROR (dataset = H5Dcreate (outfile, datasetname.str().c_str(), filedatatype, dataspace, plist)); + io_bytes += + H5Sget_simple_extent_npoints (dataspace) * + H5Tget_size (filedatatype); HDF5_ERROR (H5Pclose (plist)); HDF5_ERROR (H5Sclose (dataspace)); HDF5_ERROR (H5Dwrite (dataset, memdatatype, H5S_ALL, H5S_ALL, @@ -432,6 +440,7 @@ int WriteVarChunkedSequential (const cGH* const cctkGH, int WriteVarChunkedParallel (const cGH* const cctkGH, hid_t outfile, + long long & io_bytes, const ioRequest* const request, bool called_from_checkpoint) { @@ -554,6 +563,8 @@ int WriteVarChunkedParallel (const cGH* const cctkGH, HDF5_ERROR (dataspace = H5Screate_simple (group.dim, shape, NULL)); HDF5_ERROR (dataset = H5Dcreate (outfile, datasetname.str().c_str(), filedatatype, dataspace, plist)); + io_bytes += + H5Sget_simple_extent_npoints (dataspace) * H5Tget_size (filedatatype); HDF5_ERROR (H5Pclose (plist)); HDF5_ERROR (H5Sclose (dataspace)); HDF5_ERROR (H5Dwrite (dataset, memdatatype, H5S_ALL, H5S_ALL, |