From 4503f93ff1d8362277497504aa616817c307215a Mon Sep 17 00:00:00 2001 From: Anna Petrasova Date: Wed, 5 Feb 2025 11:32:18 -0500 Subject: [PATCH] r.sim: properly fix turning off parallelization with mask on --- raster/r.sim/r.sim.sediment/main.c | 2 +- raster/r.sim/r.sim.water/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/raster/r.sim/r.sim.sediment/main.c b/raster/r.sim/r.sim.sediment/main.c index 8d49778d408..53252b9891f 100644 --- a/raster/r.sim/r.sim.sediment/main.c +++ b/raster/r.sim/r.sim.sediment/main.c @@ -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; } diff --git a/raster/r.sim/r.sim.water/main.c b/raster/r.sim/r.sim.water/main.c index 3c0f045a534..f78c05fc648 100644 --- a/raster/r.sim/r.sim.water/main.c +++ b/raster/r.sim/r.sim.water/main.c @@ -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; }