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

Perform calculations on blocks determined by a working memory limit option #1693

Merged
merged 5 commits into from
May 15, 2019

Conversation

sgillies
Copy link
Member

@sgillies sgillies commented May 15, 2019

Resolves #1668

The gist: we have a new --mem-limit option which defaults to 64 (megabytes). For very large calculations, we divide the work into square-ish regions such that the calculation results of these regions are no larger than the memory limit. For example, to run rio calc "(asarray (read 1 1), (* (read 1 2) 1.1), (read 1 3))" (boosts the green band of an RGB image by 10%) on a 7000 x 7000 pixel 3-band uint8 dataset without chunking would require --mem-limit=148. With the default 64 MB memory limit, the work would be done in 4 chunks.

@sgillies
Copy link
Member Author

Original tests are passing and it's working on some biggish datasets I have on my laptop. I'll merge this later today unless we spot any issues.

@sgillies sgillies merged commit 9d70654 into maint-1.0 May 15, 2019
@sgillies sgillies deleted the blockwise-rio-calc branch May 15, 2019 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant