Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f2b18f2
CI: add CI jobs for different BLAS configs
rgommers Dec 28, 2023
30b473a
DEBUG: run BLAS jobs on fork
rgommers Dec 28, 2023
cd447e3
ENH: use Meson's BLAS and LAPACK support
rgommers Feb 23, 2025
bd8bc0c
Squash several commits to simplify rebasing
rgommers Dec 28, 2023
6e8e756
WIP: ENH: enable ILP64 BLAS/LAPACK support again
rgommers Jan 1, 2024
b4b7cb5
Squash several commits to simplify rebasing
rgommers Jan 1, 2024
2d90949
BLD: linalg, sparse/linalg: link with g77_abi_wrappers
ev-br Mar 22, 2025
986e29a
BLD: interpolate: build FITPACK with 32- or 64-bit ints
ev-br Mar 11, 2025
0fc215c
MAINT: interpolate: link the __fitpack C extension to 64-bit LAPACK
ev-br Mar 26, 2025
0d34ecd
BUG: spatial: Qhull does not need linking to LAPACK
ev-br Mar 13, 2025
4bfc3a5
TST: linalg: bump test tolerances
ev-br Mar 13, 2025
3f9548b
ENH: integrate: make lsoda.pyf and vode.pyf int64-aware
ev-br Mar 13, 2025
ffdd57d
BLD: integrate: add int64 flags to ODE wrappers (lsoda, dop, vode, zv…
ev-br Mar 13, 2025
4f00890
BLD: sparse/arpack: add an int64 flag
ev-br Mar 13, 2025
043a40e
BLD: special: link to LP64-bit LAPACK, use cython_special in ellip_harm
ev-br Mar 16, 2025
8b60d82
MAINT: special: no need to link to LAPACK explicitly with cython_lapack
ev-br Mar 16, 2025
a1e5a44
BLD: optimize: link lbfgsb to 32-bit LP64 LAPACK
ev-br Mar 26, 2025
7d70b4e
TEMP: debug print in generate_f2pymod
ev-br Mar 22, 2025
a29dc67
BLD: fix up MKL ILP64 detection
ev-br Mar 22, 2025
48a011e
CI: separate the MKL ILP64 job
rgommers Mar 26, 2025
6011499
CI: tweak the ILP64 job
ev-br Mar 26, 2025
20e49f0
TEMP: run CI on the fork
ev-br Mar 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
282 changes: 282 additions & 0 deletions .github/workflows/linux_blas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
name: BLAS tests (Linux)

# This file is meant for testing different BLAS/LAPACK flavors and build
# options on Linux. All other yml files for Linux will only test without BLAS
# (mostly because that's easier and faster to build) or with the same 64-bit
# OpenBLAS build that is used in the wheel jobs.
#
# Jobs and their purpose:
#
# - openblas32_stable_nightly:
# Uses the 32-bit OpenBLAS builds, both the latest stable release
# and a nightly build.
# - openblas_no_pkgconfig_fedora:
# Test OpenBLAS on Fedora. Fedora doesn't ship .pc files for OpenBLAS,
# hence this exercises the "system dependency" detection method.
# - flexiblas_fedora:
# Tests FlexiBLAS (the default on Fedora for its own packages), via
# pkg-config. FlexiBLAS allows runtime switching of BLAS/LAPACK
# libraries, which is a useful capability (not tested in this job).
# - openblas_cmake:
# Tests whether OpenBLAS LP64 is detected correctly when only CMake
# and not pkg-config is installed.
# - netlib-debian:
# Installs libblas/liblapack, which in Debian contains libcblas within
# libblas.
# - netlib-split:
# Installs vanilla Netlib blas/lapack with separate libcblas, which is
# the last option tried in auto-detection.
# - mkl:
# Tests MKL installed from PyPI (because easiest/fastest, if broken) in
# 3 ways: both LP64 and ILP64 via pkg-config, and then using the
# Single Dynamic Library (SDL, or `libmkl_rt`).
# - blis:
# Simple test for LP64 via pkg-config
# - atlas:
# Simple test for LP64 via pkg-config

on:
pull_request:
branches:
- main
- maintenance/**
push:
branches:
- ci-blas

defaults:
run:
shell: bash

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

jobs:
# openblas32_stable_nightly: (see linux_meson.yml for scipy-openblas32 test job)
# atlas: (see linux_meson.yml for ATLAS test job)
# accelerate: (see macos_meson.yml)

openblas_no_pkgconfig_fedora:
#if: "github.repository == 'rgommers/scipy'"
if: false # WORKS
runs-on: ubuntu-latest
container: fedora:39
name: "OpenBLAS (Fedora, no pkg-config)" # openblas.pc not shipped by Fedora
steps:
- name: Install system dependencies
run: |
dnf install git gcc-gfortran g++ python3-devel openblas-devel -y

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
fetch-depth: 0

- name: Install dependencies from PyPI
run: |
pip install -r requirements/build.txt
pip install build
pip install git+https://github.com/numpy/meson.git@main-numpymeson

- name: Build
run: |
python3 -m build -wnx -Cbuild-dir=build
python3 -m pip install dist/scipy*.whl

- name: Test
run: |
pip install -r requirements/test.txt
cd tools
pytest --pyargs scipy -n2 -m "not slow"

flexiblas_fedora:
#if: "github.repository == 'rgommers/scipy'"
if: false # WORKS
runs-on: ubuntu-latest
container: fedora:39
name: "FlexiBLAS Fedora" # flexiblas.pc is shipped by Fedora
steps:
- name: Install system dependencies
run: |
dnf install git gcc-gfortran g++ python3-devel flexiblas-devel -y

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
fetch-depth: 0

- name: Install dependencies from PyPI
run: |
pip install -r requirements/build.txt
pip install build
pip install git+https://github.com/numpy/meson.git@main-numpymeson

- name: Build
run: |
python3 -m build -wnx -Cbuild-dir=build
python3 -m pip install dist/scipy*.whl

- name: Test
run: |
pip install -r requirements/test.txt
cd tools
pytest --pyargs scipy -n2 -m "not slow"


netlib-debian:
#if: "github.repository == 'rgommers/scipy'"
if: false # WORKS
runs-on: ubuntu-latest
name: "Debian libblas/liblapack"
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.11'

- name: Install dependencies
run: |
pip install -r requirements/all.txt
pip install git+https://github.com/numpy/meson.git@main-numpymeson
sudo apt-get install liblapack-dev pkg-config

- name: Build
run: |
python dev.py build

- name: Test
run: |
python dev.py test -j2


netlib-split:
#if: "github.repository == 'rgommers/scipy'"
if: false # WORKS
runs-on: ubuntu-latest
container: opensuse/tumbleweed
name: "OpenSUSE Netlib BLAS/LAPACK"
steps:
- name: Install system dependencies
run: |
# No blas.pc on OpenSUSE as of Nov 2023, so no need to install pkg-config.
# If it is needed in the future, use install name `pkgconf-pkg-config`
zypper install -y git gcc-c++ gcc-fortran python3-pip python311 python3-devel blas cblas lapack

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
fetch-depth: 0

- name: Install PyPI dependencies
run: |
pip install --break-system-packages -r requirements/build.txt
pip install --break-system-packages git+https://github.com/numpy/meson.git@main-numpymeson

- name: Build
run: |
pip install . --break-system-packages --no-build-isolation -v -Csetup-args=-Dblas=blas -Csetup-args=-Dlapack=lapack

- name: Test
run: |
pip install --break-system-packages pytest hypothesis pytest-xdist threadpoolctl pooch
cd tools
pytest --pyargs scipy -n2 -m "not slow"


mkl:
if: "github.repository == 'rgommers/scipy'"
runs-on: ubuntu-latest
name: "MKL (LP64 split, SDL)"
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.11'

- name: Install dependencies
run: |
pip install -r requirements/all.txt
pip install git+https://github.com/numpy/meson.git@main-numpymeson
pip install "mkl==2023.2.0" "mkl-devel==2023.2.0"

- name: Repair MKL pkg-config files and symlinks
run: |
# MKL 2023.2 works when installed from conda-forge (except for `-iomp`
# and `-tbb` pkg-config files), Spack, or with the standalone Intel
# installer. The standalone installer is the worst option, since it's
# large and clumsy to install and requires running a setvars.sh script
# before things work. The PyPI MKL packages are broken and need the
# fixes in this step. For details, see
# https://github.com/conda-forge/intel_repack-feedstock/issues/34
cd $Python3_ROOT_DIR/lib/pkgconfig
sed -i 's/\/intel64//g' mkl*.pc
# add the expected .so -> .so.2 symlinks to fix linking
cd ..
for i in $( ls libmkl*.so.2 ); do ln -s $i ${i%.*}; done

- name: Build with defaults (LP64)
run: |
pkg-config --libs mkl-dynamic-lp64-seq # check link flags
python dev.py build

- name: Test
run: python dev.py test

- name: Build without pkg-config (default options, SDL)
run: |
git clean -xdf > /dev/null
pushd $Python3_ROOT_DIR/lib/pkgconfig
rm mkl*.pc
popd
export MKLROOT=$Python3_ROOT_DIR
python dev.py build

- name: Test
run: python dev.py test


blis:
#if: "github.repository == 'rgommers/scipy'"
if: false # WORKS
runs-on: ubuntu-latest
name: "BLIS"
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.11'

- name: Install dependencies
run: |
pip install -r requirements/all.txt
pip install git+https://github.com/numpy/meson.git@main-numpymeson
sudo apt-get install libblis-dev libopenblas-dev pkg-config

- name: Add BLIS pkg-config file
run: |
# Needed because blis.pc missing in Debian:
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=989076
# The alternative here would be to use another distro or Miniforge
sudo cp ci/_blis_debian.pc /usr/lib/x86_64-linux-gnu/pkgconfig/blis.pc
# Check if the patch works:
pkg-config --libs blis
pkg-config --cflags blis

- name: Build
run: python dev.py build -C-Dblas=blis

- name: Test
run: python dev.py test
108 changes: 108 additions & 0 deletions .github/workflows/linux_mkl_ilp64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: BLAS tests (Linux)

# This file is meant for testing different BLAS/LAPACK flavors and build
# options on Linux. All other yml files for Linux will only test without BLAS
# (mostly because that's easier and faster to build) or with the same 64-bit
# OpenBLAS build that is used in the wheel jobs.
#
# Jobs and their purpose:
#
# - mkl:
# Tests MKL installed from PyPI (because easiest/fastest, if broken) in
# 3 ways: both LP64 and ILP64 via pkg-config, and then using the
# Single Dynamic Library (SDL, or `libmkl_rt`).


on:
pull_request:
branches:
- main
- maintenance/**

defaults:
run:
shell: bash

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read # to fetch code (actions/checkout)

jobs:

mkl-lp64:
if: "github.repository == 'ev-br/scipy'"
runs-on: ubuntu-latest
name: "MKL (LP64 split, SDL)"
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.11'

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gfortran
pip install cython numpy pybind11 pythran pytest hypothesis pytest-xdist pooch
pip install -r requirements/dev.txt
pip install git+https://github.com/numpy/meson.git@main-numpymeson
pip install mkl mkl-devel

- name: Build with defaults (LP64)
run: |
pkg-config --libs mkl-dynamic-lp64-seq # check link flags
python dev.py build

- name: Test
run: python dev.py test

- name: Build without pkg-config (default options, SDL)
run: |
git clean -xdf > /dev/null
pushd $Python3_ROOT_DIR/lib/pkgconfig
rm mkl*.pc
popd
export MKLROOT=$Python3_ROOT_DIR
python dev.py build

- name: Test
run: python dev.py test -j 2


mkl-ilp64:
if: "github.repository == 'ev-br/scipy'"
runs-on: ubuntu-latest
name: "MKL ILP64"
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.11'

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gfortran
pip install cython numpy pybind11 pythran pytest hypothesis pytest-xdist pooch
pip install -r requirements/dev.txt
pip install git+https://github.com/numpy/meson.git@main-numpymeson
pip install mkl mkl-devel

- name: Build with ILP64
run: |
pkg-config --libs mkl-dynamic-ilp64-seq # check link flags
python dev.py build -C-Dblas-order=mkl -C-Duse-ilp64=true

- name: Test
run: python dev.py test -j 2


Loading
Loading