From a839e0ab16192ffd73ba106ba84de184bf8f9046 Mon Sep 17 00:00:00 2001 From: Thorsten Kurth Date: Mon, 12 Jan 2015 11:47:53 -0800 Subject: [PATCH] debugging --- include/qdp_hdf5.h | 2 +- lib/qdp_hdf5.cc | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/qdp_hdf5.h b/include/qdp_hdf5.h index 5f631bdc2..afd701bc9 100644 --- a/include/qdp_hdf5.h +++ b/include/qdp_hdf5.h @@ -77,7 +77,7 @@ namespace QDP { } //prefetch mapping for CB->lexicographical: - int prefetchCoordinates(); + int prefetchLatticeCoordinates(); //*********************************************************************************************************************************** //*********************************************************************************************************************************** diff --git a/lib/qdp_hdf5.cc b/lib/qdp_hdf5.cc index de2be225c..450771e8c 100644 --- a/lib/qdp_hdf5.cc +++ b/lib/qdp_hdf5.cc @@ -268,7 +268,7 @@ namespace QDP { } //prefetch mapping for CB->lexicographical: - int HDF5::prefetchCoordinates(){ + int HDF5::prefetchLatticeCoordinates(){ const int mynode = Layout::nodeNumber(); //measure @@ -622,7 +622,7 @@ namespace QDP { HDF5_error_exit("HDF5::read: error, cannot open dataset!"); } type_id=H5Dget_type(dset_id); - H5Dclose(dset_id); + H5Dclose(dset_id); } //complex types: @@ -722,7 +722,7 @@ namespace QDP { //*********************************************************************************************************************************** //*********************************************************************************************************************************** void HDF5::readPrepare(const std::string& name, hid_t& type_id, multi1d& sizes){ - //determine whether there is a lattice with the specified name: + //determine whether there is a lattice with the specified name: bool exists=objectExists(current_group,name); if(!exists){ HDF5_error_exit("HDF5::read: error, dataset does not exists!"); @@ -754,6 +754,9 @@ namespace QDP { H5Sclose(filespace); H5Dclose(dset_id); + + //prefetch for faster I/O: + if(!isprefetched) prefetchLatticeCoordinates(); } void HDF5::readLattice(const std::string& name, const hid_t& type_id, const hid_t& base_type_id, const ullong& obj_size, const ullong& tot_size, REAL* buf) { @@ -1675,7 +1678,7 @@ namespace QDP { } //prefetch for faster I/O: - if(!isprefetched) prefetchCoordinates(); + if(!isprefetched) prefetchLatticeCoordinates(); } void HDF5Writer::writeLattice(const std::string& name, const hid_t& datatype, const ullong& obj_size, char* buf){