[GRASS-git] [OSGeo/grass] c2c83c: grass.script: Add nprocs to raster.mapcalc functio...

Vaclav Petras noreply at github.com
Thu Nov 6 06:17:08 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: c2c83cc274c7bd75f6dbbc9680a29b6e9a6cc1b0
      https://github.com/OSGeo/grass/commit/c2c83cc274c7bd75f6dbbc9680a29b6e9a6cc1b0
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2025-11-06 (Thu, 06 Nov 2025)

  Changed paths:
    M python/grass/script/raster.py

  Log Message:
  -----------
  grass.script: Add nprocs to raster.mapcalc function (#6580)

With this change, callers of gs.mapcalc can now use nprocs to set number of processes for the underlying r.mapcalc. This makes it available to a number of Python tools which use gs.mapcalc to call r.mapcalc (as well as to user scripts).

The default is set to 1. Specifically, the parameter default is None which is translated to 1 as opposed to using r.mapcalc's default. As a result, r.mapcalc's default is now independent from the default of gs.mapcalc. At this point, it makes all the Python calls using gs.mapcalc behave as before, i.e., one core only, while direct usage of r.mapcalc uses the all-cores default as do the other C tools now.

Adds nprocs also to the mapcalc_start function with copy-pasted default and doc.

See also #6564 (discussion on default for r.mapcalc), #5731 (default for nprocs in C), and #5742 (r.mapcalc OpenMP version).



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list