-
-
Notifications
You must be signed in to change notification settings - Fork 373
r.mapcalc: fix multiple outputs with nprocs > 1 #6670
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
base: main
Are you sure you want to change the base?
Conversation
|
Just ran a quick test, works fine! |
|
Tested again with commit 6a6df84, and result raster map is ok (nprocs >= 1). |
|
Speed of |
|
Try nprocs=4. In the tests of other tools, 4 was often optimal (some tools have benchmark - Python script and plots in the documentation). |
I tested nprocs=2,4,6,8,16. I have a local version that is faster when parallelized and produces readable (not corrupt) output, but the rows are mixed up. Maybe an approach like for |
|
I'm not quite sure of how this works, but perhaps another approach could be to serialise each |
This would lead to increased input reading times because the idea is that for several expressions as in the |
|
In I prefer to merge this PR as it is because it is a bugfix. As long as parallelization in Proper parallelization with OpenMP of |


Parallelized
r.mapcalcfails if multiple outputs are calculated with several expressions separated by;. This PR separates the evaluation of the expressions (calculating results) and writing out the results into different loops.Test case with the NC sample data:
expected success with
without this PR it should fail with nprocs > 1, e.g.
With this PR,
r.blend ... nprocs=16succeeds and the result is identical tor.blend ... nprocs=1Theoretically, there should be no significant speed penality with this change, but this needs to be tested.
Fixes #6158
Please test!
Still a draft because calls to
G_percent()need to be fixed.