[GRASS-git] [OSGeo/grass] 2e636f: r.sim: Replace custom chunk computation with OpenM...

Vaclav Petras noreply at github.com
Thu Oct 1 18:20:46 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 2e636fb7a0d111e90fc4f8111d556ff689ff9d96
      https://github.com/OSGeo/grass/commit/2e636fb7a0d111e90fc4f8111d556ff689ff9d96
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2026-10-02 (Fri, 02 Oct 2026)

  Changed paths:
    M raster/r.sim/simlib/hydro.c

  Log Message:
  -----------
  r.sim: Replace custom chunk computation with OpenMP for loop (#7995)

The walker loop computed each thread's range of walkers by hand from
the thread number and count. A worksharing loop with static schedule
does the same with one pragma, and ends with an implicit barrier, so
code after the loop in the same parallel region sees all walkers
processed without adding an explicit barrier (no barrier in the
current code). The loop variable is private in
a worksharing loop, so it is no longer listed as firstprivate.

Single-threaded results do not change: the depth and discharge maps
computed from the NC SPM elevation, with and without infiltration and
diffusion, are byte-identical to those before this change, and the
run time is the same within noise.

Written with the help of Claude Code.



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