From f224c59df9a00b6a193594945a44dceddf9dedac Mon Sep 17 00:00:00 2001 From: Thorsten Kurth Date: Mon, 12 Jan 2015 13:55:54 -0800 Subject: [PATCH] debugging --- include/qdp_hdf5.h | 10 +++++----- lib/qdp_hdf5.cc | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/qdp_hdf5.h b/include/qdp_hdf5.h index afd701bc9..8f1f2de98 100644 --- a/include/qdp_hdf5.h +++ b/include/qdp_hdf5.h @@ -418,7 +418,7 @@ namespace QDP { //*********************************************************************************************************************************** //helper routines for reading and writing objects: void readPrepare(const std::string& name, hid_t& type_id); - void readPrepare(const std::string& name, hid_t& type_id, multi1d& sizes); + void readPrepareLattice(const std::string& name, hid_t& type_id, multi1d& sizes); void 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); @@ -517,7 +517,7 @@ namespace QDP { multi1d sizes; ullong obj_size=0; hid_t type_id; - readPrepare(name,type_id,sizes); + readPrepareLattice(name,type_id,sizes); //sanity check: ullong float_size=H5Tget_size(type_id); @@ -556,7 +556,7 @@ namespace QDP { multi1d sizes; ullong obj_size=0; hid_t type_id; - readPrepare(name,type_id,sizes); + readPrepareLattice(name,type_id,sizes); //sanity check: ullong float_size=H5Tget_size(type_id); @@ -608,7 +608,7 @@ namespace QDP { multi1d sizes; ullong obj_size=0; hid_t type_id; - readPrepare(name,type_id,sizes); + readPrepareLattice(name,type_id,sizes); if(profile) swatch_prepare.stop(); //sanity check: @@ -675,7 +675,7 @@ namespace QDP { multi1d sizes; ullong obj_size=0; hid_t type_id; - readPrepare(name,type_id,sizes); + readPrepareLattice(name,type_id,sizes); swatch_prepare.stop(); //check sanity diff --git a/lib/qdp_hdf5.cc b/lib/qdp_hdf5.cc index 450771e8c..ca920f022 100644 --- a/lib/qdp_hdf5.cc +++ b/lib/qdp_hdf5.cc @@ -721,7 +721,7 @@ namespace QDP { //READING Lattice Types: //*********************************************************************************************************************************** //*********************************************************************************************************************************** - void HDF5::readPrepare(const std::string& name, hid_t& type_id, multi1d& sizes){ + void HDF5::readPrepareLattice(const std::string& name, hid_t& type_id, multi1d& sizes){ //determine whether there is a lattice with the specified name: bool exists=objectExists(current_group,name); if(!exists){ @@ -756,7 +756,7 @@ namespace QDP { H5Dclose(dset_id); //prefetch for faster I/O: - if(!isprefetched) prefetchLatticeCoordinates(); + if(!isprefetched && sizes.size()>1) 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) { @@ -866,7 +866,7 @@ namespace QDP { if(profile) swatch_prepare.start(); multi1d sizes; hid_t type_id; - readPrepare(name,type_id,sizes); + readPrepareLattice(name,type_id,sizes); if(profile) swatch_prepare.stop(); //do some datatype sanity checks and get the basis precision: @@ -932,7 +932,7 @@ namespace QDP { if(profile) swatch_prepare.start(); multi1d sizes; hid_t type_id; - readPrepare(name,type_id,sizes); + readPrepareLattice(name,type_id,sizes); if(profile) swatch_prepare.stop(); //do some datatype sanity checks and get the basis precision: