[hdf-compass] 71/295: Fix wrong value for chunk slots
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Sun May 8 10:35:27 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/master
in repository hdf-compass.
commit d7de92e064fd9a5bc1598e7d29f5cfe9147b688c
Author: Andrew Collette <andrew.collette at gmail.com>
Date: Tue May 5 21:59:44 2015 -0600
Fix wrong value for chunk slots
---
hdf5_model/__init__.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hdf5_model/__init__.py b/hdf5_model/__init__.py
index 2a11c2c..4b3b1e8 100644
--- a/hdf5_model/__init__.py
+++ b/hdf5_model/__init__.py
@@ -45,7 +45,7 @@ class HDF5Store(compass_model.Store):
file_extensions = {'HDF5 File': ['*.hdf5', '*.h5']}
- CACHE_NCHUNKS = 100 # Cache at most this many chunks per dataset
+ CACHE_NSLOTS = 521 # Cache tuning parameter; see HDF5 docs
CACHE_NBYTES = int(25e6) # Cache at most this many bytes per dataset
def __contains__(self, key):
@@ -91,7 +91,7 @@ class HDF5Store(compass_model.Store):
fapl = h5py.h5p.create(h5py.h5p.FILE_ACCESS)
# First argument is ignored by HDF5.
# Last argument adjusts the preemption policy (0.0 = simple LRU)
- fapl.set_cache(0, self.CACHE_NCHUNKS, self.CACHE_NBYTES, 0.0)
+ fapl.set_cache(0, self.CACHE_NSLOTS, self.CACHE_NBYTES, 0.0)
fid = h5py.h5f.open(path, h5py.h5f.ACC_RDONLY, fapl=fapl)
self.f = h5py.File(fid)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/hdf-compass.git
More information about the debian-science-commits
mailing list