From 60c5b150b77ac9f02722d812a910279fa5b3e79a Mon Sep 17 00:00:00 2001 From: Ryan James Date: Mon, 16 Nov 2026 12:21:16 -0700 Subject: [PATCH] Pin BLAS to one thread per xdist worker in CI Co-authored-by: Cursor --- .github/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e6346d9..f7ee042 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,6 +71,10 @@ jobs: - name: Run tests env: COVERAGE_CORE: sysmon + # One BLAS thread per xdist worker: OpenBLAS (Linux/Windows wheels) otherwise starts a thread per + # CPU in every worker, and the oversubscription stalls the many tiny LAPACK calls of the optimizers. + OPENBLAS_NUM_THREADS: 1 + OMP_NUM_THREADS: 1 run: >- uv run pytest ${{ (matrix.os == 'macos-latest' && matrix.python-version == '3.14') && '--cov-report=xml' || '--no-cov' }} @@ -110,6 +114,9 @@ jobs: run: uv sync --extra test - name: Run tests + env: + OPENBLAS_NUM_THREADS: 1 + OMP_NUM_THREADS: 1 run: uv run pytest --no-cov lint: