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

grass.script: ensure memmap content is flushed before writing to a raster #3206

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

petrasovaa
Copy link
Contributor

numpy.memap needs to be flushed so that grass.script.array.write() method writes correct content to a raster. The problem was found when running on an HPC with fairly large array that was being modified and then written to raster - only portion of it was being written correctly, the rest was empty.

May be worth including in 8.3.1 release.

@petrasovaa petrasovaa added bug Something isn't working raster Related to raster data processing Python Related code is in Python backport to 8.3 labels Oct 18, 2023
@petrasovaa petrasovaa added this to the 8.3.1 milestone Oct 18, 2023
Copy link
Member

@wenzeslaus wenzeslaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This fits with the NumPy documentation.

For the tests, please just update your branch from main.

@neteler
Copy link
Member

neteler commented Oct 22, 2023

May this PR be merged and backported, to become part of 8.3.1?

@petrasovaa petrasovaa changed the title grass.script.array: ensure memmap content is flushed before writing to a raster grass.script: ensure memmap content is flushed before writing to a raster Oct 24, 2023
@petrasovaa petrasovaa merged commit 08e2a61 into OSGeo:main Oct 24, 2023
18 checks passed
@petrasovaa petrasovaa deleted the array-flush branch October 24, 2023 01:16
landam pushed a commit to landam/grass that referenced this pull request Oct 25, 2023
neteler pushed a commit to nilason/grass that referenced this pull request Nov 7, 2023
HuidaeCho pushed a commit to HuidaeCho/grass that referenced this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Python Related code is in Python raster Related to raster data processing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants