Skip to content

Commit

Permalink
r.patch: disable parallelization when MASK is active (OSGeo#2829)
Browse files Browse the repository at this point in the history
  • Loading branch information
petrasovaa authored and neteler committed Nov 7, 2023
1 parent d794d2b commit 582b163
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions raster/r.patch/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ int main(int argc, char *argv[])
"threads setting."));
nprocs = 1;
#endif
if (nprocs > 1 && G_find_raster("MASK", G_mapset()) != NULL) {
G_warning(_("Parallel processing disabled due to active MASK."));
nprocs = 1;
}

use_zero = (zeroflag->answer);
no_support = (nosupportflag->answer);
Expand Down

0 comments on commit 582b163

Please sign in to comment.