Skip to content

CI(Ubuntu): Install latest version of Python for full config - #241

Open
echoix wants to merge 22 commits into
mainfrom
ubuntu-max-py313
Open

echoix wants to merge 22 commits into
mainfrom
ubuntu-max-py313

Conversation

@echoix

@echoix echoix commented Sep 24, 2024

Copy link
Copy Markdown
Owner

No description provided.

@github-actions github-actions Bot added the CI label Sep 24, 2024
wenzeslaus and others added 6 commits October 2, 2026 23:27
With nprocs > 1, walkers on different threads checked and reduced the
remaining infiltration capacity of a cell without synchronization. This
is a data race and undefined behavior in C: two walkers could both be
absorbed by the capacity left for one, or a reduction could be lost.

Run the unchanged infiltration code in a critical section, entered only
when an atomic read shows capacity left in the cell. Within the lock,
the code checks the capacity again, as another thread may have used it
up. The capacity is written atomically, since it is also read outside
of the lock. After the first step, few walkers are in a cell with
capacity left, so the lock is rarely taken.

The arithmetic and the conditions are unchanged. With one thread, the
depth maps computed from the elev_lid792_1m elevation, with and without
infiltration, are byte-identical to those before this change, and the
run time is the same within noise with 1 and 4 threads. With more
threads, the order in which walkers reach a cell still depends on
thread scheduling, as before. A new test checks that infiltration
removes exactly the capacity of the cells at 1 and 4 threads.

Written with the help of Claude Code.
With -t, r.sim.water wrote the series maps every (int)(output_step /
time step) iterations and named them by the simulated time rounded to
whole minutes. The truncated interval made the write times drift away
from the output steps, so two writes could round to the same minute and
the first map was overwritten, names could skip a minute or land on odd
minutes with an even output_step, and the last step was often missing.
When the time step was longer than output_step, the interval was zero
and no map was written at all while the tool still succeeded.

Write output step j at the iteration whose simulated time is closest to
j times output_step, and name and timestamp the maps by that time. The
time step comes from the cell size and the mean velocity, so iterations
usually do not fall on the output times. When one iteration is the
closest one to several steps, write only the step closest to it and
warn that the time step is longer than output_step. Do not write steps
past the duration. Always end the series with maps named by the
duration which hold the state at the end of the run, also when the
duration is not a multiple of output_step or when the run stopped
early. Walker vector maps follow the same schedule.

For users, each output step now appears once, named and timestamped by
a multiple of output_step, and the maps named by the duration are always
present. A series map holds the state at most half a time step before
or after the time in its name instead of up to several minutes before
it. The depth and discharge values are unchanged and so are the outputs
without -t. In the run summary, simulated_time of an output is the time
the maps were written and timestamp the time they are named by. New
tests check the names, timestamps and write times of the series, a
duration which is not a multiple of output_step, time steps longer
than output_step including its multiples, a step past the duration, and
an early stop.

Written with the help of Claude Code.
Store history region in g.region JSON format, use Tools API for region operations
…7999)

CI(deps): Update ubuntu:26.04 Docker digest to 88a381d

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* CI(deps): Update dependency pylint to v4.1.1

* Python: Fix new pylint chained-comparison and comparison-with-itself messages

Pylint 4.1 reports R1716 (chained-comparison) and R0124
(comparison-with-itself). Rewrite the flagged conditions as chained
comparisons, with unchanged logic, and use math.isnan() for the NaN
checks in c_libraries_interface.

Needed for the pylint update in OSGeo#7996. Drafted with AI assistance
(Claude Code); the changes are mechanical and were checked with
pylint 4.1.1 and ruff.

* Update pylint to 4.1.2

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Edouard Choinière <27212526+echoix@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants