Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with caches of exactly 4000, 8000, 12000, .. particles #19

Open
GoogleCodeExporter opened this issue Jul 30, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. export exact 4000, 8000, 12000, 16000, .. particles into the icecache

What is the expected output? What do you see instead?
Some of the data gets corrupted. Looks like the icereader starts reading faulty.
(actually PointPosition looks fine but any other data is going wrong)

Please provide any additional information below.
I think it is to do with the chunk size. 
In icereader_util.py if you change ICECACHE_CHUNK_SIZE to e.g. 10000 it will 
work for 4000 particles.

I think in the chunks function (line 765) the second append should happen when 
elemCount != ICECACHE_CHUNK_SIZE. Changing to the following fixed it for me:

outChunks = []
chunks = elemCount / self.ICECACHE_CHUNK_SIZE
for i in xrange(chunks):
    outChunks.append(xrange((i)*self.ICECACHE_CHUNK_SIZE, (i+1)*self.ICECACHE_CHUNK_SIZE))
if not elemCount == self.ICECACHE_CHUNK_SIZE:
    outChunks.append(xrange( (i+1)*self.ICECACHE_CHUNK_SIZE, (i+1)*self.ICECACHE_CHUNK_SIZE + elemCount%self.ICECACHE_CHUNK_SIZE) )


hope this helps somebody bumping into the same issue..

Original issue reported on code.google.com by jo.pla...@gmail.com on 31 May 2013 at 10:35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant