From 4c833747fb1b27fd834731ff87a2f447fa374a4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Mon, 13 Jul 2026 12:20:48 +0000 Subject: [PATCH] CI: Set OMP_NUM_THREADS=1 for tests run in parallel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We observed some random, transient timeouts on different tests. For one of them, t.list, there was no reason to fail on macOS, where there are 3 cores instead of 2 in GitHub Actions. There's a possibility that there's a problem with the temporal library locking up somewhere, but there’s also a small chance that the r.mapcalc calls are now using multiple processors. It "costs" not much to add this env var so that the number of threads is limited, even if it doesn't fix all problems; it might just fix some potential ones, since we are already running in parallel in that section. --- .github/workflows/macos.yml | 3 +++ .github/workflows/pytest.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 64753c2cf38..d0ca14b6c9a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -104,6 +104,9 @@ jobs: @.github/workflows/pytest_args_parallel.txt \ --junitxml=pytest.xdist.junit.xml \ -k 'not testsuite' + env: + OMP_NUM_THREADS: 1 + - name: Run pytest with a single worker (for tests marked with needs_solo_run) shell: micromamba-shell {0} run: | diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 8bed78c0a9d..f6a9f65a3c7 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -105,6 +105,8 @@ jobs: @.github/workflows/pytest_args_parallel.txt \ --junitxml=pytest.xdist.junit.xml \ -k 'not testsuite' + env: + OMP_NUM_THREADS: 1 - name: Run pytest with a single worker (for tests marked with needs_solo_run) run: |