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

r.patch: fix race condition for CELL rasters #2410

Merged
merged 1 commit into from
May 27, 2022

Conversation

petrasovaa
Copy link
Contributor

@petrasovaa petrasovaa commented May 26, 2022

Currently with nprocs > 1 and output CELL type, there is a race condition on line https://github.com/OSGeo/grass/blob/main/raster/r.patch/main.c#L230 (and in do_patch function as well). This is a quick fix that disables collecting and applying statistics from input for CELL type and nprocs > 1 (effectively activating -s flag).

A proper fix should create an array of the stats structures for each thread and then apply them all in support function, this requires more changes.

@petrasovaa petrasovaa added bug Something isn't working backport_needed raster Related to raster data processing labels May 26, 2022
@petrasovaa petrasovaa added this to the 8.2.0 milestone May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working raster Related to raster data processing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants