Skip to content

Commit

Permalink
r.sim: properly fix turning off parallelization with mask on (#5052)
Browse files Browse the repository at this point in the history
  • Loading branch information
petrasovaa authored Feb 5, 2025
1 parent 1ac1808 commit 1436bb2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion raster/r.sim/r.sim.sediment/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ int main(int argc, char *argv[])
threads, abs(threads));
threads = abs(threads);
}
if (threads > 1 && Rast_mask_is_present()) {
if (threads > 1 && G_find_raster("MASK", G_mapset()) != NULL) {
G_warning(_("Parallel processing disabled due to active mask."));
threads = 1;
}
Expand Down
2 changes: 1 addition & 1 deletion raster/r.sim/r.sim.water/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ int main(int argc, char *argv[])
threads, abs(threads));
threads = abs(threads);
}
if (threads > 1 && Rast_mask_is_present()) {
if (threads > 1 && G_find_raster("MASK", G_mapset()) != NULL) {
G_warning(_("Parallel processing disabled due to active mask."));
threads = 1;
}
Expand Down

0 comments on commit 1436bb2

Please sign in to comment.