From 1eb07320467109d59d9227f6ffca0959607dc8b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 15:11:39 +0100 Subject: [PATCH 01/92] iter --- .github/workflows/test.yml | 239 +++++++++++++++++++++++++++++++++++++ 1 file changed, 239 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bc9eb44c..97d30f67 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,6 +9,15 @@ on: pull_request: branches: - master + schedule: + # Daily build at 1:00 AM UTC + - cron: "0 1 * * *" + +# Cancel in-progress workflows when pushing +# a new commit on the same branch +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: @@ -27,3 +36,233 @@ jobs: - name: Run black run: | black --check --diff . + + testing: + name: Testing + needs: linting + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + include: + + - pylatest_conda_forge_mkl: + os: windows-latest + PYTHON_VERSION: "*" + PACKAGER: "conda-forge" + BLAS: "mkl" + - py310_conda_forge_openblas + os: windows-latest + PYTHON_VERSION: "3.10" + PACKAGER: "conda-forge" + BLAS: "openblas" + - py39_conda + os: windows-latest + PYTHON_VERSION: "3.9" + PACKAGER: "conda" + - py38_pip + os: windows-latest + PYTHON_VERSION: "3.8" + PACKAGER: "pip" + + # MacOS env with OpenMP installed through homebrew + - name: py38_conda_homebrew_libomp + os: macos-latest + PYTHON_VERSION: "3.8" + PACKAGER: "conda" + BLAS: "openblas" + CC_OUTER_LOOP: "clang" + CC_INNER_LOOP: "clang" + INSTALL_LIBOMP: "homebrew" + # MacOS env with OpenBLAS and OpenMP installed through conda-forge compilers + - name: pylatest_conda_forge_clang_openblas + os: macos-latest + PYTHON_VERSION: "*" + PACKAGER: "conda-forge" + BLAS: "openblas" + CC_OUTER_LOOP: "clang" + CC_INNER_LOOP: "clang" + INSTALL_LIBOMP: "conda-forge" + # MacOS env with MKL and with OpenMP installed through conda-forge compilers + - name: pylatest_conda_forge_clang + os: macos-latest + PYTHON_VERSION: "*" + PACKAGER: "conda-forge" + BLAS: "mkl" + CC_OUTER_LOOP: "clang" + CC_INNER_LOOP: "clang" + INSTALL_LIBOMP: "conda-forge" + # MacOS env with FlexiBLAS + - name: pylatest_flexiblas + os: macos-latest + PYTHON_VERSION: "*" + PACKAGER: "conda" + INSTALL_BLAS: "flexiblas" + PLATFORM_SPECIFIC_PACKAGES: "mkl" + CC_OUTER_LOOP: "clang" + CC_INNER_LOOP: "clang" + + # Linux environments to test that packages that comes with Ubuntu 20.04 + # are correctly handled. + - name: py38_ubuntu_atlas_gcc_gcc + os: ubuntu-20.04 + PYTHON_VERSION: "3.8" + PACKAGER: "ubuntu" + APT_BLAS: "libatlas3-base libatlas-base-dev" + CC_OUTER_LOOP: "gcc" + CC_INNER_LOOP: "gcc" + - name: py38_ubuntu_openblas_gcc_gcc + os: ubuntu-20.04 + PYTHON_VERSION: "3.8" + PACKAGER: "ubuntu" + APT_BLAS: "libopenblas-base libopenblas-dev" + CC_OUTER_LOOP: "gcc" + CC_INNER_LOOP: "gcc" + + # Linux environment with development versions of numpy and scipy + - name: pylatest_pip_dev + os : ubuntu-latest + PACKAGER: "pip-dev" + PYTHON_VERSION: "*" + CC_OUTER_LOOP: "gcc" + CC_INNER_LOOP: "gcc" + # Linux + Python 3.9 and homogeneous runtime nesting. + - name: py39_conda_openblas_clang_clang + os: ubuntu-latest + PACKAGER: "conda" + PYTHON_VERSION: "3.9" + BLAS: "openblas" + CC_OUTER_LOOP: "clang-10" + CC_INNER_LOOP: "clang-10" + # Linux environment with MKL and Clang (known to be unsafe for + # threadpoolctl) to only test the warning from multiple OpenMP. + - name: pylatest_conda_mkl_clang_gcc + os: ubuntu-latest + PYTHON_VERSION: "*" + PACKAGER: "conda" + BLAS: "mkl" + CC_OUTER_LOOP: "clang-10" + CC_INNER_LOOP: "gcc" + TESTS: "libomp_libiomp_warning" + # Linux environment with MKL, safe for threadpoolctl. + - name: pylatest_conda_mkl_gcc_gcc + os: ubuntu-latest + PYTHON_VERSION: "*" + PACKAGER: "conda" + BLAS: "mkl" + CC_OUTER_LOOP: "gcc" + CC_INNER_LOOP: "gcc" + MKL_THREADING_LAYER: "INTEL" + # Linux + Python 3.8 with numpy / scipy installed with pip from PyPI + # and heterogeneous OpenMP runtimes. + - name: py38_pip_openblas_gcc_clang + os: ubuntu-latest + PACKAGER: "pip" + PYTHON_VERSION: "3.8" + CC_OUTER_LOOP: "gcc" + CC_INNER_LOOP: "clang-10" + # Linux environment with numpy from conda-forge channel and openblas-openmp + - name: pylatest_conda_forge + os: ubuntu-latest + PACKAGER: "conda-forge" + PYTHON_VERSION: "*" + BLAS: "openblas" + OPENBLAS_THREADING_LAYER: "openmp" + CC_OUTER_LOOP: "gcc" + CC_INNER_LOOP: "gcc" + # Linux environment with no numpy and heterogeneous OpenMP runtimes. + - name: pylatest_conda_nonumpy_gcc_clang + os: ubuntu-latest + PACKAGER: "conda" + PYTHON_VERSION: "*" + NO_NUMPY: "true" + CC_OUTER_LOOP: "gcc" + CC_INNER_LOOP: "clang-10" + + # Linux environments with numpy linked to BLIS + - name: pylatest_blis_gcc_clang_openmp + os: ubuntu-latest + PACKAGER: "conda" + PYTHON_VERSION: "*" + INSTALL_BLAS: "blis" + BLIS_NUM_THREAEDS: "4" + CC_OUTER_LOOP: "gcc" + CC_INNER_LOOP: "gcc" + BLIS_CC: "clang-10" + BLIS_ENABLE_THREADING: "openmp" + - name: pylatest_blis_clang_gcc_pthreads + os: ubuntu-latest + PACKAGER: "conda" + PYTHON_VERSION: "*" + INSTALL_BLAS: "blis" + BLIS_NUM_THREADS: "4" + CC_OUTER_LOOP: "clang-10" + CC_INNER_LOOP: "clang-10" + BLIS_CC: "gcc-8" + BLIS_ENABLE_THREADING: "pthreads" + - name: pylatest_blis_no_threading + os: ubuntu-latest + PACKAGER: "conda" + PYTHON_VERSION: "*" + INSTALL_BLAS: "blis" + BLIS_NUM_THREADS: "1" + CC_OUTER_LOOP: "gcc" + CC_INNER_LOOP: "gcc" + BLIS_CC: "gcc-8" + BLIS_ENABLE_THREADING: "no" + + # Linux env with FlexiBLAS + - name: pylatest_flexiblas + os: ubuntu-latest + PACKAGER: "conda" + PYTHON_VERSION: "*" + INSTALL_BLAS: "flexiblas" + PLATFORM_SPECIFIC_PACKAGES: "mkl" + CC_OUTER_LOOP: "gcc" + CC_INNER_LOOP: "gcc" + + env: ${{ matrix }} + + runs-on: ${{ matrix.os }} + + defaults: + run: + # Need to use this shell to get conda working properly. + # See https://github.com/marketplace/actions/setup-miniconda#important + shell: ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -el {0}' }} + + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-activate-base: true + auto-update-conda: true + miniforge-version: latest + + - name: Install without custom BLAS + if: ${{ matrix.INSTALL_BLAS == '' }} + run: | + bash -el continuous_integration/install.sh + + - name: Install with BLIS + if: ${{ matrix.INSTALL_BLAS == 'blis' }} + run: | + bash -el continuous_integration/install_with_blis.sh + + - name: Install with FlexiBLAS + if: ${{ matrix.INSTALL_BLAS == 'flexiblas' }} + run: | + bash -el continuous_integration/install_with_flexiblas.sh + + - name: Test library + run: | + bash -el continuous_integration/runtest.sh + + - name: Upload to Codecov + uses: codecov/codecov-action@v5 + with: + files: coverage.xml From ef776ff2a5a4d0b8f1ffb98c477d460c1d365c20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 15:17:09 +0100 Subject: [PATCH 02/92] iter --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 97d30f67..c96944b4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,21 +46,21 @@ jobs: matrix: include: - - pylatest_conda_forge_mkl: + - name: pylatest_conda_forge_mkl: os: windows-latest PYTHON_VERSION: "*" PACKAGER: "conda-forge" BLAS: "mkl" - - py310_conda_forge_openblas + - name: py310_conda_forge_openblas os: windows-latest PYTHON_VERSION: "3.10" PACKAGER: "conda-forge" BLAS: "openblas" - - py39_conda + - name: py39_conda os: windows-latest PYTHON_VERSION: "3.9" PACKAGER: "conda" - - py38_pip + - name: py38_pip os: windows-latest PYTHON_VERSION: "3.8" PACKAGER: "pip" From 9f820661498163c1942728cee2c3afe3b5d6652b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 15:18:16 +0100 Subject: [PATCH 03/92] iter --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c96944b4..33fa0068 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,7 +46,7 @@ jobs: matrix: include: - - name: pylatest_conda_forge_mkl: + - name: pylatest_conda_forge_mkl os: windows-latest PYTHON_VERSION: "*" PACKAGER: "conda-forge" From d4d0b2ec7bd9f4e1a85af439d1e3e9feba24461c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 17:19:52 +0100 Subject: [PATCH 04/92] iter --- .github/workflows/test.yml | 4 - continuous_integration/install_env.sh | 114 ++++++++++++++++++++++++++ 2 files changed, 114 insertions(+), 4 deletions(-) create mode 100644 continuous_integration/install_env.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 33fa0068..b5fbf9cd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -182,7 +182,6 @@ jobs: # Linux environments with numpy linked to BLIS - name: pylatest_blis_gcc_clang_openmp os: ubuntu-latest - PACKAGER: "conda" PYTHON_VERSION: "*" INSTALL_BLAS: "blis" BLIS_NUM_THREAEDS: "4" @@ -192,7 +191,6 @@ jobs: BLIS_ENABLE_THREADING: "openmp" - name: pylatest_blis_clang_gcc_pthreads os: ubuntu-latest - PACKAGER: "conda" PYTHON_VERSION: "*" INSTALL_BLAS: "blis" BLIS_NUM_THREADS: "4" @@ -202,7 +200,6 @@ jobs: BLIS_ENABLE_THREADING: "pthreads" - name: pylatest_blis_no_threading os: ubuntu-latest - PACKAGER: "conda" PYTHON_VERSION: "*" INSTALL_BLAS: "blis" BLIS_NUM_THREADS: "1" @@ -214,7 +211,6 @@ jobs: # Linux env with FlexiBLAS - name: pylatest_flexiblas os: ubuntu-latest - PACKAGER: "conda" PYTHON_VERSION: "*" INSTALL_BLAS: "flexiblas" PLATFORM_SPECIFIC_PACKAGES: "mkl" diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh new file mode 100644 index 00000000..f08c6942 --- /dev/null +++ b/continuous_integration/install_env.sh @@ -0,0 +1,114 @@ +#!/bin/bash + +# License: BSD 3-Clause + +set -xe + +# Install a recent version of clang and libomp if needed +# Only applicable on linux jobs +if [[ "$CC_OUTER_LOOP" == "clang-10" ]] || \ + [[ "$CC_INNER_LOOP" == "clang-10" ]] || \ + [[ "$BLIS_CC" == "clang-10" ]] +then + wget https://apt.llvm.org/llvm.sh + chmod +x llvm.sh + sudo ./llvm.sh 10 + sudo apt-get install libomp-dev +fi + +# Install gcc 8 to build BLIS +if [[ "$BLIS_CC" == "gcc-8" ]]; then + sudo apt install gcc-8 +fi + +make_conda() { + CHANNEL="$1" + TO_INSTALL="setuptools $2" + if [[ "$UNAMESTR" == "Darwin" ]]; then + if [[ "$INSTALL_LIBOMP" == "conda-forge" ]]; then + # Install an OpenMP-enabled clang/llvm from conda-forge + # assumes conda-forge is set on priority channel + TO_INSTALL="$TO_INSTALL compilers llvm-openmp" + + export CFLAGS="$CFLAGS -I$CONDA/envs/$VIRTUALENV/include" + export LDFLAGS="$LDFLAGS -Wl,-rpath,$CONDA/envs/$VIRTUALENV/lib -L$CONDA/envs/$VIRTUALENV/lib" + + elif [[ "$INSTALL_LIBOMP" == "homebrew" ]]; then + # Install a compiler with a working openmp + HOMEBREW_NO_AUTO_UPDATE=1 brew install libomp + + # enable OpenMP support for Apple-clang + export CC=/usr/bin/clang + export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp" + export CFLAGS="$CFLAGS -I/usr/local/opt/libomp/include" + export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/local/opt/libomp/lib -L/usr/local/opt/libomp/lib -lomp" + fi + fi + conda update -n base conda conda-libmamba-solver -q --yes + conda config --set solver libmamba + conda create -n testenv -q --yes -c $CHANNEL python=$PYTHON_VERSION $TO_INSTALL + conda activate testenv +} + + +if [[ "$PACKAGER" == "conda" ]]; then + TO_INSTALL="" + if [[ "$NO_NUMPY" != "true" ]]; then + TO_INSTALL="$TO_INSTALL numpy scipy blas[build=$BLAS]" + fi + make_conda "default" $TO_INSTALL + +elif [[ "$PACKAGER" == "conda-forge" ]]; then + TO_INSTALL="numpy scipy blas[build=$BLAS]" + if [[ "$BLAS" == "openblas" && "$OPENBLAS_THREADING_LAYER" == "openmp" ]]; then + TO_INSTALL="$TO_INSTALL libopenblas=*=*openmp*" + fi + make_conda "conda-forge" $TO_INSTALL + +elif [[ "$PACKAGER" == "pip" ]]; then + # Use conda to build an empty python env and then use pip to install + # numpy and scipy + TO_INSTALL="" + make_conda "conda-forge" $TO_INSTALL + if [[ "$NO_NUMPY" != "true" ]]; then + pip install numpy scipy + fi + +elif [[ "$PACKAGER" == "pip-dev" ]]; then + # Use conda to build an empty python env and then use pip to install + # numpy and scipy dev versions + make_conda "conda-forge" "" + + dev_anaconda_url=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple + pip install --pre --upgrade --timeout=60 --extra-index $dev_anaconda_url numpy scipy + +elif [[ "$PACKAGER" == "ubuntu" ]]; then + # Remove the ubuntu toolchain PPA that seems to be invalid: + # https://github.com/scikit-learn/scikit-learn/pull/13934 + sudo add-apt-repository --remove ppa:ubuntu-toolchain-r/test + sudo apt-get update + sudo apt-get install python3-scipy python3-virtualenv $APT_BLAS + python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV + source $VIRTUALENV/bin/activate + +elif [[ "$INSTALL_BLAS" == "BLIS" ]]; then + TO_INSTALL="cython meson-python pkg-config" + make_conda "conda-forge" $TO_INSTALL + bash ./continuous_integration/install_blis.sh + +elif [[ "$INSTALL_BLAS" == "FlexiBLAS" ]]; then + TO_INSTALL="cython openblas $PLATFORM_SPECIFIC_PACKAGES meson-python pkg-config compilers" + make_conda "conda-forge" $TO_INSTALL + bash ./continuous_integration/install_flexiblas.sh + +fi + + +python -m pip install -q -r dev-requirements.txt +bash ./continuous_integration/build_test_ext.sh + +python --version +python -c "import numpy; print(f'numpy {numpy.__version__}')" || echo "no numpy" +python -c "import scipy; print(f'scipy {scipy.__version__}')" || echo "no scipy" + +python -m flit install --symlink From 7bf6195fbc49a528d5d7dfb1d778fe622a1f5ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 17:24:30 +0100 Subject: [PATCH 05/92] iter --- continuous_integration/install_env.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index f08c6942..d431030e 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -46,7 +46,8 @@ make_conda() { fi conda update -n base conda conda-libmamba-solver -q --yes conda config --set solver libmamba - conda create -n testenv -q --yes -c $CHANNEL python=$PYTHON_VERSION $TO_INSTALL + conda config --add channels $CHANNEL + conda create -n testenv -q --yes python=$PYTHON_VERSION $TO_INSTALL conda activate testenv } @@ -88,8 +89,8 @@ elif [[ "$PACKAGER" == "ubuntu" ]]; then sudo add-apt-repository --remove ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install python3-scipy python3-virtualenv $APT_BLAS - python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV - source $VIRTUALENV/bin/activate + python3 -m virtualenv --system-site-packages --python=python3 testenv + source testenv/bin/activate elif [[ "$INSTALL_BLAS" == "BLIS" ]]; then TO_INSTALL="cython meson-python pkg-config" From 608460372581b5d6b622f0c30184a9bd77213fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 17:29:14 +0100 Subject: [PATCH 06/92] iter --- continuous_integration/install_with_blis.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/continuous_integration/install_with_blis.sh b/continuous_integration/install_with_blis.sh index 15ef3a5e..06dfc897 100755 --- a/continuous_integration/install_with_blis.sh +++ b/continuous_integration/install_with_blis.sh @@ -9,7 +9,7 @@ popd # Install a recent version of clang and libomp wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh -sudo ./llvm.sh 10 +sudo ./llvm.sh 17 sudo apt-get install libomp-dev # create conda env From 9f45a6e4ed74b2da0d2c74fdb1c916b551c82484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 17:30:49 +0100 Subject: [PATCH 07/92] iter --- continuous_integration/install_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index d431030e..9731f770 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -12,7 +12,7 @@ if [[ "$CC_OUTER_LOOP" == "clang-10" ]] || \ then wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh - sudo ./llvm.sh 10 + sudo ./llvm.sh 17 sudo apt-get install libomp-dev fi From da303aed0e404befbb20e7c20989748c05723f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 17:34:06 +0100 Subject: [PATCH 08/92] iter --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b5fbf9cd..f2010f1c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -242,7 +242,7 @@ jobs: - name: Install without custom BLAS if: ${{ matrix.INSTALL_BLAS == '' }} run: | - bash -el continuous_integration/install.sh + bash -el continuous_integration/install_env.sh - name: Install with BLIS if: ${{ matrix.INSTALL_BLAS == 'blis' }} From 28c92ca6a2eb9e12ea630bcebea97b60d5f2321f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 17:36:16 +0100 Subject: [PATCH 09/92] iter --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f2010f1c..e27190e8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -254,9 +254,9 @@ jobs: run: | bash -el continuous_integration/install_with_flexiblas.sh - - name: Test library - run: | - bash -el continuous_integration/runtest.sh + #- name: Test library + # run: | + # bash -el continuous_integration/runtest.sh - name: Upload to Codecov uses: codecov/codecov-action@v5 From d43b4e145fa1e92079c4f78cfb622cb2fcd9f98b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 17:44:25 +0100 Subject: [PATCH 10/92] iter --- .github/workflows/test.yml | 16 ++++++++-------- continuous_integration/install_env.sh | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e27190e8..f1c966a0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -132,8 +132,8 @@ jobs: PACKAGER: "conda" PYTHON_VERSION: "3.9" BLAS: "openblas" - CC_OUTER_LOOP: "clang-10" - CC_INNER_LOOP: "clang-10" + CC_OUTER_LOOP: "clang-17" + CC_INNER_LOOP: "clang-17" # Linux environment with MKL and Clang (known to be unsafe for # threadpoolctl) to only test the warning from multiple OpenMP. - name: pylatest_conda_mkl_clang_gcc @@ -141,7 +141,7 @@ jobs: PYTHON_VERSION: "*" PACKAGER: "conda" BLAS: "mkl" - CC_OUTER_LOOP: "clang-10" + CC_OUTER_LOOP: "clang-17" CC_INNER_LOOP: "gcc" TESTS: "libomp_libiomp_warning" # Linux environment with MKL, safe for threadpoolctl. @@ -160,7 +160,7 @@ jobs: PACKAGER: "pip" PYTHON_VERSION: "3.8" CC_OUTER_LOOP: "gcc" - CC_INNER_LOOP: "clang-10" + CC_INNER_LOOP: "clang-17" # Linux environment with numpy from conda-forge channel and openblas-openmp - name: pylatest_conda_forge os: ubuntu-latest @@ -177,7 +177,7 @@ jobs: PYTHON_VERSION: "*" NO_NUMPY: "true" CC_OUTER_LOOP: "gcc" - CC_INNER_LOOP: "clang-10" + CC_INNER_LOOP: "clang-17" # Linux environments with numpy linked to BLIS - name: pylatest_blis_gcc_clang_openmp @@ -187,15 +187,15 @@ jobs: BLIS_NUM_THREAEDS: "4" CC_OUTER_LOOP: "gcc" CC_INNER_LOOP: "gcc" - BLIS_CC: "clang-10" + BLIS_CC: "clang-17" BLIS_ENABLE_THREADING: "openmp" - name: pylatest_blis_clang_gcc_pthreads os: ubuntu-latest PYTHON_VERSION: "*" INSTALL_BLAS: "blis" BLIS_NUM_THREADS: "4" - CC_OUTER_LOOP: "clang-10" - CC_INNER_LOOP: "clang-10" + CC_OUTER_LOOP: "clang-17" + CC_INNER_LOOP: "clang-17" BLIS_CC: "gcc-8" BLIS_ENABLE_THREADING: "pthreads" - name: pylatest_blis_no_threading diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 9731f770..0781fd6a 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -6,9 +6,9 @@ set -xe # Install a recent version of clang and libomp if needed # Only applicable on linux jobs -if [[ "$CC_OUTER_LOOP" == "clang-10" ]] || \ - [[ "$CC_INNER_LOOP" == "clang-10" ]] || \ - [[ "$BLIS_CC" == "clang-10" ]] +if [[ "$CC_OUTER_LOOP" == "clang-17" ]] || \ + [[ "$CC_INNER_LOOP" == "clang-17" ]] || \ + [[ "$BLIS_CC" == "clang-17" ]] then wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh From 60de1502c84876ddb23ab5bedc6956258605b749 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 17:54:56 +0100 Subject: [PATCH 11/92] iter --- continuous_integration/build_test_ext.sh | 2 +- continuous_integration/install_env.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/continuous_integration/build_test_ext.sh b/continuous_integration/build_test_ext.sh index bd0e1ae7..235bb235 100755 --- a/continuous_integration/build_test_ext.sh +++ b/continuous_integration/build_test_ext.sh @@ -12,7 +12,7 @@ fi pushd tests/_openmp_test_helper rm -rf *.c *.so *.dylib build/ -python setup_inner.py build_ext -i +python setup_inner.py --verbose build_ext -i python setup_outer.py build_ext -i # skip scipy required extension if no numpy diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 0781fd6a..f143f6bd 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -57,7 +57,7 @@ if [[ "$PACKAGER" == "conda" ]]; then if [[ "$NO_NUMPY" != "true" ]]; then TO_INSTALL="$TO_INSTALL numpy scipy blas[build=$BLAS]" fi - make_conda "default" $TO_INSTALL + make_conda "defaults" $TO_INSTALL elif [[ "$PACKAGER" == "conda-forge" ]]; then TO_INSTALL="numpy scipy blas[build=$BLAS]" From 4fb9ccf4876c0d3adc2d54b8619a45d09503a0f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 18:09:30 +0100 Subject: [PATCH 12/92] iter --- continuous_integration/build_test_ext.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/continuous_integration/build_test_ext.sh b/continuous_integration/build_test_ext.sh index 235bb235..74eb03a3 100755 --- a/continuous_integration/build_test_ext.sh +++ b/continuous_integration/build_test_ext.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -e +set -xe if [[ "$OSTYPE" == "linux-gnu"* ]]; then pushd tests/_pyMylib From 452309803f013b682ab8073158979671d5df02df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 18:17:38 +0100 Subject: [PATCH 13/92] iter --- continuous_integration/build_test_ext.sh | 2 +- tests/_openmp_test_helper/setup_inner.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/continuous_integration/build_test_ext.sh b/continuous_integration/build_test_ext.sh index 74eb03a3..4bc27696 100755 --- a/continuous_integration/build_test_ext.sh +++ b/continuous_integration/build_test_ext.sh @@ -12,7 +12,7 @@ fi pushd tests/_openmp_test_helper rm -rf *.c *.so *.dylib build/ -python setup_inner.py --verbose build_ext -i +python setup_inner.py build_ext -i python setup_outer.py build_ext -i # skip scipy required extension if no numpy diff --git a/tests/_openmp_test_helper/setup_inner.py b/tests/_openmp_test_helper/setup_inner.py index 4e045c02..d7fbf667 100644 --- a/tests/_openmp_test_helper/setup_inner.py +++ b/tests/_openmp_test_helper/setup_inner.py @@ -12,6 +12,13 @@ # with different compilers and therefore different OpenMP runtimes. inner_loop_cc_var = set_cc_variables("CC_INNER_LOOP") openmp_flag = get_openmp_flag() + print() + print("#################") + print("#################") + print(openmp_flag) + print("#################") + print("#################") + print() ext_modules = [ Extension( From 9ac58dfbd5534b44ccdb33dba52c18f330d1b9af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 18:21:31 +0100 Subject: [PATCH 14/92] ??? --- tests/_openmp_test_helper/setup_inner.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/_openmp_test_helper/setup_inner.py b/tests/_openmp_test_helper/setup_inner.py index d7fbf667..0264a7e5 100644 --- a/tests/_openmp_test_helper/setup_inner.py +++ b/tests/_openmp_test_helper/setup_inner.py @@ -12,13 +12,6 @@ # with different compilers and therefore different OpenMP runtimes. inner_loop_cc_var = set_cc_variables("CC_INNER_LOOP") openmp_flag = get_openmp_flag() - print() - print("#################") - print("#################") - print(openmp_flag) - print("#################") - print("#################") - print() ext_modules = [ Extension( @@ -40,6 +33,7 @@ }, compile_time_env={"CC_INNER_LOOP": inner_loop_cc_var or "unknown"}, ), + verbose=True, ) finally: From bfb03a1b216cf2bb95e73af1235a10fb5c8690cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 18:27:32 +0100 Subject: [PATCH 15/92] iter --- tests/_openmp_test_helper/setup_inner.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/_openmp_test_helper/setup_inner.py b/tests/_openmp_test_helper/setup_inner.py index 0264a7e5..547e257a 100644 --- a/tests/_openmp_test_helper/setup_inner.py +++ b/tests/_openmp_test_helper/setup_inner.py @@ -1,7 +1,6 @@ import os -from distutils.core import setup +from setuptools import Extension, setup from Cython.Build import cythonize -from distutils.extension import Extension from build_utils import set_cc_variables from build_utils import get_openmp_flag @@ -33,7 +32,6 @@ }, compile_time_env={"CC_INNER_LOOP": inner_loop_cc_var or "unknown"}, ), - verbose=True, ) finally: From baa06a3d976f41f5cc137aa934a7ccd1475e2339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 18:35:25 +0100 Subject: [PATCH 16/92] iter --- tests/_openmp_test_helper/setup_inner.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/_openmp_test_helper/setup_inner.py b/tests/_openmp_test_helper/setup_inner.py index 547e257a..6b73864d 100644 --- a/tests/_openmp_test_helper/setup_inner.py +++ b/tests/_openmp_test_helper/setup_inner.py @@ -12,6 +12,8 @@ inner_loop_cc_var = set_cc_variables("CC_INNER_LOOP") openmp_flag = get_openmp_flag() + print(os.environ.get("CC")) + ext_modules = [ Extension( "openmp_helpers_inner", From ea4a4d6b776d289365699b85d4e4f342a4621aa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 18:58:27 +0100 Subject: [PATCH 17/92] iter --- continuous_integration/install_env.sh | 5 +++++ tests/_openmp_test_helper/setup_inner.py | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index f143f6bd..7388e8be 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -4,6 +4,9 @@ set -xe +UNAMESTR=`uname` + + # Install a recent version of clang and libomp if needed # Only applicable on linux jobs if [[ "$CC_OUTER_LOOP" == "clang-17" ]] || \ @@ -14,6 +17,8 @@ then chmod +x llvm.sh sudo ./llvm.sh 17 sudo apt-get install libomp-dev + + sudo find / -name "omp.h" fi # Install gcc 8 to build BLIS diff --git a/tests/_openmp_test_helper/setup_inner.py b/tests/_openmp_test_helper/setup_inner.py index 6b73864d..547e257a 100644 --- a/tests/_openmp_test_helper/setup_inner.py +++ b/tests/_openmp_test_helper/setup_inner.py @@ -12,8 +12,6 @@ inner_loop_cc_var = set_cc_variables("CC_INNER_LOOP") openmp_flag = get_openmp_flag() - print(os.environ.get("CC")) - ext_modules = [ Extension( "openmp_helpers_inner", From 8dcfa62fbc2db6d4d43553be5d68333fa8be20c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 19:09:19 +0100 Subject: [PATCH 18/92] iter --- .github/workflows/test.yml | 16 ++++++++-------- continuous_integration/install_env.sh | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f1c966a0..16a1e3b7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -132,8 +132,8 @@ jobs: PACKAGER: "conda" PYTHON_VERSION: "3.9" BLAS: "openblas" - CC_OUTER_LOOP: "clang-17" - CC_INNER_LOOP: "clang-17" + CC_OUTER_LOOP: "clang-18" + CC_INNER_LOOP: "clang-18" # Linux environment with MKL and Clang (known to be unsafe for # threadpoolctl) to only test the warning from multiple OpenMP. - name: pylatest_conda_mkl_clang_gcc @@ -141,7 +141,7 @@ jobs: PYTHON_VERSION: "*" PACKAGER: "conda" BLAS: "mkl" - CC_OUTER_LOOP: "clang-17" + CC_OUTER_LOOP: "clang-18" CC_INNER_LOOP: "gcc" TESTS: "libomp_libiomp_warning" # Linux environment with MKL, safe for threadpoolctl. @@ -160,7 +160,7 @@ jobs: PACKAGER: "pip" PYTHON_VERSION: "3.8" CC_OUTER_LOOP: "gcc" - CC_INNER_LOOP: "clang-17" + CC_INNER_LOOP: "clang-18" # Linux environment with numpy from conda-forge channel and openblas-openmp - name: pylatest_conda_forge os: ubuntu-latest @@ -177,7 +177,7 @@ jobs: PYTHON_VERSION: "*" NO_NUMPY: "true" CC_OUTER_LOOP: "gcc" - CC_INNER_LOOP: "clang-17" + CC_INNER_LOOP: "clang-18" # Linux environments with numpy linked to BLIS - name: pylatest_blis_gcc_clang_openmp @@ -187,15 +187,15 @@ jobs: BLIS_NUM_THREAEDS: "4" CC_OUTER_LOOP: "gcc" CC_INNER_LOOP: "gcc" - BLIS_CC: "clang-17" + BLIS_CC: "clang-18" BLIS_ENABLE_THREADING: "openmp" - name: pylatest_blis_clang_gcc_pthreads os: ubuntu-latest PYTHON_VERSION: "*" INSTALL_BLAS: "blis" BLIS_NUM_THREADS: "4" - CC_OUTER_LOOP: "clang-17" - CC_INNER_LOOP: "clang-17" + CC_OUTER_LOOP: "clang-18" + CC_INNER_LOOP: "clang-18" BLIS_CC: "gcc-8" BLIS_ENABLE_THREADING: "pthreads" - name: pylatest_blis_no_threading diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 7388e8be..97b9ed9c 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -9,13 +9,13 @@ UNAMESTR=`uname` # Install a recent version of clang and libomp if needed # Only applicable on linux jobs -if [[ "$CC_OUTER_LOOP" == "clang-17" ]] || \ - [[ "$CC_INNER_LOOP" == "clang-17" ]] || \ - [[ "$BLIS_CC" == "clang-17" ]] +if [[ "$CC_OUTER_LOOP" == "clang-18" ]] || \ + [[ "$CC_INNER_LOOP" == "clang-18" ]] || \ + [[ "$BLIS_CC" == "clang-18" ]] then wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh - sudo ./llvm.sh 17 + sudo ./llvm.sh 18 sudo apt-get install libomp-dev sudo find / -name "omp.h" From bf1c81be15dce970e39c29dfa19897346cd9bd0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 19:24:18 +0100 Subject: [PATCH 19/92] iter --- continuous_integration/install_env.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 97b9ed9c..59099261 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -62,20 +62,20 @@ if [[ "$PACKAGER" == "conda" ]]; then if [[ "$NO_NUMPY" != "true" ]]; then TO_INSTALL="$TO_INSTALL numpy scipy blas[build=$BLAS]" fi - make_conda "defaults" $TO_INSTALL + make_conda "defaults" "$TO_INSTALL" elif [[ "$PACKAGER" == "conda-forge" ]]; then TO_INSTALL="numpy scipy blas[build=$BLAS]" if [[ "$BLAS" == "openblas" && "$OPENBLAS_THREADING_LAYER" == "openmp" ]]; then TO_INSTALL="$TO_INSTALL libopenblas=*=*openmp*" fi - make_conda "conda-forge" $TO_INSTALL + make_conda "conda-forge" "$TO_INSTALL" elif [[ "$PACKAGER" == "pip" ]]; then # Use conda to build an empty python env and then use pip to install # numpy and scipy TO_INSTALL="" - make_conda "conda-forge" $TO_INSTALL + make_conda "conda-forge" "$TO_INSTALL" if [[ "$NO_NUMPY" != "true" ]]; then pip install numpy scipy fi @@ -99,12 +99,12 @@ elif [[ "$PACKAGER" == "ubuntu" ]]; then elif [[ "$INSTALL_BLAS" == "BLIS" ]]; then TO_INSTALL="cython meson-python pkg-config" - make_conda "conda-forge" $TO_INSTALL + make_conda "conda-forge" "$TO_INSTALL" bash ./continuous_integration/install_blis.sh elif [[ "$INSTALL_BLAS" == "FlexiBLAS" ]]; then TO_INSTALL="cython openblas $PLATFORM_SPECIFIC_PACKAGES meson-python pkg-config compilers" - make_conda "conda-forge" $TO_INSTALL + make_conda "conda-forge" "$TO_INSTALL" bash ./continuous_integration/install_flexiblas.sh fi From eb68c45127af26e7b6dd44898e5af30174741ede Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 19:42:11 +0100 Subject: [PATCH 20/92] iter --- continuous_integration/install_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 59099261..96ff946a 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -110,7 +110,7 @@ elif [[ "$INSTALL_BLAS" == "FlexiBLAS" ]]; then fi -python -m pip install -q -r dev-requirements.txt +python -m pip install -v -q -r dev-requirements.txt bash ./continuous_integration/build_test_ext.sh python --version From 4e561d89cdc0dc55f4679d01481e8a4cac7d0a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 19:44:29 +0100 Subject: [PATCH 21/92] iter --- continuous_integration/install_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 96ff946a..a41af6c6 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -52,7 +52,7 @@ make_conda() { conda update -n base conda conda-libmamba-solver -q --yes conda config --set solver libmamba conda config --add channels $CHANNEL - conda create -n testenv -q --yes python=$PYTHON_VERSION $TO_INSTALL + conda create -n testenv -q --yes python=$PYTHON_VERSION python-gil $TO_INSTALL conda activate testenv } From f1178a5cc0a47f502d06e84bf07d1303b35b457b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 21:15:01 +0100 Subject: [PATCH 22/92] iter --- continuous_integration/install_env.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index a41af6c6..f6cbeab5 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -60,7 +60,10 @@ make_conda() { if [[ "$PACKAGER" == "conda" ]]; then TO_INSTALL="" if [[ "$NO_NUMPY" != "true" ]]; then - TO_INSTALL="$TO_INSTALL numpy scipy blas[build=$BLAS]" + TO_INSTALL="$TO_INSTALL numpy scipy" + if [[ -n "$BLAS" ]]; then + TO_INSTALL="$TO_INSTALL blas[build=$BLAS]" + fi fi make_conda "defaults" "$TO_INSTALL" @@ -74,8 +77,7 @@ elif [[ "$PACKAGER" == "conda-forge" ]]; then elif [[ "$PACKAGER" == "pip" ]]; then # Use conda to build an empty python env and then use pip to install # numpy and scipy - TO_INSTALL="" - make_conda "conda-forge" "$TO_INSTALL" + make_conda "conda-forge" "" if [[ "$NO_NUMPY" != "true" ]]; then pip install numpy scipy fi From da68ca947e5916c20c71c8a81061a983241fe5c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 21:26:06 +0100 Subject: [PATCH 23/92] iter --- continuous_integration/install_env.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index f6cbeab5..3d6486ba 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -49,6 +49,12 @@ make_conda() { export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/local/opt/libomp/lib -L/usr/local/opt/libomp/lib -lomp" fi fi + + if [[ "$PYTHON_VERSION" == "*" ]]; then + # Avoid installing free-threaded python + TO_INSTALL="$TO_INSTALL python-gil" + fi + conda update -n base conda conda-libmamba-solver -q --yes conda config --set solver libmamba conda config --add channels $CHANNEL From 4172137632972aaa370227d9727db8d0f7cecac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 22:30:17 +0100 Subject: [PATCH 24/92] iter --- continuous_integration/install_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 3d6486ba..72ebdb2a 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -58,7 +58,7 @@ make_conda() { conda update -n base conda conda-libmamba-solver -q --yes conda config --set solver libmamba conda config --add channels $CHANNEL - conda create -n testenv -q --yes python=$PYTHON_VERSION python-gil $TO_INSTALL + conda create -n testenv -q --yes python=$PYTHON_VERSION $TO_INSTALL conda activate testenv } From 2c64983a4bd42c7a8b59703a860b49aebb2c60be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 22:44:28 +0100 Subject: [PATCH 25/92] iter --- continuous_integration/install_env.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 72ebdb2a..3186bd7a 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -35,8 +35,8 @@ make_conda() { # assumes conda-forge is set on priority channel TO_INSTALL="$TO_INSTALL compilers llvm-openmp" - export CFLAGS="$CFLAGS -I$CONDA/envs/$VIRTUALENV/include" - export LDFLAGS="$LDFLAGS -Wl,-rpath,$CONDA/envs/$VIRTUALENV/lib -L$CONDA/envs/$VIRTUALENV/lib" + export CFLAGS="$CFLAGS -I$CONDA/envs/testenv/include" + export LDFLAGS="$LDFLAGS -Wl,-rpath,$CONDA/envs/testenv/lib -L$CONDA/envs/testenv/lib" elif [[ "$INSTALL_LIBOMP" == "homebrew" ]]; then # Install a compiler with a working openmp From d17258bec3bd478ed74cf111fbe108d4366d9158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 22:54:27 +0100 Subject: [PATCH 26/92] iter --- continuous_integration/install_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 3186bd7a..a85fc31d 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -55,9 +55,9 @@ make_conda() { TO_INSTALL="$TO_INSTALL python-gil" fi + conda config --add channels $CHANNEL conda update -n base conda conda-libmamba-solver -q --yes conda config --set solver libmamba - conda config --add channels $CHANNEL conda create -n testenv -q --yes python=$PYTHON_VERSION $TO_INSTALL conda activate testenv } From 706782176d36856f8b895594b7cdd4e99aa710c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 23:31:56 +0100 Subject: [PATCH 27/92] iter --- continuous_integration/install_env.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index a85fc31d..19961fe6 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -35,8 +35,8 @@ make_conda() { # assumes conda-forge is set on priority channel TO_INSTALL="$TO_INSTALL compilers llvm-openmp" - export CFLAGS="$CFLAGS -I$CONDA/envs/testenv/include" - export LDFLAGS="$LDFLAGS -Wl,-rpath,$CONDA/envs/testenv/lib -L$CONDA/envs/testenv/lib" + # export CFLAGS="$CFLAGS -I$CONDA/envs/testenv/include" + # export LDFLAGS="$LDFLAGS -Wl,-rpath,$CONDA/envs/testenv/lib -L$CONDA/envs/testenv/lib" elif [[ "$INSTALL_LIBOMP" == "homebrew" ]]; then # Install a compiler with a working openmp From f76bec97c7eb4d6752814eea0c04efe6c02005bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 23:37:04 +0100 Subject: [PATCH 28/92] iter --- continuous_integration/install_env.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 19961fe6..f6cd9804 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -60,6 +60,8 @@ make_conda() { conda config --set solver libmamba conda create -n testenv -q --yes python=$PYTHON_VERSION $TO_INSTALL conda activate testenv + + which clang } From 0c2f93e83cace628dc15f6cde4b97fc0624bed72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 23:45:30 +0100 Subject: [PATCH 29/92] iter --- .github/workflows/test.yml | 4 ++-- continuous_integration/install_env.sh | 4 ++-- tests/_openmp_test_helper/setup_nested_prange_blas.py | 3 +-- tests/_openmp_test_helper/setup_outer.py | 3 +-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 16a1e3b7..864c0a9a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,8 +80,8 @@ jobs: PYTHON_VERSION: "*" PACKAGER: "conda-forge" BLAS: "openblas" - CC_OUTER_LOOP: "clang" - CC_INNER_LOOP: "clang" + # CC_OUTER_LOOP: "clang" + # CC_INNER_LOOP: "clang" INSTALL_LIBOMP: "conda-forge" # MacOS env with MKL and with OpenMP installed through conda-forge compilers - name: pylatest_conda_forge_clang diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index f6cd9804..3a0387be 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -35,8 +35,8 @@ make_conda() { # assumes conda-forge is set on priority channel TO_INSTALL="$TO_INSTALL compilers llvm-openmp" - # export CFLAGS="$CFLAGS -I$CONDA/envs/testenv/include" - # export LDFLAGS="$LDFLAGS -Wl,-rpath,$CONDA/envs/testenv/lib -L$CONDA/envs/testenv/lib" + export CFLAGS="$CFLAGS -I$CONDA/envs/testenv/include" + export LDFLAGS="$LDFLAGS -Wl,-rpath,$CONDA/envs/testenv/lib -L$CONDA/envs/testenv/lib" elif [[ "$INSTALL_LIBOMP" == "homebrew" ]]; then # Install a compiler with a working openmp diff --git a/tests/_openmp_test_helper/setup_nested_prange_blas.py b/tests/_openmp_test_helper/setup_nested_prange_blas.py index 809f981c..dcb39ca6 100644 --- a/tests/_openmp_test_helper/setup_nested_prange_blas.py +++ b/tests/_openmp_test_helper/setup_nested_prange_blas.py @@ -1,7 +1,6 @@ import os -from distutils.core import setup +from setuptools import Extension, setup from Cython.Build import cythonize -from distutils.extension import Extension from build_utils import set_cc_variables from build_utils import get_openmp_flag diff --git a/tests/_openmp_test_helper/setup_outer.py b/tests/_openmp_test_helper/setup_outer.py index 98a84d58..dee39b1a 100644 --- a/tests/_openmp_test_helper/setup_outer.py +++ b/tests/_openmp_test_helper/setup_outer.py @@ -1,7 +1,6 @@ import os -from distutils.core import setup +from setuptools import Extension, setup from Cython.Build import cythonize -from distutils.extension import Extension from build_utils import set_cc_variables from build_utils import get_openmp_flag From 31c2bbbd0f51ef6b819210c501cf5a6f15c6b97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Thu, 6 Mar 2025 23:53:22 +0100 Subject: [PATCH 30/92] iter --- .github/workflows/test.yml | 4 ---- continuous_integration/install_env.sh | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 864c0a9a..a95f809d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,8 +80,6 @@ jobs: PYTHON_VERSION: "*" PACKAGER: "conda-forge" BLAS: "openblas" - # CC_OUTER_LOOP: "clang" - # CC_INNER_LOOP: "clang" INSTALL_LIBOMP: "conda-forge" # MacOS env with MKL and with OpenMP installed through conda-forge compilers - name: pylatest_conda_forge_clang @@ -89,8 +87,6 @@ jobs: PYTHON_VERSION: "*" PACKAGER: "conda-forge" BLAS: "mkl" - CC_OUTER_LOOP: "clang" - CC_INNER_LOOP: "clang" INSTALL_LIBOMP: "conda-forge" # MacOS env with FlexiBLAS - name: pylatest_flexiblas diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 3a0387be..f6cd9804 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -35,8 +35,8 @@ make_conda() { # assumes conda-forge is set on priority channel TO_INSTALL="$TO_INSTALL compilers llvm-openmp" - export CFLAGS="$CFLAGS -I$CONDA/envs/testenv/include" - export LDFLAGS="$LDFLAGS -Wl,-rpath,$CONDA/envs/testenv/lib -L$CONDA/envs/testenv/lib" + # export CFLAGS="$CFLAGS -I$CONDA/envs/testenv/include" + # export LDFLAGS="$LDFLAGS -Wl,-rpath,$CONDA/envs/testenv/lib -L$CONDA/envs/testenv/lib" elif [[ "$INSTALL_LIBOMP" == "homebrew" ]]; then # Install a compiler with a working openmp From e9b882fed3f2d6b49e26f17d2407764311631fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 00:05:29 +0100 Subject: [PATCH 31/92] iter --- continuous_integration/install_env.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index f6cd9804..a4180658 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -70,13 +70,13 @@ if [[ "$PACKAGER" == "conda" ]]; then if [[ "$NO_NUMPY" != "true" ]]; then TO_INSTALL="$TO_INSTALL numpy scipy" if [[ -n "$BLAS" ]]; then - TO_INSTALL="$TO_INSTALL blas[build=$BLAS]" + TO_INSTALL="$TO_INSTALL blas=*=$BLAS" fi fi make_conda "defaults" "$TO_INSTALL" elif [[ "$PACKAGER" == "conda-forge" ]]; then - TO_INSTALL="numpy scipy blas[build=$BLAS]" + TO_INSTALL="numpy scipy blas=*=$BLAS" if [[ "$BLAS" == "openblas" && "$OPENBLAS_THREADING_LAYER" == "openmp" ]]; then TO_INSTALL="$TO_INSTALL libopenblas=*=*openmp*" fi From c0adc8610074706df08d5f9e8f048566e51e41d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 00:26:10 +0100 Subject: [PATCH 32/92] iter --- continuous_integration/install_env.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index a4180658..802fb90f 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -58,6 +58,9 @@ make_conda() { conda config --add channels $CHANNEL conda update -n base conda conda-libmamba-solver -q --yes conda config --set solver libmamba + + conda search blas --channel conda-forge + conda create -n testenv -q --yes python=$PYTHON_VERSION $TO_INSTALL conda activate testenv From 844e36a8585dbe22968db4b557f19ad433c6cd9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 00:46:12 +0100 Subject: [PATCH 33/92] iter --- .github/workflows/test.yml | 7 ------- continuous_integration/install_env.sh | 5 ++--- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a95f809d..cda9ba1b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -81,13 +81,6 @@ jobs: PACKAGER: "conda-forge" BLAS: "openblas" INSTALL_LIBOMP: "conda-forge" - # MacOS env with MKL and with OpenMP installed through conda-forge compilers - - name: pylatest_conda_forge_clang - os: macos-latest - PYTHON_VERSION: "*" - PACKAGER: "conda-forge" - BLAS: "mkl" - INSTALL_LIBOMP: "conda-forge" # MacOS env with FlexiBLAS - name: pylatest_flexiblas os: macos-latest diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 802fb90f..b2a1bb8c 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -35,13 +35,12 @@ make_conda() { # assumes conda-forge is set on priority channel TO_INSTALL="$TO_INSTALL compilers llvm-openmp" - # export CFLAGS="$CFLAGS -I$CONDA/envs/testenv/include" - # export LDFLAGS="$LDFLAGS -Wl,-rpath,$CONDA/envs/testenv/lib -L$CONDA/envs/testenv/lib" - elif [[ "$INSTALL_LIBOMP" == "homebrew" ]]; then # Install a compiler with a working openmp HOMEBREW_NO_AUTO_UPDATE=1 brew install libomp + find / -name "omp.h" + # enable OpenMP support for Apple-clang export CC=/usr/bin/clang export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp" From d59312089bf60196994b2a04dc4f49687cbfa6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 00:50:50 +0100 Subject: [PATCH 34/92] iter --- continuous_integration/install_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index b2a1bb8c..019ed94e 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -39,7 +39,7 @@ make_conda() { # Install a compiler with a working openmp HOMEBREW_NO_AUTO_UPDATE=1 brew install libomp - find / -name "omp.h" + sudo find / -name "omp.h" # enable OpenMP support for Apple-clang export CC=/usr/bin/clang From 20079dc464645cca2c23295499a180156e86f8cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 00:59:21 +0100 Subject: [PATCH 35/92] iter --- continuous_integration/install_env.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 019ed94e..9b99c91e 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -39,13 +39,11 @@ make_conda() { # Install a compiler with a working openmp HOMEBREW_NO_AUTO_UPDATE=1 brew install libomp - sudo find / -name "omp.h" - # enable OpenMP support for Apple-clang export CC=/usr/bin/clang export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp" - export CFLAGS="$CFLAGS -I/usr/local/opt/libomp/include" - export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/local/opt/libomp/lib -L/usr/local/opt/libomp/lib -lomp" + export CFLAGS="$CFLAGS -I/opt/libomp/include" + export LDFLAGS="$LDFLAGS -Wl,-rpath,/opt/libomp/lib -L/opt/libomp/lib -lomp" fi fi From bf4812fa95d7e0ed22a7a5bca4975066a05dcba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 01:04:05 +0100 Subject: [PATCH 36/92] iter --- continuous_integration/install_env.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 9b99c91e..d4d102f4 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -39,6 +39,8 @@ make_conda() { # Install a compiler with a working openmp HOMEBREW_NO_AUTO_UPDATE=1 brew install libomp + brew info libomp + # enable OpenMP support for Apple-clang export CC=/usr/bin/clang export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp" @@ -55,9 +57,6 @@ make_conda() { conda config --add channels $CHANNEL conda update -n base conda conda-libmamba-solver -q --yes conda config --set solver libmamba - - conda search blas --channel conda-forge - conda create -n testenv -q --yes python=$PYTHON_VERSION $TO_INSTALL conda activate testenv From 07b6c161edcebe0632e4cbde3162626b043c1e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 10:35:04 +0100 Subject: [PATCH 37/92] iter --- continuous_integration/install_env.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index d4d102f4..8dec673c 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -44,8 +44,8 @@ make_conda() { # enable OpenMP support for Apple-clang export CC=/usr/bin/clang export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp" - export CFLAGS="$CFLAGS -I/opt/libomp/include" - export LDFLAGS="$LDFLAGS -Wl,-rpath,/opt/libomp/lib -L/opt/libomp/lib -lomp" + export CFLAGS="$CFLAGS -I/opt/homebrew/opt/libomp/include" + export LDFLAGS="$LDFLAGS -Wl,-rpath,/opt/homebrew/opt/libomp/lib -L/opt/homebrew/opt/libomp/lib -lomp" fi fi From 18d07ee0bf85a5fe968d89681be347e696e56dce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 10:49:46 +0100 Subject: [PATCH 38/92] iter --- .github/workflows/test.yml | 18 ++++----- continuous_integration/install_blis.sh | 53 ++++++++++++++++++++++++++ continuous_integration/install_env.sh | 2 - 3 files changed, 62 insertions(+), 11 deletions(-) create mode 100644 continuous_integration/install_blis.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cda9ba1b..7d28c0fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -229,19 +229,19 @@ jobs: miniforge-version: latest - name: Install without custom BLAS - if: ${{ matrix.INSTALL_BLAS == '' }} + # if: ${{ matrix.INSTALL_BLAS == '' }} run: | bash -el continuous_integration/install_env.sh - - name: Install with BLIS - if: ${{ matrix.INSTALL_BLAS == 'blis' }} - run: | - bash -el continuous_integration/install_with_blis.sh + # - name: Install with BLIS + # if: ${{ matrix.INSTALL_BLAS == 'blis' }} + # run: | + # bash -el continuous_integration/install_with_blis.sh - - name: Install with FlexiBLAS - if: ${{ matrix.INSTALL_BLAS == 'flexiblas' }} - run: | - bash -el continuous_integration/install_with_flexiblas.sh + # - name: Install with FlexiBLAS + # if: ${{ matrix.INSTALL_BLAS == 'flexiblas' }} + # run: | + # bash -el continuous_integration/install_with_flexiblas.sh #- name: Test library # run: | diff --git a/continuous_integration/install_blis.sh b/continuous_integration/install_blis.sh new file mode 100644 index 00000000..096b9e87 --- /dev/null +++ b/continuous_integration/install_blis.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +set -xe + +# step outside of threadpoolctl directory +pushd .. +ABS_PATH=$(pwd) + +# build & install blis +mkdir BLIS_install +git clone https://github.com/flame/blis.git + +pushd blis +./configure --prefix=$ABS_PATH/BLIS_install --enable-cblas --enable-threading=$BLIS_ENABLE_THREADING CC=$BLIS_CC auto +make -j4 +make install +popd + +# build & install numpy +git clone https://github.com/numpy/numpy.git +pushd numpy +git submodule update --init + +echo "libdir=$ABS_PATH/BLIS_install/lib/ +includedir=$ABS_PATH/BLIS_install/include/blis/ +version=latest +extralib=-lm -lpthread -lgfortran +Name: blis +Description: BLIS +Version: \${version} +Libs: -L\${libdir} -lblis +Libs.private: \${extralib} +Cflags: -I\${includedir}" > blis.pc + +PKG_CONFIG_PATH=$ABS_PATH/numpy/ pip install . -v --no-build-isolation -Csetup-args=-Dblas=blis +popd + +# back to threadpoolctl directory +popd + +ython -m pip install -q -r dev-requirements.txt +CFLAGS=-I$ABS_PATH/BLIS_install/include/blis \ + LDFLAGS="-L$ABS_PATH/BLIS_install/lib -Wl,-rpath,$ABS_PATH/BLIS_install/lib" \ + bash ./continuous_integration/build_test_ext.sh + +# Check that BLIS is linked +ldd tests/_openmp_test_helper/nested_prange_blas.cpython*.so + +python --version +python -c "import numpy; print(f'numpy {numpy.__version__}')" || echo "no numpy" +python -c "import scipy; print(f'scipy {scipy.__version__}')" || echo "no scipy" + +python -m flit install --symlink diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 8dec673c..73d53e3e 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -39,8 +39,6 @@ make_conda() { # Install a compiler with a working openmp HOMEBREW_NO_AUTO_UPDATE=1 brew install libomp - brew info libomp - # enable OpenMP support for Apple-clang export CC=/usr/bin/clang export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp" From 0dc46d7f06cf71bb756a29ec6d77b9e81ff75afb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 10:59:58 +0100 Subject: [PATCH 39/92] iter --- continuous_integration/install_blis.sh | 17 ++++------------- continuous_integration/install_env.sh | 3 +++ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/continuous_integration/install_blis.sh b/continuous_integration/install_blis.sh index 096b9e87..621be53c 100644 --- a/continuous_integration/install_blis.sh +++ b/continuous_integration/install_blis.sh @@ -33,21 +33,12 @@ Libs.private: \${extralib} Cflags: -I\${includedir}" > blis.pc PKG_CONFIG_PATH=$ABS_PATH/numpy/ pip install . -v --no-build-isolation -Csetup-args=-Dblas=blis -popd - -# back to threadpoolctl directory -popd -ython -m pip install -q -r dev-requirements.txt -CFLAGS=-I$ABS_PATH/BLIS_install/include/blis \ +export CFLAGS=-I$ABS_PATH/BLIS_install/include/blis \ LDFLAGS="-L$ABS_PATH/BLIS_install/lib -Wl,-rpath,$ABS_PATH/BLIS_install/lib" \ - bash ./continuous_integration/build_test_ext.sh -# Check that BLIS is linked -ldd tests/_openmp_test_helper/nested_prange_blas.cpython*.so +# popd -python --version -python -c "import numpy; print(f'numpy {numpy.__version__}')" || echo "no numpy" -python -c "import scipy; print(f'scipy {scipy.__version__}')" || echo "no scipy" +# # back to threadpoolctl directory +# popd -python -m flit install --symlink diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 73d53e3e..42cc0e17 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -120,6 +120,9 @@ fi python -m pip install -v -q -r dev-requirements.txt bash ./continuous_integration/build_test_ext.sh +# Check which BLAS is linked +ldd tests/_openmp_test_helper/nested_prange_blas.cpython*.so + python --version python -c "import numpy; print(f'numpy {numpy.__version__}')" || echo "no numpy" python -c "import scipy; print(f'scipy {scipy.__version__}')" || echo "no scipy" From 4a60773e8f496f736a1fb92324bfb6020619a156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 11:05:37 +0100 Subject: [PATCH 40/92] iter --- .github/workflows/test.yml | 4 ++-- continuous_integration/install_env.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7d28c0fd..f9f9ae10 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -185,7 +185,7 @@ jobs: BLIS_NUM_THREADS: "4" CC_OUTER_LOOP: "clang-18" CC_INNER_LOOP: "clang-18" - BLIS_CC: "gcc-8" + BLIS_CC: "gcc-12" BLIS_ENABLE_THREADING: "pthreads" - name: pylatest_blis_no_threading os: ubuntu-latest @@ -194,7 +194,7 @@ jobs: BLIS_NUM_THREADS: "1" CC_OUTER_LOOP: "gcc" CC_INNER_LOOP: "gcc" - BLIS_CC: "gcc-8" + BLIS_CC: "gcc-12" BLIS_ENABLE_THREADING: "no" # Linux env with FlexiBLAS diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 42cc0e17..28689795 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -22,8 +22,8 @@ then fi # Install gcc 8 to build BLIS -if [[ "$BLIS_CC" == "gcc-8" ]]; then - sudo apt install gcc-8 +if [[ "$BLIS_CC" == "gcc-12" ]]; then + sudo apt install gcc-12 fi make_conda() { From daee680c366e603348074653d03d682acae8b799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 11:11:04 +0100 Subject: [PATCH 41/92] iter --- continuous_integration/install_env.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 28689795..dd451a4a 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -120,8 +120,10 @@ fi python -m pip install -v -q -r dev-requirements.txt bash ./continuous_integration/build_test_ext.sh -# Check which BLAS is linked -ldd tests/_openmp_test_helper/nested_prange_blas.cpython*.so +# Check which BLAS is linked (only available on linux) +if [[ "$UNAMESTR" == "Linux" ]]; then + ldd tests/_openmp_test_helper/nested_prange_blas.cpython*.so +fi python --version python -c "import numpy; print(f'numpy {numpy.__version__}')" || echo "no numpy" From 18559c171500fe85921352e5da9e1e367b45ddc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 11:20:25 +0100 Subject: [PATCH 42/92] iter --- continuous_integration/install_env.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index dd451a4a..66705f0f 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -17,8 +17,6 @@ then chmod +x llvm.sh sudo ./llvm.sh 18 sudo apt-get install libomp-dev - - sudo find / -name "omp.h" fi # Install gcc 8 to build BLIS @@ -104,12 +102,12 @@ elif [[ "$PACKAGER" == "ubuntu" ]]; then python3 -m virtualenv --system-site-packages --python=python3 testenv source testenv/bin/activate -elif [[ "$INSTALL_BLAS" == "BLIS" ]]; then +elif [[ "$INSTALL_BLAS" == "blis" ]]; then TO_INSTALL="cython meson-python pkg-config" make_conda "conda-forge" "$TO_INSTALL" bash ./continuous_integration/install_blis.sh -elif [[ "$INSTALL_BLAS" == "FlexiBLAS" ]]; then +elif [[ "$INSTALL_BLAS" == "flexiblas" ]]; then TO_INSTALL="cython openblas $PLATFORM_SPECIFIC_PACKAGES meson-python pkg-config compilers" make_conda "conda-forge" "$TO_INSTALL" bash ./continuous_integration/install_flexiblas.sh From 2b6178f7528c22c2b954b28193d52de5b56f5c9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 11:30:48 +0100 Subject: [PATCH 43/92] iter --- continuous_integration/install_blis.sh | 4 ++-- continuous_integration/install_env.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/continuous_integration/install_blis.sh b/continuous_integration/install_blis.sh index 621be53c..7db796e7 100644 --- a/continuous_integration/install_blis.sh +++ b/continuous_integration/install_blis.sh @@ -34,8 +34,8 @@ Cflags: -I\${includedir}" > blis.pc PKG_CONFIG_PATH=$ABS_PATH/numpy/ pip install . -v --no-build-isolation -Csetup-args=-Dblas=blis -export CFLAGS=-I$ABS_PATH/BLIS_install/include/blis \ - LDFLAGS="-L$ABS_PATH/BLIS_install/lib -Wl,-rpath,$ABS_PATH/BLIS_install/lib" \ +export CFLAGS=-I$ABS_PATH/BLIS_install/include/blis +export LDFLAGS="-L$ABS_PATH/BLIS_install/lib -Wl,-rpath,$ABS_PATH/BLIS_install/lib" # popd diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 66705f0f..a659bcb2 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -114,6 +114,7 @@ elif [[ "$INSTALL_BLAS" == "flexiblas" ]]; then fi +echo $CFLAGS python -m pip install -v -q -r dev-requirements.txt bash ./continuous_integration/build_test_ext.sh From a28aea7201c2063eb73eed4f34fd8c035683eaaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 11:46:59 +0100 Subject: [PATCH 44/92] iter --- continuous_integration/install_env.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index a659bcb2..7260eb68 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -105,12 +105,12 @@ elif [[ "$PACKAGER" == "ubuntu" ]]; then elif [[ "$INSTALL_BLAS" == "blis" ]]; then TO_INSTALL="cython meson-python pkg-config" make_conda "conda-forge" "$TO_INSTALL" - bash ./continuous_integration/install_blis.sh + source ./continuous_integration/install_blis.sh elif [[ "$INSTALL_BLAS" == "flexiblas" ]]; then TO_INSTALL="cython openblas $PLATFORM_SPECIFIC_PACKAGES meson-python pkg-config compilers" make_conda "conda-forge" "$TO_INSTALL" - bash ./continuous_integration/install_flexiblas.sh + source ./continuous_integration/install_flexiblas.sh fi @@ -120,7 +120,7 @@ python -m pip install -v -q -r dev-requirements.txt bash ./continuous_integration/build_test_ext.sh # Check which BLAS is linked (only available on linux) -if [[ "$UNAMESTR" == "Linux" ]]; then +if [[ "$UNAMESTR" == "Linux" && "$NO_NUMPY" != "true" ]]; then ldd tests/_openmp_test_helper/nested_prange_blas.cpython*.so fi From bfa0eb67aae1b73a14e82cb53ff64ff0df247713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 11:55:33 +0100 Subject: [PATCH 45/92] iter --- continuous_integration/install_blis.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/continuous_integration/install_blis.sh b/continuous_integration/install_blis.sh index 7db796e7..496fffca 100644 --- a/continuous_integration/install_blis.sh +++ b/continuous_integration/install_blis.sh @@ -37,8 +37,8 @@ PKG_CONFIG_PATH=$ABS_PATH/numpy/ pip install . -v --no-build-isolation -Csetup-a export CFLAGS=-I$ABS_PATH/BLIS_install/include/blis export LDFLAGS="-L$ABS_PATH/BLIS_install/lib -Wl,-rpath,$ABS_PATH/BLIS_install/lib" -# popd +popd -# # back to threadpoolctl directory -# popd +# back to threadpoolctl directory +popd From 7e4a11aa0aed2567cbeea30ddf9481e4773029bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 12:08:59 +0100 Subject: [PATCH 46/92] iter --- continuous_integration/install_blis.sh | 3 +- continuous_integration/install_flexiblas.sh | 67 +++++++++++++++++++++ 2 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 continuous_integration/install_flexiblas.sh diff --git a/continuous_integration/install_blis.sh b/continuous_integration/install_blis.sh index 496fffca..32e1b81a 100644 --- a/continuous_integration/install_blis.sh +++ b/continuous_integration/install_blis.sh @@ -9,8 +9,8 @@ ABS_PATH=$(pwd) # build & install blis mkdir BLIS_install git clone https://github.com/flame/blis.git - pushd blis + ./configure --prefix=$ABS_PATH/BLIS_install --enable-cblas --enable-threading=$BLIS_ENABLE_THREADING CC=$BLIS_CC auto make -j4 make install @@ -41,4 +41,3 @@ popd # back to threadpoolctl directory popd - diff --git a/continuous_integration/install_flexiblas.sh b/continuous_integration/install_flexiblas.sh new file mode 100644 index 00000000..3d45ab54 --- /dev/null +++ b/continuous_integration/install_flexiblas.sh @@ -0,0 +1,67 @@ +#!/bin/bash + +set -xe + +# step outside of threadpoolctl directory +pushd .. +ABS_PATH=$(pwd) + +# build & install FlexiBLAS +mkdir flexiblas_install +git clone https://github.com/mpimd-csc/flexiblas.git +pushd flexiblas + +# Temporary ping Flexiblas commit to avoid openmp symbols not found at link time +git checkout v3.4.2 + +mkdir build +pushd build + +EXTENSION=".so" +if [[ $(uname) == "Darwin" ]]; then + EXTENSION=".dylib" +fi + +# We intentionally restrict the list of backends to make it easier to +# write platform agnostic tests. In particular, we do not detect OS +# provided backends such as macOS' Apple/Accelerate/vecLib nor plaftorm +# specific BLAS implementations such as MKL that cannot be installed on +# arm64 hardware. +cmake ../ -DCMAKE_INSTALL_PREFIX=$ABS_PATH"/flexiblas_install" \ + -DBLAS_AUTO_DETECT="OFF" \ + -DEXTRA="OPENBLAS_CONDA" \ + -DFLEXIBLAS_DEFAULT="OPENBLAS_CONDA" \ + -DOPENBLAS_CONDA_LIBRARY=$CONDA_PREFIX"/lib/libopenblas"$EXTENSION \ +make +make install + +# Check that all 3 BLAS are listed in FlexiBLAS configuration +$ABS_PATH/flexiblas_install/bin/flexiblas list +popd +popd + +# build & install numpy +git clone https://github.com/numpy/numpy.git +pushd numpy +git submodule update --init + +echo "libdir=$ABS_PATH/flexiblas_install/lib/ +includedir=$ABS_PATH/flexiblas_install/include/flexiblas/ +version=3.3.1 +extralib=-lm -lpthread -lgfortran +Name: flexiblas +Description: FlexiBLAS - a BLAS wrapper +Version: \${version} +Libs: -L\${libdir} -lflexiblas +Libs.private: \${extralib} +Cflags: -I\${includedir}" > flexiblas.pc + +PKG_CONFIG_PATH=$ABS_PATH/numpy/ pip install . -v --no-build-isolation -Csetup-args=-Dblas=flexiblas -Csetup-args=-Dlapack=flexiblas + +export CFLAGS=-I$ABS_PATH/flexiblas_install/include/flexiblas \ +export LDFLAGS="-L$ABS_PATH/flexiblas_install/lib -Wl,-rpath,$ABS_PATH/flexiblas_install/lib" \ + +popd + +# back to threadpoolctl directory +popd From 3ca8fab383b46309fdbcaf1582e704b73d9b49db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 12:38:47 +0100 Subject: [PATCH 47/92] iter --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f9f9ae10..ca70930e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -88,8 +88,6 @@ jobs: PACKAGER: "conda" INSTALL_BLAS: "flexiblas" PLATFORM_SPECIFIC_PACKAGES: "mkl" - CC_OUTER_LOOP: "clang" - CC_INNER_LOOP: "clang" # Linux environments to test that packages that comes with Ubuntu 20.04 # are correctly handled. From 44b4584e97325d58fc2d99be948807e572cd4b9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 12:44:58 +0100 Subject: [PATCH 48/92] iter --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ca70930e..e786715b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -85,9 +85,8 @@ jobs: - name: pylatest_flexiblas os: macos-latest PYTHON_VERSION: "*" - PACKAGER: "conda" INSTALL_BLAS: "flexiblas" - PLATFORM_SPECIFIC_PACKAGES: "mkl" + PLATFORM_SPECIFIC_PACKAGES: "mkl llvm-openmp" # Linux environments to test that packages that comes with Ubuntu 20.04 # are correctly handled. From 7d2203737f02d81e5b7f5d86fa3abe95df8b1e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 13:13:26 +0100 Subject: [PATCH 49/92] iter --- continuous_integration/install_env.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 7260eb68..174898ce 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -108,6 +108,11 @@ elif [[ "$INSTALL_BLAS" == "blis" ]]; then source ./continuous_integration/install_blis.sh elif [[ "$INSTALL_BLAS" == "flexiblas" ]]; then + conda search blas --channel conda-forge + conda search blas --channel defaults + conda search mkl --channel conda-forge + conda search mkl --channel defaults + TO_INSTALL="cython openblas $PLATFORM_SPECIFIC_PACKAGES meson-python pkg-config compilers" make_conda "conda-forge" "$TO_INSTALL" source ./continuous_integration/install_flexiblas.sh From 9dcf40dd421b8d0ec9549b89b1c76cd1475b50a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 14:21:55 +0100 Subject: [PATCH 50/92] iter --- .github/workflows/test.yml | 2 +- continuous_integration/install_env.sh | 5 ----- tests/test_threadpoolctl.py | 14 +++++++------- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e786715b..20b77769 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -86,7 +86,7 @@ jobs: os: macos-latest PYTHON_VERSION: "*" INSTALL_BLAS: "flexiblas" - PLATFORM_SPECIFIC_PACKAGES: "mkl llvm-openmp" + PLATFORM_SPECIFIC_PACKAGES: "llvm-openmp" # Linux environments to test that packages that comes with Ubuntu 20.04 # are correctly handled. diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 174898ce..7260eb68 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -108,11 +108,6 @@ elif [[ "$INSTALL_BLAS" == "blis" ]]; then source ./continuous_integration/install_blis.sh elif [[ "$INSTALL_BLAS" == "flexiblas" ]]; then - conda search blas --channel conda-forge - conda search blas --channel defaults - conda search mkl --channel conda-forge - conda search mkl --channel defaults - TO_INSTALL="cython openblas $PLATFORM_SPECIFIC_PACKAGES meson-python pkg-config compilers" make_conda "conda-forge" "$TO_INSTALL" source ./continuous_integration/install_flexiblas.sh diff --git a/tests/test_threadpoolctl.py b/tests/test_threadpoolctl.py index d6e95363..d60fbc5d 100644 --- a/tests/test_threadpoolctl.py +++ b/tests/test_threadpoolctl.py @@ -717,13 +717,13 @@ def test_flexiblas_switch(): assert fb_controller.current_backend == "NETLIB" assert fb_controller.loaded_backends == ["OPENBLAS_CONDA", "NETLIB"] - ext = ".so" if sys.platform == "linux" else ".dylib" - mkl_path = f"{os.getenv('CONDA_PREFIX')}/lib/libmkl_rt{ext}" - fb_controller.switch_backend(mkl_path) - assert fb_controller.current_backend == mkl_path - assert fb_controller.loaded_backends == ["OPENBLAS_CONDA", "NETLIB", mkl_path] - # switching the backend triggered a new search for loaded shared libs - assert len(controller.select(internal_api="mkl").lib_controllers) == 1 + if sys.platform == "linux": + mkl_path = f"{os.getenv('CONDA_PREFIX')}/lib/libmkl_rt.so" + fb_controller.switch_backend(mkl_path) + assert fb_controller.current_backend == mkl_path + assert fb_controller.loaded_backends == ["OPENBLAS_CONDA", "NETLIB", mkl_path] + # switching the backend triggered a new search for loaded shared libs + assert len(controller.select(internal_api="mkl").lib_controllers) == 1 # switch back to default to avoid side effects fb_controller.switch_backend("OPENBLAS_CONDA") From a7f1f16d9a22b6bfa12520a4f017428894192668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 14:45:39 +0100 Subject: [PATCH 51/92] iter --- .github/workflows/test.yml | 16 +++------------- continuous_integration/install_blis.sh | 6 ++++++ continuous_integration/install_env.sh | 4 ---- continuous_integration/test_script.sh | 10 ++++------ 4 files changed, 13 insertions(+), 23 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 20b77769..45b517ba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -230,19 +230,9 @@ jobs: run: | bash -el continuous_integration/install_env.sh - # - name: Install with BLIS - # if: ${{ matrix.INSTALL_BLAS == 'blis' }} - # run: | - # bash -el continuous_integration/install_with_blis.sh - - # - name: Install with FlexiBLAS - # if: ${{ matrix.INSTALL_BLAS == 'flexiblas' }} - # run: | - # bash -el continuous_integration/install_with_flexiblas.sh - - #- name: Test library - # run: | - # bash -el continuous_integration/runtest.sh + - name: Test library + run: | + bash -el continuous_integration/runtest.sh - name: Upload to Codecov uses: codecov/codecov-action@v5 diff --git a/continuous_integration/install_blis.sh b/continuous_integration/install_blis.sh index 32e1b81a..e8fa8074 100644 --- a/continuous_integration/install_blis.sh +++ b/continuous_integration/install_blis.sh @@ -2,6 +2,12 @@ set -xe + +# Install gcc 12 to build BLIS +if [[ "$BLIS_CC" == "gcc-12" ]]; then + sudo apt install gcc-12 +fi + # step outside of threadpoolctl directory pushd .. ABS_PATH=$(pwd) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 7260eb68..6354adb2 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -19,10 +19,6 @@ then sudo apt-get install libomp-dev fi -# Install gcc 8 to build BLIS -if [[ "$BLIS_CC" == "gcc-12" ]]; then - sudo apt install gcc-12 -fi make_conda() { CHANNEL="$1" diff --git a/continuous_integration/test_script.sh b/continuous_integration/test_script.sh index 8eeaba19..51d29fe3 100755 --- a/continuous_integration/test_script.sh +++ b/continuous_integration/test_script.sh @@ -1,21 +1,19 @@ #!/bin/bash -set -e +set -xe if [[ "$PACKAGER" == conda* ]]; then - source activate $VIRTUALENV + conda activate testenv conda list elif [[ "$PACKAGER" == pip* ]]; then # we actually use conda to install the base environment: - source activate $VIRTUALENV + conda activate testenv pip list elif [[ "$PACKAGER" == "ubuntu" ]]; then - source $VIRTUALENV/bin/activate + source testenv/bin/activate pip list fi -set -x - # Use the CLI to display the effective runtime environment prior to # launching the tests: python -m threadpoolctl -i numpy scipy.linalg tests._openmp_test_helper.openmp_helpers_inner From 2a44c1fcaf8cf2f4f071d0391b8d3f3b65e364bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 14:48:04 +0100 Subject: [PATCH 52/92] iter --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 45b517ba..615ecf73 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -231,8 +231,8 @@ jobs: bash -el continuous_integration/install_env.sh - name: Test library - run: | - bash -el continuous_integration/runtest.sh + run: | + bash -el continuous_integration/test_script.sh - name: Upload to Codecov uses: codecov/codecov-action@v5 From 175ba8e8ebd3434611dd978cdac72f9c1c9d026b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 15:24:26 +0100 Subject: [PATCH 53/92] iter --- continuous_integration/test_script.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/continuous_integration/test_script.sh b/continuous_integration/test_script.sh index 51d29fe3..994c985a 100755 --- a/continuous_integration/test_script.sh +++ b/continuous_integration/test_script.sh @@ -14,8 +14,10 @@ elif [[ "$PACKAGER" == "ubuntu" ]]; then pip list fi +echo $MKL_THREADING_LAYER + # Use the CLI to display the effective runtime environment prior to # launching the tests: python -m threadpoolctl -i numpy scipy.linalg tests._openmp_test_helper.openmp_helpers_inner -pytest -vlrxXs -W error -k "$TESTS" --junitxml=$JUNITXML --cov=threadpoolctl +pytest -vlrxXs -W error -k "$TESTS" --junitxml=$JUNITXML --cov=threadpoolctl --cov-report xml From 21f0a0dc9070994826084aaede483101d37af1a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 15:32:09 +0100 Subject: [PATCH 54/92] iter --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 615ecf73..6f80ef52 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -138,7 +138,7 @@ jobs: BLAS: "mkl" CC_OUTER_LOOP: "gcc" CC_INNER_LOOP: "gcc" - MKL_THREADING_LAYER: "INTEL" + MKL_THREADING_LAYER: "MKL_THREADING_INTEL" # Linux + Python 3.8 with numpy / scipy installed with pip from PyPI # and heterogeneous OpenMP runtimes. - name: py38_pip_openblas_gcc_clang From 6b31b17f3a6476047a305e14615904a039e8a408 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 16:31:21 +0100 Subject: [PATCH 55/92] iter --- .github/workflows/test.yml | 2 +- continuous_integration/test_script.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6f80ef52..615ecf73 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -138,7 +138,7 @@ jobs: BLAS: "mkl" CC_OUTER_LOOP: "gcc" CC_INNER_LOOP: "gcc" - MKL_THREADING_LAYER: "MKL_THREADING_INTEL" + MKL_THREADING_LAYER: "INTEL" # Linux + Python 3.8 with numpy / scipy installed with pip from PyPI # and heterogeneous OpenMP runtimes. - name: py38_pip_openblas_gcc_clang diff --git a/continuous_integration/test_script.sh b/continuous_integration/test_script.sh index 994c985a..1a8101f5 100755 --- a/continuous_integration/test_script.sh +++ b/continuous_integration/test_script.sh @@ -14,7 +14,8 @@ elif [[ "$PACKAGER" == "ubuntu" ]]; then pip list fi -echo $MKL_THREADING_LAYER +dpkg --print-architecture + # Use the CLI to display the effective runtime environment prior to # launching the tests: From 621bd8ea7fa959a0396a05a8de2ab6b6664322c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 16:36:23 +0100 Subject: [PATCH 56/92] iter --- continuous_integration/test_script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/continuous_integration/test_script.sh b/continuous_integration/test_script.sh index 1a8101f5..eb48d9c0 100755 --- a/continuous_integration/test_script.sh +++ b/continuous_integration/test_script.sh @@ -14,7 +14,7 @@ elif [[ "$PACKAGER" == "ubuntu" ]]; then pip list fi -dpkg --print-architecture +export MKL_THREADING_LAYER=INTEL # Use the CLI to display the effective runtime environment prior to From 02f63a15d9c36b8a6aadd8638f209022183726eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 16:49:18 +0100 Subject: [PATCH 57/92] iter --- continuous_integration/test_script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/continuous_integration/test_script.sh b/continuous_integration/test_script.sh index eb48d9c0..262960dc 100755 --- a/continuous_integration/test_script.sh +++ b/continuous_integration/test_script.sh @@ -19,6 +19,6 @@ export MKL_THREADING_LAYER=INTEL # Use the CLI to display the effective runtime environment prior to # launching the tests: -python -m threadpoolctl -i numpy scipy.linalg tests._openmp_test_helper.openmp_helpers_inner +python -m threadpoolctl -i numpy scipy.linalg #tests._openmp_test_helper.openmp_helpers_inner pytest -vlrxXs -W error -k "$TESTS" --junitxml=$JUNITXML --cov=threadpoolctl --cov-report xml From ae4625bed48b244b7f18863a07e6322bc3ba2d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 17:11:45 +0100 Subject: [PATCH 58/92] iter --- continuous_integration/install_env.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index 6354adb2..d84366cb 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -46,6 +46,7 @@ make_conda() { TO_INSTALL="$TO_INSTALL python-gil" fi + conda config --set channel_priority strict conda config --add channels $CHANNEL conda update -n base conda conda-libmamba-solver -q --yes conda config --set solver libmamba From aa70bd706a12ff034912016e05ba0d4325304869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 17:25:47 +0100 Subject: [PATCH 59/92] iter --- continuous_integration/install_env.sh | 2 ++ continuous_integration/test_script.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_env.sh index d84366cb..d96f3b8c 100644 --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_env.sh @@ -46,8 +46,10 @@ make_conda() { TO_INSTALL="$TO_INSTALL python-gil" fi + # prevent mixing conda channels conda config --set channel_priority strict conda config --add channels $CHANNEL + conda update -n base conda conda-libmamba-solver -q --yes conda config --set solver libmamba conda create -n testenv -q --yes python=$PYTHON_VERSION $TO_INSTALL diff --git a/continuous_integration/test_script.sh b/continuous_integration/test_script.sh index 262960dc..97ac9356 100755 --- a/continuous_integration/test_script.sh +++ b/continuous_integration/test_script.sh @@ -2,7 +2,7 @@ set -xe -if [[ "$PACKAGER" == conda* ]]; then +if [[ "$PACKAGER" == conda* ]] || [[ -z "$PACKAGER" ]]; then conda activate testenv conda list elif [[ "$PACKAGER" == pip* ]]; then From b9ba539073e7e0e85f01c99c278e1b31271d7958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 17:38:07 +0100 Subject: [PATCH 60/92] iter --- tests/test_threadpoolctl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_threadpoolctl.py b/tests/test_threadpoolctl.py index d60fbc5d..6e920924 100644 --- a/tests/test_threadpoolctl.py +++ b/tests/test_threadpoolctl.py @@ -624,6 +624,7 @@ def test_architecture(): # XXX: add more as needed by CI or developer laptops "skx", "haswell", + "zen3", ) for lib_info in threadpool_info(): if lib_info["internal_api"] == "openblas": From 643419b5ebe53d15e57f8344682cddc8bd8d7232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 17:58:57 +0100 Subject: [PATCH 61/92] iter --- .github/workflows/test.yml | 7 +- continuous_integration/install.sh | 87 +++++++++++++------ .../{install_env.sh => install_old.sh} | 87 ++++++------------- .../{test_script.sh => run_tests.sh} | 0 4 files changed, 90 insertions(+), 91 deletions(-) mode change 100755 => 100644 continuous_integration/install.sh rename continuous_integration/{install_env.sh => install_old.sh} (55%) mode change 100644 => 100755 rename continuous_integration/{test_script.sh => run_tests.sh} (100%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 615ecf73..051b49c7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -225,14 +225,13 @@ jobs: auto-update-conda: true miniforge-version: latest - - name: Install without custom BLAS - # if: ${{ matrix.INSTALL_BLAS == '' }} + - name: Install dependencies run: | - bash -el continuous_integration/install_env.sh + bash -el continuous_integration/install.sh - name: Test library run: | - bash -el continuous_integration/test_script.sh + bash -el continuous_integration/run_tests.sh - name: Upload to Codecov uses: codecov/codecov-action@v5 diff --git a/continuous_integration/install.sh b/continuous_integration/install.sh old mode 100755 new mode 100644 index d0e8402f..d96f3b8c --- a/continuous_integration/install.sh +++ b/continuous_integration/install.sh @@ -1,28 +1,34 @@ #!/bin/bash -set -e +# License: BSD 3-Clause + +set -xe UNAMESTR=`uname` -if [[ "$CC_OUTER_LOOP" == "clang-10" || "$CC_INNER_LOOP" == "clang-10" ]]; then - # Assume Ubuntu: install a recent version of clang and libomp + +# Install a recent version of clang and libomp if needed +# Only applicable on linux jobs +if [[ "$CC_OUTER_LOOP" == "clang-18" ]] || \ + [[ "$CC_INNER_LOOP" == "clang-18" ]] || \ + [[ "$BLIS_CC" == "clang-18" ]] +then wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh - sudo ./llvm.sh 10 + sudo ./llvm.sh 18 sudo apt-get install libomp-dev fi + make_conda() { - TO_INSTALL="$@" + CHANNEL="$1" + TO_INSTALL="setuptools $2" if [[ "$UNAMESTR" == "Darwin" ]]; then if [[ "$INSTALL_LIBOMP" == "conda-forge" ]]; then # Install an OpenMP-enabled clang/llvm from conda-forge # assumes conda-forge is set on priority channel TO_INSTALL="$TO_INSTALL compilers llvm-openmp" - export CFLAGS="$CFLAGS -I$CONDA/envs/$VIRTUALENV/include" - export LDFLAGS="$LDFLAGS -Wl,-rpath,$CONDA/envs/$VIRTUALENV/lib -L$CONDA/envs/$VIRTUALENV/lib" - elif [[ "$INSTALL_LIBOMP" == "homebrew" ]]; then # Install a compiler with a working openmp HOMEBREW_NO_AUTO_UPDATE=1 brew install libomp @@ -30,37 +36,50 @@ make_conda() { # enable OpenMP support for Apple-clang export CC=/usr/bin/clang export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp" - export CFLAGS="$CFLAGS -I/usr/local/opt/libomp/include" - export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/local/opt/libomp/lib -L/usr/local/opt/libomp/lib -lomp" + export CFLAGS="$CFLAGS -I/opt/homebrew/opt/libomp/include" + export LDFLAGS="$LDFLAGS -Wl,-rpath,/opt/homebrew/opt/libomp/lib -L/opt/homebrew/opt/libomp/lib -lomp" fi fi + + if [[ "$PYTHON_VERSION" == "*" ]]; then + # Avoid installing free-threaded python + TO_INSTALL="$TO_INSTALL python-gil" + fi + + # prevent mixing conda channels + conda config --set channel_priority strict + conda config --add channels $CHANNEL + conda update -n base conda conda-libmamba-solver -q --yes conda config --set solver libmamba - conda create -n $VIRTUALENV -q --yes $TO_INSTALL - source activate $VIRTUALENV + conda create -n testenv -q --yes python=$PYTHON_VERSION $TO_INSTALL + conda activate testenv + + which clang } + if [[ "$PACKAGER" == "conda" ]]; then - TO_INSTALL="python=$PYTHON_VERSION pip" + TO_INSTALL="" if [[ "$NO_NUMPY" != "true" ]]; then - TO_INSTALL="$TO_INSTALL numpy scipy blas[build=$BLAS]" + TO_INSTALL="$TO_INSTALL numpy scipy" + if [[ -n "$BLAS" ]]; then + TO_INSTALL="$TO_INSTALL blas=*=$BLAS" + fi fi - make_conda $TO_INSTALL + make_conda "defaults" "$TO_INSTALL" elif [[ "$PACKAGER" == "conda-forge" ]]; then - conda config --prepend channels conda-forge - conda config --set channel_priority strict - TO_INSTALL="python=$PYTHON_VERSION numpy scipy blas[build=$BLAS]" + TO_INSTALL="numpy scipy blas=*=$BLAS" if [[ "$BLAS" == "openblas" && "$OPENBLAS_THREADING_LAYER" == "openmp" ]]; then TO_INSTALL="$TO_INSTALL libopenblas=*=*openmp*" fi - make_conda $TO_INSTALL + make_conda "conda-forge" "$TO_INSTALL" elif [[ "$PACKAGER" == "pip" ]]; then # Use conda to build an empty python env and then use pip to install # numpy and scipy - TO_INSTALL="python=$PYTHON_VERSION pip" - make_conda $TO_INSTALL + make_conda "conda-forge" "" if [[ "$NO_NUMPY" != "true" ]]; then pip install numpy scipy fi @@ -68,8 +87,7 @@ elif [[ "$PACKAGER" == "pip" ]]; then elif [[ "$PACKAGER" == "pip-dev" ]]; then # Use conda to build an empty python env and then use pip to install # numpy and scipy dev versions - TO_INSTALL="python=$PYTHON_VERSION pip" - make_conda $TO_INSTALL + make_conda "conda-forge" "" dev_anaconda_url=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pip install --pre --upgrade --timeout=60 --extra-index $dev_anaconda_url numpy scipy @@ -80,14 +98,31 @@ elif [[ "$PACKAGER" == "ubuntu" ]]; then sudo add-apt-repository --remove ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install python3-scipy python3-virtualenv $APT_BLAS - python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV - source $VIRTUALENV/bin/activate + python3 -m virtualenv --system-site-packages --python=python3 testenv + source testenv/bin/activate + +elif [[ "$INSTALL_BLAS" == "blis" ]]; then + TO_INSTALL="cython meson-python pkg-config" + make_conda "conda-forge" "$TO_INSTALL" + source ./continuous_integration/install_blis.sh + +elif [[ "$INSTALL_BLAS" == "flexiblas" ]]; then + TO_INSTALL="cython openblas $PLATFORM_SPECIFIC_PACKAGES meson-python pkg-config compilers" + make_conda "conda-forge" "$TO_INSTALL" + source ./continuous_integration/install_flexiblas.sh + fi +echo $CFLAGS -python -m pip install -q -r dev-requirements.txt +python -m pip install -v -q -r dev-requirements.txt bash ./continuous_integration/build_test_ext.sh +# Check which BLAS is linked (only available on linux) +if [[ "$UNAMESTR" == "Linux" && "$NO_NUMPY" != "true" ]]; then + ldd tests/_openmp_test_helper/nested_prange_blas.cpython*.so +fi + python --version python -c "import numpy; print(f'numpy {numpy.__version__}')" || echo "no numpy" python -c "import scipy; print(f'scipy {scipy.__version__}')" || echo "no scipy" diff --git a/continuous_integration/install_env.sh b/continuous_integration/install_old.sh old mode 100644 new mode 100755 similarity index 55% rename from continuous_integration/install_env.sh rename to continuous_integration/install_old.sh index d96f3b8c..d0e8402f --- a/continuous_integration/install_env.sh +++ b/continuous_integration/install_old.sh @@ -1,34 +1,28 @@ #!/bin/bash -# License: BSD 3-Clause - -set -xe +set -e UNAMESTR=`uname` - -# Install a recent version of clang and libomp if needed -# Only applicable on linux jobs -if [[ "$CC_OUTER_LOOP" == "clang-18" ]] || \ - [[ "$CC_INNER_LOOP" == "clang-18" ]] || \ - [[ "$BLIS_CC" == "clang-18" ]] -then +if [[ "$CC_OUTER_LOOP" == "clang-10" || "$CC_INNER_LOOP" == "clang-10" ]]; then + # Assume Ubuntu: install a recent version of clang and libomp wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh - sudo ./llvm.sh 18 + sudo ./llvm.sh 10 sudo apt-get install libomp-dev fi - make_conda() { - CHANNEL="$1" - TO_INSTALL="setuptools $2" + TO_INSTALL="$@" if [[ "$UNAMESTR" == "Darwin" ]]; then if [[ "$INSTALL_LIBOMP" == "conda-forge" ]]; then # Install an OpenMP-enabled clang/llvm from conda-forge # assumes conda-forge is set on priority channel TO_INSTALL="$TO_INSTALL compilers llvm-openmp" + export CFLAGS="$CFLAGS -I$CONDA/envs/$VIRTUALENV/include" + export LDFLAGS="$LDFLAGS -Wl,-rpath,$CONDA/envs/$VIRTUALENV/lib -L$CONDA/envs/$VIRTUALENV/lib" + elif [[ "$INSTALL_LIBOMP" == "homebrew" ]]; then # Install a compiler with a working openmp HOMEBREW_NO_AUTO_UPDATE=1 brew install libomp @@ -36,50 +30,37 @@ make_conda() { # enable OpenMP support for Apple-clang export CC=/usr/bin/clang export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp" - export CFLAGS="$CFLAGS -I/opt/homebrew/opt/libomp/include" - export LDFLAGS="$LDFLAGS -Wl,-rpath,/opt/homebrew/opt/libomp/lib -L/opt/homebrew/opt/libomp/lib -lomp" + export CFLAGS="$CFLAGS -I/usr/local/opt/libomp/include" + export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/local/opt/libomp/lib -L/usr/local/opt/libomp/lib -lomp" fi fi - - if [[ "$PYTHON_VERSION" == "*" ]]; then - # Avoid installing free-threaded python - TO_INSTALL="$TO_INSTALL python-gil" - fi - - # prevent mixing conda channels - conda config --set channel_priority strict - conda config --add channels $CHANNEL - conda update -n base conda conda-libmamba-solver -q --yes conda config --set solver libmamba - conda create -n testenv -q --yes python=$PYTHON_VERSION $TO_INSTALL - conda activate testenv - - which clang + conda create -n $VIRTUALENV -q --yes $TO_INSTALL + source activate $VIRTUALENV } - if [[ "$PACKAGER" == "conda" ]]; then - TO_INSTALL="" + TO_INSTALL="python=$PYTHON_VERSION pip" if [[ "$NO_NUMPY" != "true" ]]; then - TO_INSTALL="$TO_INSTALL numpy scipy" - if [[ -n "$BLAS" ]]; then - TO_INSTALL="$TO_INSTALL blas=*=$BLAS" - fi + TO_INSTALL="$TO_INSTALL numpy scipy blas[build=$BLAS]" fi - make_conda "defaults" "$TO_INSTALL" + make_conda $TO_INSTALL elif [[ "$PACKAGER" == "conda-forge" ]]; then - TO_INSTALL="numpy scipy blas=*=$BLAS" + conda config --prepend channels conda-forge + conda config --set channel_priority strict + TO_INSTALL="python=$PYTHON_VERSION numpy scipy blas[build=$BLAS]" if [[ "$BLAS" == "openblas" && "$OPENBLAS_THREADING_LAYER" == "openmp" ]]; then TO_INSTALL="$TO_INSTALL libopenblas=*=*openmp*" fi - make_conda "conda-forge" "$TO_INSTALL" + make_conda $TO_INSTALL elif [[ "$PACKAGER" == "pip" ]]; then # Use conda to build an empty python env and then use pip to install # numpy and scipy - make_conda "conda-forge" "" + TO_INSTALL="python=$PYTHON_VERSION pip" + make_conda $TO_INSTALL if [[ "$NO_NUMPY" != "true" ]]; then pip install numpy scipy fi @@ -87,7 +68,8 @@ elif [[ "$PACKAGER" == "pip" ]]; then elif [[ "$PACKAGER" == "pip-dev" ]]; then # Use conda to build an empty python env and then use pip to install # numpy and scipy dev versions - make_conda "conda-forge" "" + TO_INSTALL="python=$PYTHON_VERSION pip" + make_conda $TO_INSTALL dev_anaconda_url=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple pip install --pre --upgrade --timeout=60 --extra-index $dev_anaconda_url numpy scipy @@ -98,31 +80,14 @@ elif [[ "$PACKAGER" == "ubuntu" ]]; then sudo add-apt-repository --remove ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install python3-scipy python3-virtualenv $APT_BLAS - python3 -m virtualenv --system-site-packages --python=python3 testenv - source testenv/bin/activate - -elif [[ "$INSTALL_BLAS" == "blis" ]]; then - TO_INSTALL="cython meson-python pkg-config" - make_conda "conda-forge" "$TO_INSTALL" - source ./continuous_integration/install_blis.sh - -elif [[ "$INSTALL_BLAS" == "flexiblas" ]]; then - TO_INSTALL="cython openblas $PLATFORM_SPECIFIC_PACKAGES meson-python pkg-config compilers" - make_conda "conda-forge" "$TO_INSTALL" - source ./continuous_integration/install_flexiblas.sh - + python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV + source $VIRTUALENV/bin/activate fi -echo $CFLAGS -python -m pip install -v -q -r dev-requirements.txt +python -m pip install -q -r dev-requirements.txt bash ./continuous_integration/build_test_ext.sh -# Check which BLAS is linked (only available on linux) -if [[ "$UNAMESTR" == "Linux" && "$NO_NUMPY" != "true" ]]; then - ldd tests/_openmp_test_helper/nested_prange_blas.cpython*.so -fi - python --version python -c "import numpy; print(f'numpy {numpy.__version__}')" || echo "no numpy" python -c "import scipy; print(f'scipy {scipy.__version__}')" || echo "no scipy" diff --git a/continuous_integration/test_script.sh b/continuous_integration/run_tests.sh similarity index 100% rename from continuous_integration/test_script.sh rename to continuous_integration/run_tests.sh From 2231a92f16cb79840d516b9f34d02bb08efde193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 18:12:16 +0100 Subject: [PATCH 62/92] iter --- .github/workflows/test.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 051b49c7..01fd9297 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,6 +19,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + JUNITXML: 'test-data.xml' + jobs: linting: @@ -38,7 +41,6 @@ jobs: black --check --diff . testing: - name: Testing needs: linting timeout-minutes: 30 strategy: @@ -233,7 +235,28 @@ jobs: run: | bash -el continuous_integration/run_tests.sh + - name: Upload test results + uses: actions/upload-artifact@v4 + with: + name: test-results + path: ${{ env.JUNITXML }} + - name: Upload to Codecov uses: codecov/codecov-action@v5 with: files: coverage.xml + + # Meta-test to ensure that at least one of the above CI configurations had + # the necessary platform settings to execute each test without raising + # skipping. + post_testing: + needs: testing + runs-on: ubuntu-latest + steps: + - name: Download tests artifacts + uses: actions/download-artifact@v4 + with: + name: test-results + - name: Check no test always skipped + run: | + python continuous_integration/check_no_test_skipped.py From f560d4c708058b13313b1c7ec157b91143623854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 19:16:08 +0100 Subject: [PATCH 63/92] iter --- continuous_integration/install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/continuous_integration/install.sh b/continuous_integration/install.sh index d96f3b8c..43ec5716 100644 --- a/continuous_integration/install.sh +++ b/continuous_integration/install.sh @@ -6,6 +6,13 @@ set -xe UNAMESTR=`uname` +echo $GITHUB_WORKFLOW +echo $GITHUB_JOB +echo $GITHUB_ACTION +echo $GITHUB_RUN_ID +echo $GITHUB_RUN_NUMBER + + # Install a recent version of clang and libomp if needed # Only applicable on linux jobs From bcae972e509e0260626018e47d33512cba474163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Fri, 7 Mar 2025 19:50:20 +0100 Subject: [PATCH 64/92] iter --- continuous_integration/install.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/continuous_integration/install.sh b/continuous_integration/install.sh index 43ec5716..8e660c74 100644 --- a/continuous_integration/install.sh +++ b/continuous_integration/install.sh @@ -6,11 +6,7 @@ set -xe UNAMESTR=`uname` -echo $GITHUB_WORKFLOW -echo $GITHUB_JOB -echo $GITHUB_ACTION -echo $GITHUB_RUN_ID -echo $GITHUB_RUN_NUMBER +echo $GITHUB_STEP_SUMMARY From 79fa63465fcfe8721a21e857cf9c00a08d8e514b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 02:42:32 +0100 Subject: [PATCH 65/92] iter --- continuous_integration/install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/continuous_integration/install.sh b/continuous_integration/install.sh index 8e660c74..5faaa528 100644 --- a/continuous_integration/install.sh +++ b/continuous_integration/install.sh @@ -8,6 +8,11 @@ UNAMESTR=`uname` echo $GITHUB_STEP_SUMMARY +ls -al /Users/runner/work/_temp/_runner_file_commands/ + +FNAME = $(basename $GITHUB_STEP_SUMMARY) +echo $FNAME + # Install a recent version of clang and libomp if needed From 4f3b12e46e4da48eea753528afaa3977fd8fc761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 02:44:54 +0100 Subject: [PATCH 66/92] iter --- continuous_integration/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/continuous_integration/install.sh b/continuous_integration/install.sh index 5faaa528..2e19f928 100644 --- a/continuous_integration/install.sh +++ b/continuous_integration/install.sh @@ -10,7 +10,7 @@ echo $GITHUB_STEP_SUMMARY ls -al /Users/runner/work/_temp/_runner_file_commands/ -FNAME = $(basename $GITHUB_STEP_SUMMARY) +FNAME=$(basename $GITHUB_STEP_SUMMARY) echo $FNAME From 5f9c2e67a3b0201a535412caee5e37d80975361b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 02:49:39 +0100 Subject: [PATCH 67/92] iter --- continuous_integration/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/continuous_integration/install.sh b/continuous_integration/install.sh index 2e19f928..4ff4f2e2 100644 --- a/continuous_integration/install.sh +++ b/continuous_integration/install.sh @@ -8,7 +8,7 @@ UNAMESTR=`uname` echo $GITHUB_STEP_SUMMARY -ls -al /Users/runner/work/_temp/_runner_file_commands/ +ls -a -l -F /Users/runner/work/_temp/_runner_file_commands/ FNAME=$(basename $GITHUB_STEP_SUMMARY) echo $FNAME From e7d27bbf82fc640efa0f43f37957811c8929c346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 02:54:04 +0100 Subject: [PATCH 68/92] iter --- continuous_integration/install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/continuous_integration/install.sh b/continuous_integration/install.sh index 4ff4f2e2..4e067b25 100644 --- a/continuous_integration/install.sh +++ b/continuous_integration/install.sh @@ -13,6 +13,8 @@ ls -a -l -F /Users/runner/work/_temp/_runner_file_commands/ FNAME=$(basename $GITHUB_STEP_SUMMARY) echo $FNAME +cat $GITHUB_STEP_SUMMARY + # Install a recent version of clang and libomp if needed From 09144737565ce2e95db5e5133d9c35ff63f9b612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 18:39:15 +0100 Subject: [PATCH 69/92] iter --- .github/workflows/test.yml | 3 ++- continuous_integration/run_tests.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 01fd9297..46f38913 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -239,7 +239,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: test-results - path: ${{ env.JUNITXML }} + path: ${{ env.JUNITXML }}* - name: Upload to Codecov uses: codecov/codecov-action@v5 @@ -259,4 +259,5 @@ jobs: name: test-results - name: Check no test always skipped run: | + ls -al python continuous_integration/check_no_test_skipped.py diff --git a/continuous_integration/run_tests.sh b/continuous_integration/run_tests.sh index 97ac9356..21c19b15 100755 --- a/continuous_integration/run_tests.sh +++ b/continuous_integration/run_tests.sh @@ -21,4 +21,4 @@ export MKL_THREADING_LAYER=INTEL # launching the tests: python -m threadpoolctl -i numpy scipy.linalg #tests._openmp_test_helper.openmp_helpers_inner -pytest -vlrxXs -W error -k "$TESTS" --junitxml=$JUNITXML --cov=threadpoolctl --cov-report xml +pytest -vlrxXs -W error -k "$TESTS" --junitxml=$JUNITXML$GITHUB_STEP_SUMMARY --cov=threadpoolctl --cov-report xml From bb6762ce738b58914bec32f438dce7035c250688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 18:39:51 +0100 Subject: [PATCH 70/92] iter --- continuous_integration/install.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/continuous_integration/install.sh b/continuous_integration/install.sh index 4e067b25..d96f3b8c 100644 --- a/continuous_integration/install.sh +++ b/continuous_integration/install.sh @@ -6,16 +6,6 @@ set -xe UNAMESTR=`uname` -echo $GITHUB_STEP_SUMMARY - -ls -a -l -F /Users/runner/work/_temp/_runner_file_commands/ - -FNAME=$(basename $GITHUB_STEP_SUMMARY) -echo $FNAME - -cat $GITHUB_STEP_SUMMARY - - # Install a recent version of clang and libomp if needed # Only applicable on linux jobs From 5cc79d05c4a3855bc4513f2374311f9164b3e69b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 18:54:02 +0100 Subject: [PATCH 71/92] iter --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 46f38913..767fe102 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -238,7 +238,7 @@ jobs: - name: Upload test results uses: actions/upload-artifact@v4 with: - name: test-results + name: test_result_${{ env.RUN_UNIQUE_ID }}_${{ matrix.step }} path: ${{ env.JUNITXML }}* - name: Upload to Codecov @@ -256,7 +256,7 @@ jobs: - name: Download tests artifacts uses: actions/download-artifact@v4 with: - name: test-results + name: test_result_${{ env.RUN_UNIQUE_ID }}_* - name: Check no test always skipped run: | ls -al From 96966277f4750405680ea5dae449674ca77eb537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 19:02:07 +0100 Subject: [PATCH 72/92] iter --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 767fe102..6059258d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -238,7 +238,7 @@ jobs: - name: Upload test results uses: actions/upload-artifact@v4 with: - name: test_result_${{ env.RUN_UNIQUE_ID }}_${{ matrix.step }} + name: test_result_${{ matrix.name }} path: ${{ env.JUNITXML }}* - name: Upload to Codecov From f0f8546c35ed8c188119bcde03d86d7b61614a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 19:10:09 +0100 Subject: [PATCH 73/92] iter --- .github/workflows/test.yml | 7 +++---- continuous_integration/run_tests.sh | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6059258d..51dd297e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,9 +19,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -env: - JUNITXML: 'test-data.xml' - jobs: linting: @@ -232,13 +229,15 @@ jobs: bash -el continuous_integration/install.sh - name: Test library + env: + JUNITXML: test_result_${{ env.RUN_UNIQUE_ID }}_${{ matrix.name }}.xml run: | bash -el continuous_integration/run_tests.sh - name: Upload test results uses: actions/upload-artifact@v4 with: - name: test_result_${{ matrix.name }} + name: test_result_${{ env.RUN_UNIQUE_ID }}_${{ matrix.name }} path: ${{ env.JUNITXML }}* - name: Upload to Codecov diff --git a/continuous_integration/run_tests.sh b/continuous_integration/run_tests.sh index 21c19b15..97ac9356 100755 --- a/continuous_integration/run_tests.sh +++ b/continuous_integration/run_tests.sh @@ -21,4 +21,4 @@ export MKL_THREADING_LAYER=INTEL # launching the tests: python -m threadpoolctl -i numpy scipy.linalg #tests._openmp_test_helper.openmp_helpers_inner -pytest -vlrxXs -W error -k "$TESTS" --junitxml=$JUNITXML$GITHUB_STEP_SUMMARY --cov=threadpoolctl --cov-report xml +pytest -vlrxXs -W error -k "$TESTS" --junitxml=$JUNITXML --cov=threadpoolctl --cov-report xml From 67071c2b9f4332f5d2bf84418c6372693d29f74a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 19:29:12 +0100 Subject: [PATCH 74/92] iter --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 51dd297e..0490b41b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -230,14 +230,14 @@ jobs: - name: Test library env: - JUNITXML: test_result_${{ env.RUN_UNIQUE_ID }}_${{ matrix.name }}.xml + JUNITXML: test_result_${{github.run_id}}_${{ matrix.name }}.xml run: | bash -el continuous_integration/run_tests.sh - name: Upload test results uses: actions/upload-artifact@v4 with: - name: test_result_${{ env.RUN_UNIQUE_ID }}_${{ matrix.name }} + name: test_result_${{github.run_id}}_${{ matrix.name }} path: ${{ env.JUNITXML }}* - name: Upload to Codecov @@ -255,7 +255,7 @@ jobs: - name: Download tests artifacts uses: actions/download-artifact@v4 with: - name: test_result_${{ env.RUN_UNIQUE_ID }}_* + name: test_result_${{github.run_id}}_* - name: Check no test always skipped run: | ls -al From 65462fcde5840fb54674e4e570678ddb146f1e54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 20:42:11 +0100 Subject: [PATCH 75/92] iter --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0490b41b..ed30f72e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -230,14 +230,14 @@ jobs: - name: Test library env: - JUNITXML: test_result_${{github.run_id}}_${{ matrix.name }}.xml + JUNITXML: test_result_${{github.run_id}}_${{ matrix.os }}_${{ matrix.name }}.xml run: | bash -el continuous_integration/run_tests.sh - name: Upload test results uses: actions/upload-artifact@v4 with: - name: test_result_${{github.run_id}}_${{ matrix.name }} + name: test_result_${{github.run_id}}_${{ matrix.os }}_${{ matrix.name }} path: ${{ env.JUNITXML }}* - name: Upload to Codecov From 5b0032b00cb669afe88622caffde7527aa1924ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 20:44:37 +0100 Subject: [PATCH 76/92] iter --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ed30f72e..9ac275a7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -202,7 +202,9 @@ jobs: CC_OUTER_LOOP: "gcc" CC_INNER_LOOP: "gcc" - env: ${{ matrix }} + env: + ${{ matrix }} + JUNITXML: test_result_${{github.run_id}}_${{ matrix.os }}_${{ matrix.name }}.xml runs-on: ${{ matrix.os }} @@ -229,8 +231,6 @@ jobs: bash -el continuous_integration/install.sh - name: Test library - env: - JUNITXML: test_result_${{github.run_id}}_${{ matrix.os }}_${{ matrix.name }}.xml run: | bash -el continuous_integration/run_tests.sh @@ -238,7 +238,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: test_result_${{github.run_id}}_${{ matrix.os }}_${{ matrix.name }} - path: ${{ env.JUNITXML }}* + path: ${{ env.JUNITXML }} - name: Upload to Codecov uses: codecov/codecov-action@v5 From 4782b2aabf1974c9220751c620414ea1c32a5897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 20:46:21 +0100 Subject: [PATCH 77/92] iter --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ac275a7..05a11975 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -202,8 +202,7 @@ jobs: CC_OUTER_LOOP: "gcc" CC_INNER_LOOP: "gcc" - env: - ${{ matrix }} + env: ${{ matrix }} JUNITXML: test_result_${{github.run_id}}_${{ matrix.os }}_${{ matrix.name }}.xml runs-on: ${{ matrix.os }} From 80b404551e9854f6311c00c14a2a1662d76ea453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 20:51:19 +0100 Subject: [PATCH 78/92] iter --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 05a11975..ff59289d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -203,7 +203,6 @@ jobs: CC_INNER_LOOP: "gcc" env: ${{ matrix }} - JUNITXML: test_result_${{github.run_id}}_${{ matrix.os }}_${{ matrix.name }}.xml runs-on: ${{ matrix.os }} @@ -230,6 +229,8 @@ jobs: bash -el continuous_integration/install.sh - name: Test library + env: + JUNITXML: test_result_${{github.run_id}}_${{ matrix.os }}_${{ matrix.name }}.xml run: | bash -el continuous_integration/run_tests.sh From ab98cfef16414507d6dc942a11f246c06b1c44b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 20:51:47 +0100 Subject: [PATCH 79/92] iter --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ff59289d..26e9b51d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -238,7 +238,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: test_result_${{github.run_id}}_${{ matrix.os }}_${{ matrix.name }} - path: ${{ env.JUNITXML }} + path: test_result_* - name: Upload to Codecov uses: codecov/codecov-action@v5 From 12716a2c8507132c6073599e94b5533f207cb4e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 21:13:45 +0100 Subject: [PATCH 80/92] iter --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 26e9b51d..818fb766 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -255,7 +255,7 @@ jobs: - name: Download tests artifacts uses: actions/download-artifact@v4 with: - name: test_result_${{github.run_id}}_* + path: test_result_* - name: Check no test always skipped run: | ls -al From a6dfad935f3da90c99396bc70c6fc496fb3c6d3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 22:07:05 +0100 Subject: [PATCH 81/92] iter --- .github/workflows/test.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 818fb766..a8f61641 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -252,11 +252,16 @@ jobs: needs: testing runs-on: ubuntu-latest steps: + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.12" - name: Download tests artifacts uses: actions/download-artifact@v4 with: - path: test_result_* + name: test_results - name: Check no test always skipped run: | ls -al + pwd python continuous_integration/check_no_test_skipped.py From 1f0ea6cfc327006985bf093c0c77fe1821214713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 22:39:34 +0100 Subject: [PATCH 82/92] iter --- .github/workflows/test.yml | 154 ++++++++++++++++++------------------- 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a8f61641..94bf4266 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,47 +45,47 @@ jobs: matrix: include: - - name: pylatest_conda_forge_mkl - os: windows-latest - PYTHON_VERSION: "*" - PACKAGER: "conda-forge" - BLAS: "mkl" - - name: py310_conda_forge_openblas - os: windows-latest - PYTHON_VERSION: "3.10" - PACKAGER: "conda-forge" - BLAS: "openblas" - - name: py39_conda - os: windows-latest - PYTHON_VERSION: "3.9" - PACKAGER: "conda" - - name: py38_pip - os: windows-latest - PYTHON_VERSION: "3.8" - PACKAGER: "pip" + # - name: pylatest_conda_forge_mkl + # os: windows-latest + # PYTHON_VERSION: "*" + # PACKAGER: "conda-forge" + # BLAS: "mkl" + # - name: py310_conda_forge_openblas + # os: windows-latest + # PYTHON_VERSION: "3.10" + # PACKAGER: "conda-forge" + # BLAS: "openblas" + # - name: py39_conda + # os: windows-latest + # PYTHON_VERSION: "3.9" + # PACKAGER: "conda" + # - name: py38_pip + # os: windows-latest + # PYTHON_VERSION: "3.8" + # PACKAGER: "pip" - # MacOS env with OpenMP installed through homebrew - - name: py38_conda_homebrew_libomp - os: macos-latest - PYTHON_VERSION: "3.8" - PACKAGER: "conda" - BLAS: "openblas" - CC_OUTER_LOOP: "clang" - CC_INNER_LOOP: "clang" - INSTALL_LIBOMP: "homebrew" - # MacOS env with OpenBLAS and OpenMP installed through conda-forge compilers - - name: pylatest_conda_forge_clang_openblas - os: macos-latest - PYTHON_VERSION: "*" - PACKAGER: "conda-forge" - BLAS: "openblas" - INSTALL_LIBOMP: "conda-forge" - # MacOS env with FlexiBLAS - - name: pylatest_flexiblas - os: macos-latest - PYTHON_VERSION: "*" - INSTALL_BLAS: "flexiblas" - PLATFORM_SPECIFIC_PACKAGES: "llvm-openmp" + # # MacOS env with OpenMP installed through homebrew + # - name: py38_conda_homebrew_libomp + # os: macos-latest + # PYTHON_VERSION: "3.8" + # PACKAGER: "conda" + # BLAS: "openblas" + # CC_OUTER_LOOP: "clang" + # CC_INNER_LOOP: "clang" + # INSTALL_LIBOMP: "homebrew" + # # MacOS env with OpenBLAS and OpenMP installed through conda-forge compilers + # - name: pylatest_conda_forge_clang_openblas + # os: macos-latest + # PYTHON_VERSION: "*" + # PACKAGER: "conda-forge" + # BLAS: "openblas" + # INSTALL_LIBOMP: "conda-forge" + # # MacOS env with FlexiBLAS + # - name: pylatest_flexiblas + # os: macos-latest + # PYTHON_VERSION: "*" + # INSTALL_BLAS: "flexiblas" + # PLATFORM_SPECIFIC_PACKAGES: "llvm-openmp" # Linux environments to test that packages that comes with Ubuntu 20.04 # are correctly handled. @@ -164,43 +164,43 @@ jobs: CC_OUTER_LOOP: "gcc" CC_INNER_LOOP: "clang-18" - # Linux environments with numpy linked to BLIS - - name: pylatest_blis_gcc_clang_openmp - os: ubuntu-latest - PYTHON_VERSION: "*" - INSTALL_BLAS: "blis" - BLIS_NUM_THREAEDS: "4" - CC_OUTER_LOOP: "gcc" - CC_INNER_LOOP: "gcc" - BLIS_CC: "clang-18" - BLIS_ENABLE_THREADING: "openmp" - - name: pylatest_blis_clang_gcc_pthreads - os: ubuntu-latest - PYTHON_VERSION: "*" - INSTALL_BLAS: "blis" - BLIS_NUM_THREADS: "4" - CC_OUTER_LOOP: "clang-18" - CC_INNER_LOOP: "clang-18" - BLIS_CC: "gcc-12" - BLIS_ENABLE_THREADING: "pthreads" - - name: pylatest_blis_no_threading - os: ubuntu-latest - PYTHON_VERSION: "*" - INSTALL_BLAS: "blis" - BLIS_NUM_THREADS: "1" - CC_OUTER_LOOP: "gcc" - CC_INNER_LOOP: "gcc" - BLIS_CC: "gcc-12" - BLIS_ENABLE_THREADING: "no" + # # Linux environments with numpy linked to BLIS + # - name: pylatest_blis_gcc_clang_openmp + # os: ubuntu-latest + # PYTHON_VERSION: "*" + # INSTALL_BLAS: "blis" + # BLIS_NUM_THREAEDS: "4" + # CC_OUTER_LOOP: "gcc" + # CC_INNER_LOOP: "gcc" + # BLIS_CC: "clang-18" + # BLIS_ENABLE_THREADING: "openmp" + # - name: pylatest_blis_clang_gcc_pthreads + # os: ubuntu-latest + # PYTHON_VERSION: "*" + # INSTALL_BLAS: "blis" + # BLIS_NUM_THREADS: "4" + # CC_OUTER_LOOP: "clang-18" + # CC_INNER_LOOP: "clang-18" + # BLIS_CC: "gcc-12" + # BLIS_ENABLE_THREADING: "pthreads" + # - name: pylatest_blis_no_threading + # os: ubuntu-latest + # PYTHON_VERSION: "*" + # INSTALL_BLAS: "blis" + # BLIS_NUM_THREADS: "1" + # CC_OUTER_LOOP: "gcc" + # CC_INNER_LOOP: "gcc" + # BLIS_CC: "gcc-12" + # BLIS_ENABLE_THREADING: "no" - # Linux env with FlexiBLAS - - name: pylatest_flexiblas - os: ubuntu-latest - PYTHON_VERSION: "*" - INSTALL_BLAS: "flexiblas" - PLATFORM_SPECIFIC_PACKAGES: "mkl" - CC_OUTER_LOOP: "gcc" - CC_INNER_LOOP: "gcc" + # # Linux env with FlexiBLAS + # - name: pylatest_flexiblas + # os: ubuntu-latest + # PYTHON_VERSION: "*" + # INSTALL_BLAS: "flexiblas" + # PLATFORM_SPECIFIC_PACKAGES: "mkl" + # CC_OUTER_LOOP: "gcc" + # CC_INNER_LOOP: "gcc" env: ${{ matrix }} @@ -259,7 +259,7 @@ jobs: - name: Download tests artifacts uses: actions/download-artifact@v4 with: - name: test_results + path: test_results - name: Check no test always skipped run: | ls -al From 42c679eb33f57f69e0627c5c0c872f63f976d84e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 22:47:42 +0100 Subject: [PATCH 83/92] iter --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 94bf4266..1b8d611a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -256,10 +256,15 @@ jobs: uses: actions/setup-python@v4 with: python-version: "3.12" + + - name: Checkout code + uses: actions/checkout@v3 + - name: Download tests artifacts uses: actions/download-artifact@v4 with: path: test_results + - name: Check no test always skipped run: | ls -al From fe79cf8ca8d077536c253c5e07d51dcc33f6719d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 23:03:00 +0100 Subject: [PATCH 84/92] iter --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1b8d611a..ad06db8b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -267,6 +267,5 @@ jobs: - name: Check no test always skipped run: | - ls -al - pwd + ls test_results python continuous_integration/check_no_test_skipped.py From 3e15f65e4b34ed2cddde4641ae97d0b3eb233e8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 23:11:37 +0100 Subject: [PATCH 85/92] iter --- .github/workflows/test.yml | 4 ++-- continuous_integration/check_no_test_skipped.py | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ad06db8b..8de74c2a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -237,6 +237,7 @@ jobs: - name: Upload test results uses: actions/upload-artifact@v4 with: + # Requires a unique name for each job in the matrix of this run name: test_result_${{github.run_id}}_${{ matrix.os }}_${{ matrix.name }} path: test_result_* @@ -267,5 +268,4 @@ jobs: - name: Check no test always skipped run: | - ls test_results - python continuous_integration/check_no_test_skipped.py + python continuous_integration/check_no_test_skipped.py test_results diff --git a/continuous_integration/check_no_test_skipped.py b/continuous_integration/check_no_test_skipped.py index f831d29a..37f64a15 100644 --- a/continuous_integration/check_no_test_skipped.py +++ b/continuous_integration/check_no_test_skipped.py @@ -13,12 +13,11 @@ always_skipped = {} for name in os.listdir(base_dir): - # all test result files are in /base_dir/jobs.*/ dirs - if name.startswith("stage1."): - print("> processing test result from job", name.replace("stage1", "")) + # all test result files are in base_dir/ + if name.startswith("test_result_"): + print(f"> processing test result {name}") print(" > tests skipped:") - result_file = os.path.join(base_dir, name, "test-data.xml") - root = ET.parse(result_file).getroot() + root = ET.parse(name).getroot() # All tests are identified by the xml tag testcase. for test in root.iter("testcase"): From 72bdbebfa252fbbe7a3f76e0044239eac26bb2a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sat, 8 Mar 2025 23:49:18 +0100 Subject: [PATCH 86/92] iter --- continuous_integration/check_no_test_skipped.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/continuous_integration/check_no_test_skipped.py b/continuous_integration/check_no_test_skipped.py index 37f64a15..55ab1e93 100644 --- a/continuous_integration/check_no_test_skipped.py +++ b/continuous_integration/check_no_test_skipped.py @@ -17,7 +17,8 @@ if name.startswith("test_result_"): print(f"> processing test result {name}") print(" > tests skipped:") - root = ET.parse(name).getroot() + result_file = os.path.join(base_dir, name) + root = ET.parse(result_file).getroot() # All tests are identified by the xml tag testcase. for test in root.iter("testcase"): From 0ffdd8f4d98d2c75f5bea60ad24c36be1dbeea83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sun, 9 Mar 2025 00:17:40 +0100 Subject: [PATCH 87/92] iter --- .github/workflows/test.yml | 4 +--- continuous_integration/check_no_test_skipped.py | 6 +++--- continuous_integration/run_tests.sh | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8de74c2a..5b42055b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -229,8 +229,6 @@ jobs: bash -el continuous_integration/install.sh - name: Test library - env: - JUNITXML: test_result_${{github.run_id}}_${{ matrix.os }}_${{ matrix.name }}.xml run: | bash -el continuous_integration/run_tests.sh @@ -239,7 +237,7 @@ jobs: with: # Requires a unique name for each job in the matrix of this run name: test_result_${{github.run_id}}_${{ matrix.os }}_${{ matrix.name }} - path: test_result_* + path: test_result.xml - name: Upload to Codecov uses: codecov/codecov-action@v5 diff --git a/continuous_integration/check_no_test_skipped.py b/continuous_integration/check_no_test_skipped.py index 55ab1e93..18fd6bc2 100644 --- a/continuous_integration/check_no_test_skipped.py +++ b/continuous_integration/check_no_test_skipped.py @@ -13,11 +13,11 @@ always_skipped = {} for name in os.listdir(base_dir): - # all test result files are in base_dir/ + # all test result files are in base_dir/test_result_*/ dirs if name.startswith("test_result_"): - print(f"> processing test result {name}") + print(f"> processing test result from job {name.replace('test_result_', '')}") print(" > tests skipped:") - result_file = os.path.join(base_dir, name) + result_file = os.path.join(base_dir, name, "test_result.xml") root = ET.parse(result_file).getroot() # All tests are identified by the xml tag testcase. diff --git a/continuous_integration/run_tests.sh b/continuous_integration/run_tests.sh index 97ac9356..b7ea425b 100755 --- a/continuous_integration/run_tests.sh +++ b/continuous_integration/run_tests.sh @@ -21,4 +21,4 @@ export MKL_THREADING_LAYER=INTEL # launching the tests: python -m threadpoolctl -i numpy scipy.linalg #tests._openmp_test_helper.openmp_helpers_inner -pytest -vlrxXs -W error -k "$TESTS" --junitxml=$JUNITXML --cov=threadpoolctl --cov-report xml +pytest -vlrxXs -W error -k "$TESTS" --junitxml=test_result.xml --cov=threadpoolctl --cov-report xml From 3832ae5c62abd820d415b46d48219fc2042fa916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sun, 9 Mar 2025 00:21:43 +0100 Subject: [PATCH 88/92] iter --- .github/workflows/test.yml | 152 ++++++++++++++++++------------------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5b42055b..21917ae5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,47 +45,47 @@ jobs: matrix: include: - # - name: pylatest_conda_forge_mkl - # os: windows-latest - # PYTHON_VERSION: "*" - # PACKAGER: "conda-forge" - # BLAS: "mkl" - # - name: py310_conda_forge_openblas - # os: windows-latest - # PYTHON_VERSION: "3.10" - # PACKAGER: "conda-forge" - # BLAS: "openblas" - # - name: py39_conda - # os: windows-latest - # PYTHON_VERSION: "3.9" - # PACKAGER: "conda" - # - name: py38_pip - # os: windows-latest - # PYTHON_VERSION: "3.8" - # PACKAGER: "pip" + - name: pylatest_conda_forge_mkl + os: windows-latest + PYTHON_VERSION: "*" + PACKAGER: "conda-forge" + BLAS: "mkl" + - name: py310_conda_forge_openblas + os: windows-latest + PYTHON_VERSION: "3.10" + PACKAGER: "conda-forge" + BLAS: "openblas" + - name: py39_conda + os: windows-latest + PYTHON_VERSION: "3.9" + PACKAGER: "conda" + - name: py38_pip + os: windows-latest + PYTHON_VERSION: "3.8" + PACKAGER: "pip" - # # MacOS env with OpenMP installed through homebrew - # - name: py38_conda_homebrew_libomp - # os: macos-latest - # PYTHON_VERSION: "3.8" - # PACKAGER: "conda" - # BLAS: "openblas" - # CC_OUTER_LOOP: "clang" - # CC_INNER_LOOP: "clang" - # INSTALL_LIBOMP: "homebrew" - # # MacOS env with OpenBLAS and OpenMP installed through conda-forge compilers - # - name: pylatest_conda_forge_clang_openblas - # os: macos-latest - # PYTHON_VERSION: "*" - # PACKAGER: "conda-forge" - # BLAS: "openblas" - # INSTALL_LIBOMP: "conda-forge" - # # MacOS env with FlexiBLAS - # - name: pylatest_flexiblas - # os: macos-latest - # PYTHON_VERSION: "*" - # INSTALL_BLAS: "flexiblas" - # PLATFORM_SPECIFIC_PACKAGES: "llvm-openmp" + # MacOS env with OpenMP installed through homebrew + - name: py38_conda_homebrew_libomp + os: macos-latest + PYTHON_VERSION: "3.8" + PACKAGER: "conda" + BLAS: "openblas" + CC_OUTER_LOOP: "clang" + CC_INNER_LOOP: "clang" + INSTALL_LIBOMP: "homebrew" + # MacOS env with OpenBLAS and OpenMP installed through conda-forge compilers + - name: pylatest_conda_forge_clang_openblas + os: macos-latest + PYTHON_VERSION: "*" + PACKAGER: "conda-forge" + BLAS: "openblas" + INSTALL_LIBOMP: "conda-forge" + # MacOS env with FlexiBLAS + - name: pylatest_flexiblas + os: macos-latest + PYTHON_VERSION: "*" + INSTALL_BLAS: "flexiblas" + PLATFORM_SPECIFIC_PACKAGES: "llvm-openmp" # Linux environments to test that packages that comes with Ubuntu 20.04 # are correctly handled. @@ -164,43 +164,43 @@ jobs: CC_OUTER_LOOP: "gcc" CC_INNER_LOOP: "clang-18" - # # Linux environments with numpy linked to BLIS - # - name: pylatest_blis_gcc_clang_openmp - # os: ubuntu-latest - # PYTHON_VERSION: "*" - # INSTALL_BLAS: "blis" - # BLIS_NUM_THREAEDS: "4" - # CC_OUTER_LOOP: "gcc" - # CC_INNER_LOOP: "gcc" - # BLIS_CC: "clang-18" - # BLIS_ENABLE_THREADING: "openmp" - # - name: pylatest_blis_clang_gcc_pthreads - # os: ubuntu-latest - # PYTHON_VERSION: "*" - # INSTALL_BLAS: "blis" - # BLIS_NUM_THREADS: "4" - # CC_OUTER_LOOP: "clang-18" - # CC_INNER_LOOP: "clang-18" - # BLIS_CC: "gcc-12" - # BLIS_ENABLE_THREADING: "pthreads" - # - name: pylatest_blis_no_threading - # os: ubuntu-latest - # PYTHON_VERSION: "*" - # INSTALL_BLAS: "blis" - # BLIS_NUM_THREADS: "1" - # CC_OUTER_LOOP: "gcc" - # CC_INNER_LOOP: "gcc" - # BLIS_CC: "gcc-12" - # BLIS_ENABLE_THREADING: "no" + # Linux environments with numpy linked to BLIS + - name: pylatest_blis_gcc_clang_openmp + os: ubuntu-latest + PYTHON_VERSION: "*" + INSTALL_BLAS: "blis" + BLIS_NUM_THREAEDS: "4" + CC_OUTER_LOOP: "gcc" + CC_INNER_LOOP: "gcc" + BLIS_CC: "clang-18" + BLIS_ENABLE_THREADING: "openmp" + - name: pylatest_blis_clang_gcc_pthreads + os: ubuntu-latest + PYTHON_VERSION: "*" + INSTALL_BLAS: "blis" + BLIS_NUM_THREADS: "4" + CC_OUTER_LOOP: "clang-18" + CC_INNER_LOOP: "clang-18" + BLIS_CC: "gcc-12" + BLIS_ENABLE_THREADING: "pthreads" + - name: pylatest_blis_no_threading + os: ubuntu-latest + PYTHON_VERSION: "*" + INSTALL_BLAS: "blis" + BLIS_NUM_THREADS: "1" + CC_OUTER_LOOP: "gcc" + CC_INNER_LOOP: "gcc" + BLIS_CC: "gcc-12" + BLIS_ENABLE_THREADING: "no" - # # Linux env with FlexiBLAS - # - name: pylatest_flexiblas - # os: ubuntu-latest - # PYTHON_VERSION: "*" - # INSTALL_BLAS: "flexiblas" - # PLATFORM_SPECIFIC_PACKAGES: "mkl" - # CC_OUTER_LOOP: "gcc" - # CC_INNER_LOOP: "gcc" + # Linux env with FlexiBLAS + - name: pylatest_flexiblas + os: ubuntu-latest + PYTHON_VERSION: "*" + INSTALL_BLAS: "flexiblas" + PLATFORM_SPECIFIC_PACKAGES: "mkl" + CC_OUTER_LOOP: "gcc" + CC_INNER_LOOP: "gcc" env: ${{ matrix }} From f3cdd72207bfdfac388bbf9b073c59dae730c723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sun, 9 Mar 2025 01:14:36 +0100 Subject: [PATCH 89/92] iter --- tests/test_threadpoolctl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_threadpoolctl.py b/tests/test_threadpoolctl.py index 6e920924..7f6e090e 100644 --- a/tests/test_threadpoolctl.py +++ b/tests/test_threadpoolctl.py @@ -658,7 +658,7 @@ def test_openblas_threading_layer(): # skip test if not run in a azure pipelines job since it relies on a specific flexiblas # installation. @pytest.mark.skipif( - "TF_BUILD" not in os.environ, reason="not running in azure pipelines" + "GITHUB_ACTIONS" not in os.environ, reason="not running in azure pipelines" ) def test_flexiblas(): # Check that threadpool_info correctly recovers the FlexiBLAS backends. @@ -696,7 +696,7 @@ def test_flexiblas_switch_error(): # skip test if not run in a azure pipelines job since it relies on a specific flexiblas # installation. @pytest.mark.skipif( - "TF_BUILD" not in os.environ, reason="not running in azure pipelines" + "GITHUB_ACTIONS" not in os.environ, reason="not running in azure pipelines" ) def test_flexiblas_switch(): # Check that the backend can be switched. From a1b5cb2364d0cb2ccf8fa567f0acb1c21ee8f935 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sun, 9 Mar 2025 01:28:19 +0100 Subject: [PATCH 90/92] iter --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 21917ae5..a8f07574 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -238,6 +238,7 @@ jobs: # Requires a unique name for each job in the matrix of this run name: test_result_${{github.run_id}}_${{ matrix.os }}_${{ matrix.name }} path: test_result.xml + retention-days: 1 - name: Upload to Codecov uses: codecov/codecov-action@v5 @@ -247,7 +248,7 @@ jobs: # Meta-test to ensure that at least one of the above CI configurations had # the necessary platform settings to execute each test without raising # skipping. - post_testing: + meta_test: needs: testing runs-on: ubuntu-latest steps: @@ -259,7 +260,7 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Download tests artifacts + - name: Download tests results uses: actions/download-artifact@v4 with: path: test_results From 02fbd5094e6081e40c1e197f6e1a6729af715785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sun, 9 Mar 2025 14:16:26 +0100 Subject: [PATCH 91/92] iter --- .azure_pipeline.yml | 214 ------------------ .github/workflows/test.yml | 4 + continuous_integration/install.cmd | 38 ---- continuous_integration/install.sh | 9 +- continuous_integration/install_old.sh | 95 -------- continuous_integration/install_with_blis.sh | 71 ------ .../install_with_flexiblas.sh | 87 ------- continuous_integration/posix.yml | 48 ---- continuous_integration/test_script.cmd | 10 - continuous_integration/upload_codecov.sh | 15 -- continuous_integration/windows.yml | 35 --- dev-requirements.txt | 1 + 12 files changed, 8 insertions(+), 619 deletions(-) delete mode 100644 .azure_pipeline.yml delete mode 100644 continuous_integration/install.cmd delete mode 100755 continuous_integration/install_old.sh delete mode 100755 continuous_integration/install_with_blis.sh delete mode 100755 continuous_integration/install_with_flexiblas.sh delete mode 100644 continuous_integration/posix.yml delete mode 100644 continuous_integration/test_script.cmd delete mode 100755 continuous_integration/upload_codecov.sh delete mode 100644 continuous_integration/windows.yml diff --git a/.azure_pipeline.yml b/.azure_pipeline.yml deleted file mode 100644 index 44703825..00000000 --- a/.azure_pipeline.yml +++ /dev/null @@ -1,214 +0,0 @@ -# Adapted from https://github.com/pandas-dev/pandas/blob/master/azure-pipelines.yml - -# Global variables for all jobs -variables: - VIRTUALENV: 'testvenv' - JUNITXML: 'test-data.xml' - CODECOV_TOKEN: 'cee0e505-c12e-4139-aa43-621fb16a2347' - -schedules: -- cron: "0 1 * * *" # 1am UTC - displayName: Run nightly build - branches: - include: - - master - always: true - -stages: -- stage: - jobs: - - - job: 'linting' - displayName: Linting - pool: - vmImage: ubuntu-latest - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.12' - - script: | - pip install black==25.1.0 - displayName: install black - - script: | - black --check --diff . - displayName: Run black - - - template: continuous_integration/windows.yml - parameters: - name: Windows - vmImage: windows-latest - matrix: - pylatest_conda_forge_mkl: - PYTHON_VERSION: '*' - PACKAGER: 'conda-forge' - BLAS: 'mkl' - py310_conda_forge_openblas: - PYTHON_VERSION: '3.10' - PACKAGER: 'conda-forge' - BLAS: 'openblas' - py39_conda: - PYTHON_VERSION: '3.9' - PACKAGER: 'conda' - py38_pip: - PYTHON_VERSION: '3.8' - PACKAGER: 'pip' - - - template: continuous_integration/posix.yml - parameters: - name: Linux - vmImage: ubuntu-20.04 - matrix: - # Linux environment with development versions of numpy and scipy - pylatest_pip_dev: - PACKAGER: 'pip-dev' - PYTHON_VERSION: '*' - CC_OUTER_LOOP: 'gcc' - CC_INNER_LOOP: 'gcc' - # Linux environment to test that packages that comes with Ubuntu 20.04 - # are correctly handled. - py38_ubuntu_atlas_gcc_gcc: - PACKAGER: 'ubuntu' - APT_BLAS: 'libatlas3-base libatlas-base-dev' - PYTHON_VERSION: '3.8' - CC_OUTER_LOOP: 'gcc' - CC_INNER_LOOP: 'gcc' - py38_ubuntu_openblas_gcc_gcc: - PACKAGER: 'ubuntu' - APT_BLAS: 'libopenblas-base libopenblas-dev' - PYTHON_VERSION: '3.8' - CC_OUTER_LOOP: 'gcc' - CC_INNER_LOOP: 'gcc' - # Linux + Python 3.9 and homogeneous runtime nesting. - py39_conda_openblas_clang_clang: - PACKAGER: 'conda' - PYTHON_VERSION: '3.9' - BLAS: 'openblas' - CC_OUTER_LOOP: 'clang-10' - CC_INNER_LOOP: 'clang-10' - # Linux environment with MKL and Clang (known to be unsafe for - # threadpoolctl) to only test the warning from multiple OpenMP. - pylatest_conda_mkl_clang_gcc: - PACKAGER: 'conda' - PYTHON_VERSION: '*' - BLAS: 'mkl' - CC_OUTER_LOOP: 'clang-10' - CC_INNER_LOOP: 'gcc' - TESTS: 'libomp_libiomp_warning' - # Linux environment with MKL, safe for threadpoolctl. - pylatest_conda_mkl_gcc_gcc: - PACKAGER: 'conda' - PYTHON_VERSION: '*' - BLAS: 'mkl' - CC_OUTER_LOOP: 'gcc' - CC_INNER_LOOP: 'gcc' - MKL_THREADING_LAYER: 'INTEL' - # Linux + Python 3.8 with numpy / scipy installed with pip from PyPI - # and heterogeneous OpenMP runtimes. - py38_pip_openblas_gcc_clang: - PACKAGER: 'pip' - PYTHON_VERSION: '3.8' - CC_OUTER_LOOP: 'gcc' - CC_INNER_LOOP: 'clang-10' - # Linux environment with numpy from conda-forge channel and openblas-openmp - pylatest_conda_forge: - PACKAGER: 'conda-forge' - PYTHON_VERSION: '*' - BLAS: 'openblas' - OPENBLAS_THREADING_LAYER: 'openmp' - CC_OUTER_LOOP: 'gcc' - CC_INNER_LOOP: 'gcc' - # Linux environment with no numpy and heterogeneous OpenMP runtimes. - pylatest_conda_nonumpy_gcc_clang: - PACKAGER: 'conda' - NO_NUMPY: 'true' - PYTHON_VERSION: '*' - CC_OUTER_LOOP: 'gcc' - CC_INNER_LOOP: 'clang-10' - # Linux environment with numpy linked to BLIS - pylatest_blis_gcc_clang_openmp: - PACKAGER: 'conda' - PYTHON_VERSION: '*' - INSTALL_BLAS: 'blis' - BLIS_NUM_THREADS: '4' - CC_OUTER_LOOP: 'gcc' - CC_INNER_LOOP: 'gcc' - BLIS_CC: 'clang-10' - BLIS_ENABLE_THREADING: 'openmp' - pylatest_blis_clang_gcc_pthreads: - PACKAGER: 'conda' - PYTHON_VERSION: '*' - INSTALL_BLAS: 'blis' - BLIS_NUM_THREADS: '4' - CC_OUTER_LOOP: 'clang-10' - CC_INNER_LOOP: 'clang-10' - BLIS_CC: 'gcc-8' - BLIS_ENABLE_THREADING: 'pthreads' - pylatest_blis_no_threading: - PACKAGER: 'conda' - PYTHON_VERSION: '*' - INSTALL_BLAS: 'blis' - BLIS_NUM_THREADS: '1' - CC_OUTER_LOOP: 'gcc' - CC_INNER_LOOP: 'gcc' - BLIS_CC: 'gcc-8' - BLIS_ENABLE_THREADING: 'no' - pylatest_flexiblas: - PACKAGER: 'conda' - PYTHON_VERSION: '*' - INSTALL_BLAS: 'flexiblas' - PLATFORM_SPECIFIC_PACKAGES: 'mkl' - CC_OUTER_LOOP: 'gcc' - CC_INNER_LOOP: 'gcc' - - - - template: continuous_integration/posix.yml - parameters: - name: macOS - vmImage: macOS-latest - matrix: - # MacOS environment with OpenMP installed through homebrew - py38_conda_homebrew_libomp: - PACKAGER: 'conda' - PYTHON_VERSION: '3.8' - BLAS: 'openblas' - CC_OUTER_LOOP: 'clang' - CC_INNER_LOOP: 'clang' - INSTALL_LIBOMP: 'homebrew' - # MacOS env with OpenBLAS and OpenMP installed through conda-forge compilers - py39_conda_forge_clang_openblas: - PACKAGER: 'conda-forge' - PYTHON_VERSION: '*' - BLAS: 'openblas' - CC_OUTER_LOOP: 'clang' - CC_INNER_LOOP: 'clang' - INSTALL_LIBOMP: 'conda-forge' - # MacOS environment with OpenMP installed through conda-forge compilers - pylatest_conda_forge_clang: - PACKAGER: 'conda-forge' - PYTHON_VERSION: '*' - BLAS: 'mkl' - CC_OUTER_LOOP: 'clang' - CC_INNER_LOOP: 'clang' - INSTALL_LIBOMP: 'conda-forge' - pylatest_flexiblas: - PACKAGER: 'conda' - PYTHON_VERSION: '*' - INSTALL_BLAS: 'flexiblas' - PLATFORM_SPECIFIC_PACKAGES: 'mkl' - CC_OUTER_LOOP: 'clang' - CC_INNER_LOOP: 'clang' - -- stage: - jobs: - # Meta-test to ensure that at least of the above CI configurations had - # the necessary platform settings to execute each test without raising - # skipping. - - job: 'no_test_always_skipped' - displayName: 'No test always skipped' - pool: - vmImage: ubuntu-latest - steps: - - download: current - - script: | - python continuous_integration/check_no_test_skipped.py $(Pipeline.Workspace) - displayName: 'No test always skipped' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a8f07574..1520b10b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,20 +45,24 @@ jobs: matrix: include: + # Windows env with numpy, scipy,MKL installed through conda-forge - name: pylatest_conda_forge_mkl os: windows-latest PYTHON_VERSION: "*" PACKAGER: "conda-forge" BLAS: "mkl" + # Windows env with numpy, scipy, OpenBLAS installed through conda-forge - name: py310_conda_forge_openblas os: windows-latest PYTHON_VERSION: "3.10" PACKAGER: "conda-forge" BLAS: "openblas" + # Windows env with numpy, scipy installed through conda - name: py39_conda os: windows-latest PYTHON_VERSION: "3.9" PACKAGER: "conda" + # Windows env with numpy, scipy installed through pip - name: py38_pip os: windows-latest PYTHON_VERSION: "3.8" diff --git a/continuous_integration/install.cmd b/continuous_integration/install.cmd deleted file mode 100644 index 40731e05..00000000 --- a/continuous_integration/install.cmd +++ /dev/null @@ -1,38 +0,0 @@ -@rem https://github.com/numba/numba/blob/master/buildscripts/incremental/setup_conda_environment.cmd -@rem The cmd /C hack circumvents a regression where conda installs a conda.bat -@rem script in non-root environments. -set CONDA_INSTALL=cmd /C conda install -q -y -set PIP_INSTALL=pip install -q - -@echo on - -@rem Deactivate any environment -call deactivate -@rem Clean up any left-over from a previous build and install version of python -conda update -n base conda conda-libmamba-solver -q -y -conda config --set solver libmamba -conda remove --all -q -y -n %VIRTUALENV% -conda create -n %VIRTUALENV% -q -y python=%PYTHON_VERSION% - -call activate %VIRTUALENV% -python -m pip install -U pip -python --version -pip --version - -@rem Install dependencies with either conda or pip. -set TO_INSTALL=numpy scipy cython pytest - -if "%PACKAGER%" == "conda" (%CONDA_INSTALL% %TO_INSTALL%) -if "%PACKAGER%" == "conda-forge" (%CONDA_INSTALL% -c conda-forge %TO_INSTALL% blas[build=%BLAS%]) -if "%PACKAGER%" == "pip" (%PIP_INSTALL% %TO_INSTALL%) - -@rem Install extra developer dependencies -pip install -q -r dev-requirements.txt - -@rem Install package -flit install --symlink - -@rem Build the cython test helper for openmp -bash ./continuous_integration/build_test_ext.sh - -if %errorlevel% neq 0 exit /b %errorlevel% diff --git a/continuous_integration/install.sh b/continuous_integration/install.sh index d96f3b8c..7a958980 100644 --- a/continuous_integration/install.sh +++ b/continuous_integration/install.sh @@ -8,7 +8,7 @@ UNAMESTR=`uname` # Install a recent version of clang and libomp if needed -# Only applicable on linux jobs +# Only applicable to linux jobs if [[ "$CC_OUTER_LOOP" == "clang-18" ]] || \ [[ "$CC_INNER_LOOP" == "clang-18" ]] || \ [[ "$BLIS_CC" == "clang-18" ]] @@ -22,7 +22,7 @@ fi make_conda() { CHANNEL="$1" - TO_INSTALL="setuptools $2" + TO_INSTALL="$2" if [[ "$UNAMESTR" == "Darwin" ]]; then if [[ "$INSTALL_LIBOMP" == "conda-forge" ]]; then # Install an OpenMP-enabled clang/llvm from conda-forge @@ -52,10 +52,9 @@ make_conda() { conda update -n base conda conda-libmamba-solver -q --yes conda config --set solver libmamba + conda create -n testenv -q --yes python=$PYTHON_VERSION $TO_INSTALL conda activate testenv - - which clang } @@ -113,8 +112,6 @@ elif [[ "$INSTALL_BLAS" == "flexiblas" ]]; then fi -echo $CFLAGS - python -m pip install -v -q -r dev-requirements.txt bash ./continuous_integration/build_test_ext.sh diff --git a/continuous_integration/install_old.sh b/continuous_integration/install_old.sh deleted file mode 100755 index d0e8402f..00000000 --- a/continuous_integration/install_old.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/bash - -set -e - -UNAMESTR=`uname` - -if [[ "$CC_OUTER_LOOP" == "clang-10" || "$CC_INNER_LOOP" == "clang-10" ]]; then - # Assume Ubuntu: install a recent version of clang and libomp - wget https://apt.llvm.org/llvm.sh - chmod +x llvm.sh - sudo ./llvm.sh 10 - sudo apt-get install libomp-dev -fi - -make_conda() { - TO_INSTALL="$@" - if [[ "$UNAMESTR" == "Darwin" ]]; then - if [[ "$INSTALL_LIBOMP" == "conda-forge" ]]; then - # Install an OpenMP-enabled clang/llvm from conda-forge - # assumes conda-forge is set on priority channel - TO_INSTALL="$TO_INSTALL compilers llvm-openmp" - - export CFLAGS="$CFLAGS -I$CONDA/envs/$VIRTUALENV/include" - export LDFLAGS="$LDFLAGS -Wl,-rpath,$CONDA/envs/$VIRTUALENV/lib -L$CONDA/envs/$VIRTUALENV/lib" - - elif [[ "$INSTALL_LIBOMP" == "homebrew" ]]; then - # Install a compiler with a working openmp - HOMEBREW_NO_AUTO_UPDATE=1 brew install libomp - - # enable OpenMP support for Apple-clang - export CC=/usr/bin/clang - export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp" - export CFLAGS="$CFLAGS -I/usr/local/opt/libomp/include" - export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/local/opt/libomp/lib -L/usr/local/opt/libomp/lib -lomp" - fi - fi - conda update -n base conda conda-libmamba-solver -q --yes - conda config --set solver libmamba - conda create -n $VIRTUALENV -q --yes $TO_INSTALL - source activate $VIRTUALENV -} - -if [[ "$PACKAGER" == "conda" ]]; then - TO_INSTALL="python=$PYTHON_VERSION pip" - if [[ "$NO_NUMPY" != "true" ]]; then - TO_INSTALL="$TO_INSTALL numpy scipy blas[build=$BLAS]" - fi - make_conda $TO_INSTALL - -elif [[ "$PACKAGER" == "conda-forge" ]]; then - conda config --prepend channels conda-forge - conda config --set channel_priority strict - TO_INSTALL="python=$PYTHON_VERSION numpy scipy blas[build=$BLAS]" - if [[ "$BLAS" == "openblas" && "$OPENBLAS_THREADING_LAYER" == "openmp" ]]; then - TO_INSTALL="$TO_INSTALL libopenblas=*=*openmp*" - fi - make_conda $TO_INSTALL - -elif [[ "$PACKAGER" == "pip" ]]; then - # Use conda to build an empty python env and then use pip to install - # numpy and scipy - TO_INSTALL="python=$PYTHON_VERSION pip" - make_conda $TO_INSTALL - if [[ "$NO_NUMPY" != "true" ]]; then - pip install numpy scipy - fi - -elif [[ "$PACKAGER" == "pip-dev" ]]; then - # Use conda to build an empty python env and then use pip to install - # numpy and scipy dev versions - TO_INSTALL="python=$PYTHON_VERSION pip" - make_conda $TO_INSTALL - - dev_anaconda_url=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple - pip install --pre --upgrade --timeout=60 --extra-index $dev_anaconda_url numpy scipy - -elif [[ "$PACKAGER" == "ubuntu" ]]; then - # Remove the ubuntu toolchain PPA that seems to be invalid: - # https://github.com/scikit-learn/scikit-learn/pull/13934 - sudo add-apt-repository --remove ppa:ubuntu-toolchain-r/test - sudo apt-get update - sudo apt-get install python3-scipy python3-virtualenv $APT_BLAS - python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV - source $VIRTUALENV/bin/activate -fi - - -python -m pip install -q -r dev-requirements.txt -bash ./continuous_integration/build_test_ext.sh - -python --version -python -c "import numpy; print(f'numpy {numpy.__version__}')" || echo "no numpy" -python -c "import scipy; print(f'scipy {scipy.__version__}')" || echo "no scipy" - -python -m flit install --symlink diff --git a/continuous_integration/install_with_blis.sh b/continuous_integration/install_with_blis.sh deleted file mode 100755 index 06dfc897..00000000 --- a/continuous_integration/install_with_blis.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash - -set -e - -pushd .. -ABS_PATH=$(pwd) -popd - -# Install a recent version of clang and libomp -wget https://apt.llvm.org/llvm.sh -chmod +x llvm.sh -sudo ./llvm.sh 17 -sudo apt-get install libomp-dev - -# create conda env -conda update -n base conda conda-libmamba-solver -q --yes -conda config --set solver libmamba -conda create -n $VIRTUALENV -q --yes -c conda-forge python=$PYTHON_VERSION \ - pip cython meson-python pkg-config -source activate $VIRTUALENV - -if [[ "$BLIS_CC" == "gcc-8" ]]; then - sudo apt install gcc-8 -fi - -pushd .. - -# build & install blis -mkdir BLIS_install -git clone https://github.com/flame/blis.git -pushd blis - -./configure --prefix=$ABS_PATH/BLIS_install --enable-cblas --enable-threading=$BLIS_ENABLE_THREADING CC=$BLIS_CC auto -make -j4 -make install -popd - -# build & install numpy -git clone https://github.com/numpy/numpy.git -pushd numpy -git submodule update --init - -echo "libdir=$ABS_PATH/BLIS_install/lib/ -includedir=$ABS_PATH/BLIS_install/include/blis/ -version=latest -extralib=-lm -lpthread -lgfortran -Name: blis -Description: BLIS -Version: \${version} -Libs: -L\${libdir} -lblis -Libs.private: \${extralib} -Cflags: -I\${includedir}" > blis.pc - -PKG_CONFIG_PATH=$ABS_PATH/numpy/ pip install . -v --no-build-isolation -Csetup-args=-Dblas=blis -popd - -popd - -python -m pip install -q -r dev-requirements.txt -CFLAGS=-I$ABS_PATH/BLIS_install/include/blis \ - LDFLAGS="-L$ABS_PATH/BLIS_install/lib -Wl,-rpath,$ABS_PATH/BLIS_install/lib" \ - bash ./continuous_integration/build_test_ext.sh - -# Check that BLIS is linked -ldd tests/_openmp_test_helper/nested_prange_blas.cpython*.so - -python --version -python -c "import numpy; print(f'numpy {numpy.__version__}')" || echo "no numpy" -python -c "import scipy; print(f'scipy {scipy.__version__}')" || echo "no scipy" - -python -m flit install --symlink diff --git a/continuous_integration/install_with_flexiblas.sh b/continuous_integration/install_with_flexiblas.sh deleted file mode 100755 index 59eec612..00000000 --- a/continuous_integration/install_with_flexiblas.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash - -set -e - -pushd .. -ABS_PATH=$(pwd) -popd - -# create conda env -conda update -n base conda conda-libmamba-solver -q --yes -conda config --set solver libmamba -conda create -n $VIRTUALENV -q --yes -c conda-forge python=$PYTHON_VERSION \ - pip cython openblas $PLATFORM_SPECIFIC_PACKAGES meson-python pkg-config compilers -source activate $VIRTUALENV - -pushd .. - -# build & install FlexiBLAS -mkdir flexiblas_install -git clone https://github.com/mpimd-csc/flexiblas.git -pushd flexiblas - -# Temporary ping Flexiblas commit to avoid openmp symbols not found at link time -git checkout v3.4.2 - -mkdir build -pushd build - -EXTENSION=".so" -if [[ $(uname) == "Darwin" ]]; then - EXTENSION=".dylib" -fi - -# We intentionally restrict the list of backends to make it easier to -# write platform agnostic tests. In particular, we do not detect OS -# provided backends such as macOS' Apple/Accelerate/vecLib nor plaftorm -# specific BLAS implementations such as MKL that cannot be installed on -# arm64 hardware. -cmake ../ -DCMAKE_INSTALL_PREFIX=$ABS_PATH"/flexiblas_install" \ - -DBLAS_AUTO_DETECT="OFF" \ - -DEXTRA="OPENBLAS_CONDA" \ - -DFLEXIBLAS_DEFAULT="OPENBLAS_CONDA" \ - -DOPENBLAS_CONDA_LIBRARY=$CONDA_PREFIX"/lib/libopenblas"$EXTENSION \ -make -make install - -# Check that all 3 BLAS are listed in FlexiBLAS configuration -$ABS_PATH/flexiblas_install/bin/flexiblas list -popd -popd - -# build & install numpy -git clone https://github.com/numpy/numpy.git -pushd numpy -git submodule update --init - -echo "libdir=$ABS_PATH/flexiblas_install/lib/ -includedir=$ABS_PATH/flexiblas_install/include/flexiblas/ -version=3.3.1 -extralib=-lm -lpthread -lgfortran -Name: flexiblas -Description: FlexiBLAS - a BLAS wrapper -Version: \${version} -Libs: -L\${libdir} -lflexiblas -Libs.private: \${extralib} -Cflags: -I\${includedir}" > flexiblas.pc - -PKG_CONFIG_PATH=$ABS_PATH/numpy/ pip install . -v --no-build-isolation -Csetup-args=-Dblas=flexiblas -Csetup-args=-Dlapack=flexiblas -popd - -popd - -python -m pip install -q -r dev-requirements.txt -CFLAGS=-I$ABS_PATH/flexiblas_install/include/flexiblas \ - LDFLAGS="-L$ABS_PATH/flexiblas_install/lib -Wl,-rpath,$ABS_PATH/flexiblas_install/lib" \ - bash ./continuous_integration/build_test_ext.sh - -# Check that FlexiBLAS is linked -if [[ $(uname) != "Darwin" ]]; then - ldd tests/_openmp_test_helper/nested_prange_blas.cpython*.so -fi - -python --version -python -c "import numpy; print(f'numpy {numpy.__version__}')" || echo "no numpy" -python -c "import scipy; print(f'scipy {scipy.__version__}')" || echo "no scipy" - -python -m flit install --symlink diff --git a/continuous_integration/posix.yml b/continuous_integration/posix.yml deleted file mode 100644 index a1598d37..00000000 --- a/continuous_integration/posix.yml +++ /dev/null @@ -1,48 +0,0 @@ -parameters: - name: '' - vmImage: '' - matrix: [] - -jobs: -- job: ${{ parameters.name }} - pool: - vmImage: ${{ parameters.vmImage }} - strategy: - matrix: - ${{ insert }}: ${{ parameters.matrix }} - - steps: - - bash: echo "##vso[task.prependpath]$CONDA/bin" - displayName: Add conda to PATH - condition: or(startsWith(variables['PACKAGER'], 'conda'), startsWith(variables['PACKAGER'], 'pip')) - - bash: sudo chown -R $USER $CONDA - # On Hosted macOS, the agent user doesn't have ownership of Miniconda's installation directory/ - # We need to take ownership if we want to update conda or install packages globally - displayName: Take ownership of conda installation - condition: eq('${{ parameters.name }}', 'macOS') - - script: | - continuous_integration/install.sh - displayName: 'Install without custom BLAS' - condition: eq(variables['INSTALL_BLAS'], '') - - script: | - continuous_integration/install_with_blis.sh - displayName: 'Install with BLIS' - condition: eq(variables['INSTALL_BLAS'], 'blis') - - script: | - continuous_integration/install_with_flexiblas.sh - displayName: 'Install with FlexiBLAS' - condition: eq(variables['INSTALL_BLAS'], 'flexiblas') - - script: | - continuous_integration/test_script.sh - displayName: 'Test Library' - - task: PublishTestResults@2 - inputs: - testResultsFiles: '$(JUNITXML)' - testRunTitle: ${{ format('{0}-$(Agent.JobName)', parameters.name) }} - displayName: 'Publish Test Results' - condition: succeededOrFailed() - - publish: $(JUNITXML) - - script: | - bash continuous_integration/upload_codecov.sh - displayName: 'Upload to codecov' - condition: succeeded() diff --git a/continuous_integration/test_script.cmd b/continuous_integration/test_script.cmd deleted file mode 100644 index 4da20228..00000000 --- a/continuous_integration/test_script.cmd +++ /dev/null @@ -1,10 +0,0 @@ -call activate %VIRTUALENV% - -# Display version information -python -m pip list - -# Use the CLI to display the effective runtime environment prior to -# launching the tests: -python -m threadpoolctl -i numpy scipy.linalg tests._openmp_test_helper.openmp_helpers_inner - -pytest -vlrxXs --junitxml=%JUNITXML% --cov=threadpoolctl diff --git a/continuous_integration/upload_codecov.sh b/continuous_integration/upload_codecov.sh deleted file mode 100755 index 1fb312c0..00000000 --- a/continuous_integration/upload_codecov.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -set -e - -if [[ "$PACKAGER" == "conda" ]]; then - source activate $VIRTUALENV -elif [[ "$PACKAGER" == "pip" ]]; then - source activate $VIRTUALENV -elif [[ "$PACKAGER" == "ubuntu" ]]; then - source $VIRTUALENV/bin/activate -fi - -pip install codecov - -codecov || echo "codecov upload failed" diff --git a/continuous_integration/windows.yml b/continuous_integration/windows.yml deleted file mode 100644 index 7d6e53da..00000000 --- a/continuous_integration/windows.yml +++ /dev/null @@ -1,35 +0,0 @@ - -parameters: - name: '' - vmImage: '' - matrix: [] - -jobs: -- job: ${{ parameters.name }} - pool: - vmImage: ${{ parameters.vmImage }} - - strategy: - matrix: - ${{ insert }}: ${{ parameters.matrix }} - - steps: - - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" - displayName: Add conda to PATH - - script: | - continuous_integration\\install.cmd - displayName: 'Install' - - script: | - continuous_integration\\test_script.cmd - displayName: 'Test threadpoolctl' - - task: PublishTestResults@2 - inputs: - testResultsFiles: '$(JUNITXML)' - testRunTitle: ${{ format('{0}-$(Agent.JobName)', parameters.name) }} - displayName: 'Publish Test Results' - condition: succeededOrFailed() - - publish: $(JUNITXML) - - script: | - bash continuous_integration\\upload_codecov.sh - displayName: 'Upload to codecov' - condition: succeeded() diff --git a/dev-requirements.txt b/dev-requirements.txt index d118f1e7..04901b66 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -3,3 +3,4 @@ coverage pytest pytest-cov cython +setuptools From 69099285fa94ece8f05d4e9c9d7097e8870cb9f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20du=20Boisberranger?= Date: Sun, 9 Mar 2025 15:08:36 +0100 Subject: [PATCH 92/92] iter --- continuous_integration/run_tests.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/continuous_integration/run_tests.sh b/continuous_integration/run_tests.sh index b7ea425b..f26f0fdc 100755 --- a/continuous_integration/run_tests.sh +++ b/continuous_integration/run_tests.sh @@ -14,11 +14,8 @@ elif [[ "$PACKAGER" == "ubuntu" ]]; then pip list fi -export MKL_THREADING_LAYER=INTEL - - # Use the CLI to display the effective runtime environment prior to # launching the tests: -python -m threadpoolctl -i numpy scipy.linalg #tests._openmp_test_helper.openmp_helpers_inner +python -m threadpoolctl -i numpy scipy.linalg tests._openmp_test_helper.openmp_helpers_inner pytest -vlrxXs -W error -k "$TESTS" --junitxml=test_result.xml --cov=threadpoolctl --cov-report xml