Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
a448bdd
Trying to download libkrylov
cvanaret May 27, 2026
9d1d0f8
Fixed archive extension
cvanaret May 27, 2026
dc90a40
Use unzip on Windows
cvanaret May 27, 2026
52c647e
Fix
cvanaret May 27, 2026
2014ecb
Fix
cvanaret May 27, 2026
1e738b2
Install MSYS2 unzip (Windows)
cvanaret May 27, 2026
be2f7b3
Install unzip in CIBW_BEFORE_BUILD_WINDOWS
cvanaret May 27, 2026
1a95417
Fixed delvewheel
cvanaret May 27, 2026
e10b204
Trying to fix the cibuildwheel workflow
cvanaret May 27, 2026
c9f95cc
Fixed syntax
cvanaret May 27, 2026
56f7fbd
Do not download libkrylov on Windows
cvanaret May 27, 2026
33f4e42
Fix
cvanaret May 27, 2026
65ff1a7
Reset wheel workflow
cvanaret May 27, 2026
058b364
Added a functional test for libkrylov based on Alexis' example
cvanaret May 27, 2026
475bca9
Removed ASAN/UBSAN from standard unit tests + added unit test workflo…
cvanaret May 27, 2026
20401f2
Linked Krylov on Windows
cvanaret May 27, 2026
c44f4ff
Include krylov.h header with <>
cvanaret May 27, 2026
3af1a61
Added CMake variable KRYLOV_INCLUDE_DIR
cvanaret May 27, 2026
82a138a
Unzip libkrylov.zip you moron!
cvanaret May 27, 2026
6fc95c4
Set PATH (Windows)
cvanaret May 27, 2026
c565613
Bumped libkrylov version
cvanaret Jun 3, 2026
c4b25da
Install unzip (Windows)
cvanaret Jun 3, 2026
3afa525
Fixed Install unzip (Windows)
cvanaret Jun 3, 2026
52a7ea4
Linked libkrylov in wheels workflow
cvanaret Jun 3, 2026
c6ebe42
Added LD_LIBRARY_PATH for Linux build
cvanaret Jun 3, 2026
2409fb7
Updated manylinux version
cvanaret Jun 3, 2026
e027228
Update manylinux version for aarch64 + require Python >=3.9
cvanaret Jun 3, 2026
92f9e07
Bumped Krylov.jl version
cvanaret Jun 3, 2026
81cb9db
Updated CIBW_MANYLINUX_X86_64_IMAGE and CIBW_MANYLINUX_AARCH64_IMAGE
cvanaret Jun 3, 2026
c682eb5
Bumped libkrylov version
cvanaret Jun 3, 2026
31c8066
Set AUDITWHEEL_PLAT and test Linux wheels separately
cvanaret Jun 4, 2026
691552c
Added CIBW_REPAIR_WHEEL_COMMAND_MACOS
cvanaret Jun 4, 2026
c07857a
Updated CMakeLists + fixed CIBW_ENVIRONMENT_WINDOWS
cvanaret Jun 4, 2026
cc78f2a
Dropped DYLD_LIBRARY_PATH
cvanaret Jun 4, 2026
54952dd
Added target_link_options(unopy PRIVATE -static-libgcc -static-libstd…
cvanaret Jun 4, 2026
c32f081
Fixes for macOS
cvanaret Jun 4, 2026
eb5be43
Fixed CMake for macOS
cvanaret Jun 4, 2026
b0eb4f6
Resumed target_link_options(unopy PRIVATE -static-libgcc -static-libs…
cvanaret Jun 4, 2026
0716e6d
Diagnose Windows DLL (temporary)
cvanaret Jun 4, 2026
d363dd4
Force Store artifacts
cvanaret Jun 4, 2026
94ac5cd
Fix
cvanaret Jun 4, 2026
0a46780
Find and inspect wheel (temporary)
cvanaret Jun 4, 2026
f533426
Fixed Inspect + test wheel (Windows)
cvanaret Jun 4, 2026
d656763
Fixed selector + Inspect wheel (Windows)
cvanaret Jun 4, 2026
bbadb39
Inspect wheel layout (Windows)
cvanaret Jun 4, 2026
7831e12
Updated CMake and __init__.py
cvanaret Jun 4, 2026
a56dd44
Install matching MinGW (GCC 14.2.0 posix-seh-msvcrt)
cvanaret Jun 4, 2026
2ea0556
Fix
cvanaret Jun 4, 2026
ed7e164
Fixed CMake
cvanaret Jun 4, 2026
c1724e4
Test wheel (Windows)
cvanaret Jun 4, 2026
7d0913a
Added test_libkrylov() in unopy
cvanaret Jun 4, 2026
ff103bb
Added test file for wheels
cvanaret Jun 4, 2026
d628834
Improved print in test_krylov_solvers()
cvanaret Jun 4, 2026
d2cd2fd
Fixed test-linux-wheels
cvanaret Jun 4, 2026
e516357
Install numpy
cvanaret Jun 4, 2026
1aa2429
Linked libkrylov to Fortran tests + builds
cvanaret Jun 4, 2026
d301537
Forgot -lkrylov in gfortran command
cvanaret Jun 4, 2026
c51ee33
Linked libkrylov to Intel build
cvanaret Jun 8, 2026
7c94481
Upgrade the interface for Krylov.jl
amontoison Jun 28, 2026
7bde418
Fixed unit tests with ASAN/UBSAN
cvanaret Jun 28, 2026
d339a26
Fixed HIGHS_INCLUDE_DIR in new workflow unit-tests-asan-ubsan.yml
cvanaret Jul 6, 2026
9a9db8c
Added missing libhighs_extras in HIGHS CMake variable
cvanaret Jul 6, 2026
39e8540
Use C:/mingw1420/mingw64 everywhere
cvanaret Jul 6, 2026
c6f102e
Debug info in tests
cvanaret Jul 6, 2026
a307114
Fixed CIBW_REPAIR_WHEEL_COMMAND_WINDOWS, skipped Windows tests, test …
cvanaret Jul 6, 2026
f71ab1a
Fixed CIBW_REPAIR_WHEEL_COMMAND_WINDOWS syntax
cvanaret Jul 6, 2026
a41e8b3
Fixed syntax
cvanaret Jul 6, 2026
62426c3
Throw exceptions instead of using asserts in KrylovSolvers.hpp
cvanaret Jul 6, 2026
b75fe26
Only build cp3.11 Windows wheel
cvanaret Jul 6, 2026
31137db
Added CIBW_BUILD
cvanaret Jul 6, 2026
d6899db
Test if stale wheel
cvanaret Jul 6, 2026
c42e913
Fix
cvanaret Jul 6, 2026
ba90567
Moved test_krylov_solvers definition to cpp file
cvanaret Jul 6, 2026
cd9c8ab
More checks
cvanaret Jul 6, 2026
d0d8f96
More guards on KrylovSolvers
cvanaret Jul 6, 2026
015d0ff
RelWithDebInfo build
cvanaret Jul 6, 2026
0593662
Run gdb
cvanaret Jul 6, 2026
093ab78
Fix
cvanaret Jul 6, 2026
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
4 changes: 3 additions & 1 deletion .github/workflows/Fortran-tests-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ jobs:
-DMUMPS_INCLUDE_DIR=${{github.workspace}}/dependencies/include \
-DMETIS_INCLUDE_DIR=${{github.workspace}}/dependencies/include \
-DHIGHS_INCLUDE_DIR=${{github.workspace}}/dependencies/include/highs \
-DKRYLOV_INCLUDE_DIR=${{github.workspace}}/dependencies/include \
-DBQPD=${{github.workspace}}/dependencies/lib/libbqpd.a \
-DMUMPS_LIBRARY=${{github.workspace}}/dependencies/lib/libdmumps.a \
-DMUMPS_COMMON_LIBRARY=${{github.workspace}}/dependencies/lib/libmumps_common.a \
-DMUMPS_PORD_LIBRARY=${{github.workspace}}/dependencies/lib/libpord.a \
-DMUMPS_MPISEQ_LIBRARY=${{github.workspace}}/dependencies/lib/libmpiseq.a \
-DHIGHS="${{github.workspace}}/dependencies/lib/libhighs.a;${{github.workspace}}/dependencies/lib/libhighs_extras.a" \
-DMETIS_LIBRARY=${{github.workspace}}/dependencies/lib/libmetis.a \
-DKRYLOV=${{github.workspace}}/dependencies/lib/libkrylov.so \
-DBLAS_LIBRARIES="${{github.workspace}}/dependencies/lib/libblas.a;${{github.workspace}}/dependencies/lib/libcblas.a" \
-DLAPACK_LIBRARIES=${{github.workspace}}/dependencies/lib/liblapack.a \
-DBUILD_STATIC_LIBS=ON \
Expand All @@ -62,7 +64,7 @@ jobs:

- name: Compile Fortran tests
working-directory: ${{github.workspace}}/interfaces/Fortran
run: gfortran example_uno.f90 -o example_uno -L../../build -luno -L${{github.workspace}}/dependencies/lib -lhighs -lhighs_extras -ldmumps -lmumps_common -lmpiseq -lpord -lmetis -lbqpd -llapack -lcblas -lblas -lstdc++
run: gfortran example_uno.f90 -o example_uno -L../../build -luno -L${{github.workspace}}/dependencies/lib -lhighs -lhighs_extras -ldmumps -lmumps_common -lmpiseq -lpord -lmetis -lbqpd -lkrylov -llapack -lcblas -lblas -lstdc++

- name: Run Fortran tests
working-directory: ${{github.workspace}}/interfaces/Fortran
Expand Down
145 changes: 131 additions & 14 deletions .github/workflows/build-python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ concurrency:
cancel-in-progress: true

env:
CIBW_TEST_COMMAND: python {project}/interfaces/Python/example/example_hs015.py
CIBW_TEST_COMMAND: >
python -X faulthandler {project}/interfaces/Python/tests/run_wheel_tests.py
CIBW_TEST_REQUIRES: numpy

jobs:
build_wheels:
Expand All @@ -40,7 +42,7 @@ jobs:
- { os: ubuntu-22.04-arm, shell: bash, build: "*manylinux*" }
- { os: macos-15, shell: bash, build: "*" }
- { os: macos-15-intel, shell: bash, build: "*" }
- { os: windows-latest, shell: 'msys2 {0}', build: "*" }
- { os: windows-latest, shell: 'msys2 {0}', build: "cp311-*" }
defaults:
run:
shell: ${{ matrix.sys.shell }}
Expand All @@ -52,6 +54,11 @@ jobs:
with:
python-version: "3.11"

- name: Install unzip (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: C:/msys64/usr/bin/bash -lc "pacman -Sy --noconfirm --needed unzip"

- run: pip install cibuildwheel
if: runner.os != 'Windows'

Expand All @@ -72,17 +79,41 @@ jobs:
echo "LIBGFORTRAN_FOLDER=$LIBGFORTRAN_FOLDER" >> $GITHUB_ENV
echo "OPENMP_LIB=$(brew --prefix libomp)/lib/libomp.dylib" >> $GITHUB_ENV

- name: Install matching MinGW (GCC 14.2.0 posix-seh-msvcrt)
if: runner.os == 'Windows'
shell: pwsh
run: |
$url = "https://github.com/niXman/mingw-builds-binaries/releases/download/14.2.0-rt_v12-rev0/x86_64-14.2.0-release-posix-seh-msvcrt-rt_v12-rev0.7z"
Invoke-WebRequest $url -OutFile mingw.7z
7z x mingw.7z -oC:\mingw1420 -y # clean dir, NOT C:\mingw64
# the archive contains a top-level mingw64\ folder, so the compiler ends up at:
C:\mingw1420\mingw64\bin\gcc --version
C:\mingw1420\mingw64\bin\g++ --version

- name: Put 14.2 toolchain first on PATH (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: echo "C:\mingw1420\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Append

- name: Build wheels (Linux)
if: runner.os == 'Linux'
run: cibuildwheel --output-dir ${{github.workspace}}/wheelhouse
env:
CIBW_BUILD: ${{ matrix.sys.build }}
CIBW_SKIP: cp*-*_i686 *-win32
CIBW_ENVIRONMENT_LINUX:
CIBW_SKIP: cp38-* *_i686 *-win32
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_34
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_34
CIBW_ENVIRONMENT_LINUX: >
CMAKE_GENERATOR=Ninja
CMAKE_BUILD_PARALLEL_LEVEL=$(nproc)
LD_LIBRARY_PATH=/project/dependencies/lib:/project/dependencies/lib/julia
AUDITWHEEL_PLAT=manylinux_2_35_$(uname -m)
# Linux wheels need glibc 2.35; test them in a separate job
CIBW_TEST_SKIP: "*-manylinux_*"
CIBW_BEFORE_ALL_LINUX:
bash dependencies/scripts/download_dependencies.sh
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
auditwheel repair --exclude libkrylov.so --exclude 'libjulia*.so*' --exclude 'libopenlibm*.so*' -w {dest_dir} {wheel}

- name: Build wheels (macOS)
if: startsWith(matrix.sys.os, 'macos')
Expand All @@ -92,6 +123,7 @@ jobs:
CC: clang
CXX: clang++
MACOSX_DEPLOYMENT_TARGET: 15.0
CIBW_BUILD: ${{ matrix.sys.build }}
CIBW_SKIP: cp*-*_i686 *-win32
CIBW_BEFORE_ALL_MACOS: |
cat > /tmp/clang_toolchain.cmake << 'EOF'
Expand All @@ -114,38 +146,123 @@ jobs:
CMAKE_TOOLCHAIN_FILE=/tmp/clang_toolchain.cmake
CMAKE_GENERATOR=Ninja
CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.logicalcpu)
CIBW_CONFIG_SETTINGS_MACOS: >
cmake.define.KRYLOV=dependencies/lib/libkrylov.dylib
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
delocate-wheel --require-archs {delocate_archs} --ignore-missing-dependencies -w {dest_dir} -v {wheel}

- name: Build wheels (Windows)
if: runner.os == 'Windows'
run: cibuildwheel --output-dir ${{github.workspace}}/wheelhouse
shell: pwsh
env:
UNO_TOOLCHAIN: mingw
CC: C:/mingw64/bin/gcc.exe
CXX: C:/mingw64/bin/g++.exe
CMAKE_C_COMPILER: C:/mingw64/bin/gcc.exe
CMAKE_CXX_COMPILER: C:/mingw64/bin/g++.exe
CC: C:/mingw1420/mingw64/bin/gcc.exe
CXX: C:/mingw1420/mingw64/bin/g++.exe
CMAKE_C_COMPILER: C:/mingw1420/mingw64/bin/gcc.exe
CMAKE_CXX_COMPILER: C:/mingw1420/mingw64/bin/g++.exe
CIBW_BUILD: ${{ matrix.sys.build }}
CIBW_SKIP: cp314t-* cp*-*_i686 *-win32
CIBW_TEST_SKIP: "*-win_amd64"
CIBW_BEFORE_ALL_WINDOWS: >
C:/msys64/usr/bin/bash -lc "cd \"$(cygpath -u '{package}')\" && ./dependencies/scripts/download_dependencies.sh" &&
pwsh -Command "Get-ChildItem -Path '{package}/dependencies' -Recurse |
ForEach-Object { $_.LastWriteTime = Get-Date }"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >
pwsh -Command "$env:SOURCE_DATE_EPOCH='315532800';
delvewheel repair --add-path 'C:/mingw64/bin;dependencies/bin' -w {dest_dir} {wheel}"
delvewheel repair --no-mangle-all
--exclude "libstdc++-6.dll;libgcc_s_seh-1.dll;libwinpthread-1.dll;libgfortran-5.dll;libquadmath-0.dll;libgomp-1.dll"
--add-path "C:/mingw1420/mingw64/bin;dependencies/bin"
-w {dest_dir} {wheel}
CIBW_ENVIRONMENT_WINDOWS: >
SOURCE_DATE_EPOCH=315532800
CMAKE_BUILD_PARALLEL_LEVEL=$NUMBER_OF_PROCESSORS
CMAKE_GENERATOR="MinGW Makefiles"
CMAKE_MAKE_PROGRAM=C:/mingw64/bin/mingw32-make.exe
CMAKE_Fortran_COMPILER=C:/mingw64/bin/gfortran.exe
CMAKE_MAKE_PROGRAM=C:/mingw1420/mingw64/bin/mingw32-make.exe
CMAKE_C_COMPILER=C:/mingw1420/mingw64/bin/gcc.exe
CMAKE_CXX_COMPILER=C:/mingw1420/mingw64/bin/g++.exe
CMAKE_Fortran_COMPILER=C:/mingw1420/mingw64/bin/gfortran.exe
CIBW_CONFIG_SETTINGS_WINDOWS: >
cmake.define.METIS_LIBRARY=dependencies/bin/libmetis.dll
cmake.define.KRYLOV=dependencies/bin/libkrylov.dll
cmake.define.AUXILIARY_LIBRARIES=dependencies/lib/libstdc++.a
cmake.define.CMAKE_BUILD_TYPE=RelWithDebInfo

- name: Test with native backtrace (Windows, temporary)
if: always() && runner.os == 'Windows'
shell: pwsh
run: |
$ErrorActionPreference = 'Continue'

# --- pick the fresh cp311 wheel and prove its provenance ---
$whl = Get-ChildItem ${{ github.workspace }}/wheelhouse/*cp311*win_amd64.whl | Select-Object -First 1
if (-not $whl) { Write-Error "no cp311 win_amd64 wheel in wheelhouse"; exit 1 }
Write-Host "=== Testing: $($whl.FullName) (built $($whl.LastWriteTime)) ==="

python -m pip install --force-reinstall --no-deps $whl.FullName
python -m pip install numpy

$pyd = "C:\hostedtoolcache\windows\Python\3.11.9\x64\Lib\site-packages\unopy\unopy.cp311-win_amd64.pyd"
Write-Host "=== pyd built: $((Get-Item $pyd).LastWriteTime) ==="

# --- is the binding registered, and is our error string in the binary? ---
python -c "import unopy; print('has test_libkrylov:', hasattr(unopy, 'test_libkrylov'))"
$u = ($pyd -replace '\\','/')
C:/msys64/usr/bin/bash -lc "grep -a -c 'krylov_workspace_create failed' '$u' || echo 'error string NOT found'"

# --- native backtrace via gdb (reads MinGW DWARF; cdb cannot) ---
$py = (Get-Command python).Source
$env:PYTHONHOME = "" # stop MinGW's opt\Python from hijacking
$gdb = "C:/mingw1420/mingw64/bin/gdb.exe"
Write-Host "=== gdb: $gdb ; python: $py ==="
& $gdb --batch `
-ex "set pagination off" `
-ex "run" `
-ex "bt full" `
-ex "thread apply all bt" `
--args $py -c "import unopy; unopy.test_libkrylov()"

- name: Store artifacts
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: cibw-wheels-${{ matrix.sys.os }}-${{ strategy.job-index }}
path: wheelhouse/*.whl
path: ${{ github.workspace }}/wheelhouse/*.whl
if-no-files-found: warn

# test the Linux wheels with glibc ≥ 2.35
test-linux-wheels:
name: Test Linux wheels (${{ matrix.runs-on }})
needs: build_wheels
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- runs-on: ubuntu-24.04
pattern: cibw-wheels-ubuntu-latest-*
- runs-on: ubuntu-24.04-arm
pattern: cibw-wheels-ubuntu-22.04-arm-*

steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
pattern: ${{ matrix.pattern }}
path: wheelhouse
merge-multiple: true

- uses: actions/setup-python@v5
with: { python-version: '3.11' }

- name: Run tests
shell: bash
run: |
ls -R wheelhouse || { echo "no wheels downloaded"; exit 1; }
python -m pip install numpy
python -m pip install --no-index --find-links "$GITHUB_WORKSPACE/wheelhouse" --only-binary=:all: unopy
cd "$RUNNER_TEMP" # run from outside the repo so 'import unopy' hits the wheel, not the source
python "$GITHUB_WORKSPACE/interfaces/Python/tests/run_wheel_tests.py"

build_sdist:
name: Build source distribution
Expand Down Expand Up @@ -277,4 +394,4 @@ jobs:

- name: Run example
working-directory: ${{github.workspace}}/interfaces/Python/example
run: python example_hs015.py
run: python example_hs015.py
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ jobs:
-DMUMPS_INCLUDE_DIR=${{github.workspace}}/dependencies/include \
-DMETIS_INCLUDE_DIR=${{github.workspace}}/dependencies/include \
-DHIGHS_INCLUDE_DIR=${{github.workspace}}/dependencies/include/highs \
-DKRYLOV_INCLUDE_DIR=${{github.workspace}}/dependencies/include \
-DBQPD=${{github.workspace}}/dependencies/lib/libbqpd.a \
-DMETIS_LIBRARY=${{github.workspace}}/dependencies/lib/libmetis.a \
-DMUMPS_LIBRARY=${{github.workspace}}/dependencies/lib/libdmumps.a \
Expand All @@ -213,6 +214,7 @@ jobs:
-DBLAS_LIBRARIES="${{github.workspace}}/dependencies/lib/libcblas.a;${{github.workspace}}/dependencies/lib/libblas.a" \
-DLAPACK_LIBRARIES=${{github.workspace}}/dependencies/lib/liblapack.a \
-DHIGHS="${{github.workspace}}/dependencies/lib/libhighs.a;${{github.workspace}}/dependencies/lib/libhighs_extras.a" \
-DKRYLOV=${{github.workspace}}/dependencies/lib/libkrylov.so \
-DBUILD_STATIC_LIBS=ON \
-DBUILD_SHARED_LIBS=ON

Expand All @@ -227,6 +229,7 @@ jobs:
-DMUMPS_INCLUDE_DIR=${{github.workspace}}/dependencies/include \
-DMETIS_INCLUDE_DIR=${{github.workspace}}/dependencies/include \
-DHIGHS_INCLUDE_DIR=${{github.workspace}}/dependencies/include/highs \
-DKRYLOV_INCLUDE_DIR=${{github.workspace}}/dependencies/include \
-DBQPD=${{github.workspace}}/dependencies/lib/libbqpd.a \
-DMETIS_LIBRARY=${{github.workspace}}/dependencies/lib/libmetis.a \
-DMUMPS_LIBRARY=${{github.workspace}}/dependencies/lib/libdmumps.a \
Expand All @@ -236,6 +239,7 @@ jobs:
-DBLAS_LIBRARIES="${{github.workspace}}/dependencies/lib/libcblas.a;${{github.workspace}}/dependencies/lib/libblas.a" \
-DLAPACK_LIBRARIES=${{github.workspace}}/dependencies/lib/liblapack.a \
-DHIGHS="${{github.workspace}}/dependencies/lib/libhighs.a;${{github.workspace}}/dependencies/lib/libhighs_extras.a" \
-DKRYLOV=${{github.workspace}}/dependencies/lib/libkrylov.so \
-DBUILD_STATIC_LIBS=ON \
-DBUILD_SHARED_LIBS=ON

Expand Down
Loading
Loading