Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
50ec5ab
examples: adjoint boundary sensitivities; SIMSOPT analytic gradient
krystophny Jun 14, 2026
8a319b6
examples: fix adjoint on 3D (GMRES for indefinite Hessian) + globalize
krystophny Jun 14, 2026
11cfee6
ideal_mhd_model: share the local force-density composition
krystophny Jun 14, 2026
f72c281
enzyme: plugin JVP entry point for the exact force Hessian
krystophny Jun 14, 2026
58bc8d0
ideal_mhd_model: exact force Hessian-vector product wrapper
krystophny Jun 14, 2026
79ef740
Merge branch 'internal-hvp' into exact-hvp-integration
krystophny Jun 14, 2026
63fbf6a
pybind: exact Hessian-vector product end-to-end (MHD + lambda)
krystophny Jun 14, 2026
b60e37d
ideal_mhd_model: add the constraint force to the exact HVP composition
krystophny Jun 14, 2026
2288a1e
ideal_mhd_model: composed==production diagnostic; gate zeroZ in exact…
krystophny Jun 14, 2026
c8f3685
exact HVP: correct geometry tangent and constraint reference -> exact…
krystophny Jun 14, 2026
48cd127
examples: add exact-autodiff-HVP Newton-Krylov solver
krystophny Jun 14, 2026
a8a4790
exact HVP: analytic geometry tangent, no finite difference, no full u…
krystophny Jun 14, 2026
54bbcfd
Merge branch 'simsopt-adjoint' into exact-hvp-integration
krystophny Jun 14, 2026
f312a71
exact HVP: cache the primal geometry across Krylov matvecs
krystophny Jun 14, 2026
a385abf
exact HVP: differentiate the ncurr=1 chi' term -> exact on cth_like
krystophny Jun 14, 2026
3ab1fc6
examples: reproducible benchmarks for the exact HVP and adjoint gradient
krystophny Jun 14, 2026
e43935b
adjoint: use the exact autodiff HVP in the boundary gradient (SIMSOPT)
krystophny Jun 14, 2026
b4669a0
optimizers: Eisenstat-Walker forcing + lgmres -> exact-HVP Newton bea…
krystophny Jun 14, 2026
267fdd0
fix CI: formatting (ruff/docformatter/clang-format) + SIMSOPT gradien…
krystophny Jun 14, 2026
c22a0c2
apply pre-commit formatting (ruff, docformatter, clang-format)
krystophny Jun 14, 2026
5ad6d37
clang-tidy: drop dead store in composition; use reinterpret_cast in J…
krystophny Jun 14, 2026
8c7a59b
bazel: declare shared force-chain kernel + autodiff headers in ideal_…
krystophny Jun 14, 2026
6b6bf44
ci: skip benchmark result upload on fork PRs (token is read-only)
krystophny Jun 14, 2026
54ccecb
ci: build VMEC2000 from source so the compat test runs on numpy 2
krystophny Jun 14, 2026
3699230
test: skip vmecpp-only indata fields in the VMEC2000 compat subset
krystophny Jun 14, 2026
22ea792
ci: skip benchmark result upload on fork PRs (token is read-only)
krystophny Jun 14, 2026
e10d2ec
ci: build VMEC2000 from source so the compat test runs on numpy 2
krystophny Jun 14, 2026
441f1d1
test: skip vmecpp-only indata fields in the VMEC2000 compat subset
krystophny Jun 14, 2026
031e739
ci: sync VMEC2000-from-source build, benchmark fork guard, abseil com…
krystophny Jun 15, 2026
cd99955
ci: sync VMEC2000-from-source build, benchmark fork guard, abseil com…
krystophny Jun 15, 2026
5fe8784
Merge remote-tracking branch 'upstream/main' into HEAD
krystophny Jun 15, 2026
3a69824
Merge remote-tracking branch 'upstream/main' into HEAD
krystophny Jun 15, 2026
161a263
enzyme: reverse-mode force VJP and transposed exact Hessian-vector pr…
krystophny Jun 15, 2026
9aae482
examples: exact boundary gradient via forward sensitivities and O(1) …
krystophny Jun 15, 2026
fb63ac5
tests: transposed exact Hessian-vector product matches the assembled …
krystophny Jun 15, 2026
27f6ea5
Merge remote-tracking branch 'origin/exact-hvp-integration' into exac…
krystophny Jun 15, 2026
43242c1
examples: O(1) structural-null detection for the reverse adjoint
krystophny Jun 15, 2026
20f8233
Apply ruff-format and docformatter (pre-commit)
krystophny Jun 16, 2026
9d89e87
bazel: declare exact_force_vjp.h header for ideal_mhd_model
krystophny Jun 16, 2026
2cf4939
ideal_mhd_model: hoist ForcesToFourier scratch out of the inner loop
krystophny Jun 16, 2026
5f08133
ideal_mhd_model: mark Jacobian metric kernel buffers __restrict
krystophny Jun 16, 2026
136d849
output_quantities: compare jcuru/jcurv at a looser opt-in tolerance
krystophny Jun 16, 2026
0638435
Merge branch 'internal-hvp' into simsopt-adjoint
krystophny Jun 24, 2026
72a1549
Merge branch 'internal-hvp' into exact-hvp-integration
krystophny Jun 24, 2026
962b999
exact-hvp-integration: align with the kernel stack
krystophny Jun 24, 2026
af212a0
enzyme: drop timing-dependent benchmark from local force Hessian test
krystophny Jun 27, 2026
9d2f380
examples: cold-start external optimizers from axis-less inputs
krystophny Jun 27, 2026
1b36dfc
examples: cold-start external optimizers from axis-less inputs
krystophny Jun 27, 2026
ee03fc0
ideal_mhd_model: make the exact HVP a consistent Jacobian by freezing…
krystophny Jun 27, 2026
985dfa3
examples: add pseudo-transient continuation solver for stiff 3D cases
krystophny Jun 27, 2026
dcd1f23
examples: docformatter-compliant docstrings (pre-commit)
krystophny Jun 27, 2026
77cf2d6
ideal_mhd_model: clang-tidy fixes for the freeze flag
krystophny Jun 27, 2026
3932fec
examples: docformatter (pinned hook) wrapping for solve_newton_ptc do…
krystophny Jun 27, 2026
2590d6f
examples: docformatter-compliant docstrings (pinned pre-commit hook)
krystophny Jun 27, 2026
a40d22b
output_quantities: compare jcuru/jcurv at a looser opt-in tolerance
krystophny Jun 16, 2026
ebe5310
Merge branch 'internal-hvp' into simsopt-adjoint
krystophny Jul 8, 2026
b832ccb
Merge branch 'augmented-force-hessian' into exact-hvp-integration
krystophny Jul 8, 2026
571225f
Merge branch 'simsopt-adjoint' into exact-hvp-integration
krystophny Jul 8, 2026
f40b2c6
ci: retry transient macos download
krystophny Jul 8, 2026
24f6de5
Merge branch 'simsopt-adjoint' into exact-hvp-integration
krystophny Jul 8, 2026
2532821
Merge internal-hvp into simsopt-adjoint
krystophny Jul 8, 2026
5afdba4
Merge simsopt-adjoint into exact-hvp-integration
krystophny Jul 8, 2026
839a8e6
Merge branch 'internal-hvp' into simsopt-adjoint
krystophny Jul 8, 2026
b230cda
Merge branch 'simsopt-adjoint' into exact-hvp-integration
krystophny Jul 8, 2026
96f3cb3
examples: adjoint boundary sensitivities; SIMSOPT analytic gradient
krystophny Jun 14, 2026
d6d1091
examples: fix adjoint on 3D (GMRES for indefinite Hessian) + globalize
krystophny Jun 14, 2026
2f258ed
Fix adjoint checks on current main
krystophny Jul 9, 2026
a9f7cf0
Make raw VMEC forces history independent
krystophny Jul 9, 2026
8c8a46e
Use compact storage for constraint policy
krystophny Jul 9, 2026
2def2d5
Report comparable external optimizer metrics
krystophny Jul 9, 2026
5c8acb4
Merge remote-tracking branch 'upstream/main' into exact-hvp-integration
krystophny Jul 9, 2026
371503d
Merge remote-tracking branch 'origin/simsopt-adjoint' into exact-hvp-…
krystophny Jul 9, 2026
6f92291
Merge remote-tracking branch 'origin/fix-vmec-model-pure-force' into …
krystophny Jul 9, 2026
524d797
Merge remote-tracking branch 'origin/fix-external-optimizer-benchmark…
krystophny Jul 9, 2026
0fd57f0
Count native force evaluations directly
krystophny Jul 9, 2026
6355da1
Satisfy const wrapper contract
krystophny Jul 9, 2026
4b2a9ad
Keep exact force derivatives policy-consistent
krystophny Jul 9, 2026
e2cef38
Merge remote-tracking branch 'origin/fix-external-optimizer-benchmark…
krystophny Jul 9, 2026
1c4e4fe
Run exact force integration tests with Enzyme
krystophny Jul 9, 2026
709497e
Make exact optimizer checks gate-clean
krystophny Jul 9, 2026
c347f28
Install matching OpenMP runtime for Enzyme CI
krystophny Jul 9, 2026
ac0eae6
Install VMEC build dependencies in Enzyme CI
krystophny Jul 9, 2026
d0ef637
Improve docstring formatting in simsopt_vmec_gradient.py
krystophny Jul 9, 2026
3238887
Name the m=1 gauge policy explicitly
krystophny Jul 10, 2026
c7af973
Keep optimizer metric checks with their example tests
krystophny Jul 10, 2026
e104300
Merge fix-vmec-model-pure-force into fix-external-optimizer-benchmark
krystophny Jul 10, 2026
641a3b0
Merge fix-external-optimizer-benchmark into exact-hvp-integration
krystophny Jul 10, 2026
7fa72e4
Merge simsopt-adjoint into exact-hvp-integration
krystophny Jul 10, 2026
d382efb
Run the exact-HVP benchmark in Enzyme CI
krystophny Jul 10, 2026
a50975b
Merge remote-tracking branch 'upstream/main' into HEAD
krystophny Jul 10, 2026
09d1292
Remove accidentally committed VMEC++ output files from examples/data
krystophny Jul 10, 2026
deec76f
Make variable names consistent and to not overlap with Python input()…
jurasic-pf Aug 5, 2026
d83035b
Add `gfortran` to list of required packages on Ubuntu - for `indata2j…
jurasic-pf Aug 5, 2026
ce786a7
Merge remote-tracking branch 'origin/main' into exact-hvp-integration
krystophny Aug 13, 2026
0eaa8c6
Merge remote-tracking branch 'origin/internal-hvp' into HEAD
krystophny Aug 13, 2026
036aef6
Merge remote-tracking branch 'upstream/main' into HEAD
krystophny Aug 13, 2026
fd11ba8
Use SciPy root and benchmark adjoint gradient
krystophny Aug 17, 2026
38aab5c
Propagate adjoint review fixes
krystophny Aug 17, 2026
134b798
Use adaptive VMEC preconditioning with SciPy root
krystophny Aug 17, 2026
14c522e
examples: adjoint boundary sensitivities + SIMSOPT analytic gradient …
krystophny Aug 17, 2026
3cd2213
tests: compare the QUASR free-vs-fixed magnetic axis as a curve, not …
jurasic-pf Aug 17, 2026
c65e487
ci: pin numpy<2.1 in validation workflow to fix numba compatibility (…
Copilot Aug 18, 2026
37173d7
ci: constrain simsopt away 1.11.0 (#686)
jurasic-pf Aug 18, 2026
35bae79
Widen supported pydantic versions after bugfix landed (#681)
jurasic-pf Aug 18, 2026
bcf2f65
Python 3.14 support (#687)
jurasic-pf Aug 18, 2026
dd9b7cc
Keep skipping 3.14 tests on release until all dependencies support it
jurasic-pf Aug 18, 2026
5ad1758
Fix validation workflow constraint path for nested checkout (#689)
Copilot Aug 19, 2026
45c07ca
ideal_mhd_model: implement LFORBAL (m=1,n=0 force-balance modificatio…
CharlesCNorton Aug 22, 2026
ddb1ea0
Reconstruct exact-HVP integration on current main
krystophny Aug 23, 2026
3cf0d64
Guard exact HVP for LFORBAL
krystophny Aug 23, 2026
35a6629
build: enable link-time optimization for Release builds (#694)
jurasic-pf Aug 23, 2026
43a5a52
Compile AVX2 variant selected at load based on CPU support (#695)
jurasic-pf Aug 23, 2026
8b6f3ee
Merge current main into exact HVP integration
krystophny Aug 23, 2026
db63e60
Compile Enzyme derivatives for the baseline ISA
krystophny Aug 23, 2026
0e0827c
Merge branch 'main' into exact-hvp-integration
jurasic-pf Aug 23, 2026
da77b3e
Repair shared-core consumer builds
krystophny Aug 23, 2026
634491e
Merge remote-tracking branch 'refs/remotes/live-pr/582' into integrat…
krystophny Aug 23, 2026
38e46ea
Require complete prebuilt Enzyme derivatives
krystophny Aug 23, 2026
296e130
Merge shared-core build repair into exact HVP integration
krystophny Aug 23, 2026
9cd1e01
Make wdot decay calculation alias-safe
krystophny Aug 23, 2026
dba1783
Merge alias-safe wdot repair into exact HVP integration
krystophny Aug 23, 2026
908ee7e
Use the native loader path on macOS
krystophny Aug 23, 2026
720d5cf
Merge macOS loader-path repair into exact HVP integration
krystophny Aug 23, 2026
11b0f7f
Let Python 3.14 use the fixed SIMSOPT source release
krystophny Aug 23, 2026
37bdc43
Merge Python 3.14 dependency repair into exact HVP integration
krystophny Aug 23, 2026
8a38dfb
Accommodate cross-build noise in the W7-X trace
krystophny Aug 23, 2026
aa65303
Document the W7-X cross-ISA envelope
krystophny Aug 23, 2026
2a4e753
test_data: correct wdot in the reference wout files (#700)
jurasic-pf Aug 23, 2026
137cbe5
Repair shared-core and HWCAPS regressions (#699)
krystophny Aug 23, 2026
f30237b
Fix pydantic compatibility with internal tools (#698)
jurasic-pf Aug 23, 2026
65d9915
Add equilibrium rescaling support via HotRestartState (#690)
duushgu Aug 23, 2026
46216bb
Drop duplicate files from large test data (#701)
jurasic-pf Aug 23, 2026
0d48eb4
Merge branch 'main' into exact-hvp-integration
jurasic-pf Aug 23, 2026
100dca4
vmec_indata: warn when the input boundary is spectrally dense (#600)
CharlesCNorton Aug 23, 2026
1d7e099
Fix VmecWOut.from_wout_file failing to validate wout aliases (#702)
jurasic-pf Aug 23, 2026
c3f3f5b
exact HVP: share asymmetric constraint force kernel
krystophny Aug 24, 2026
205b93b
test: verify direct spectral transpose identities
krystophny Aug 24, 2026
a1184cf
ci: run pypi wheel build on PRs, skip publish stage (#705)
jurasic-pf Aug 25, 2026
7ee7bbb
Remove vendored LAPACK dependency: replace dgetrf_/dgetrs_ with Eigen…
jurasic-pf Aug 25, 2026
bd560cf
Fix typos in Python docstrings and messages (#708)
CharlesCNorton Aug 25, 2026
7dd37ac
Build HDF5/netCDF-C from source (DAP off) for Linux wheels (#704)
jurasic-pf Aug 25, 2026
cc1fc37
Update README.md
jurasic-pf Aug 25, 2026
69391cc
Merge branch 'main' into exact-hvp-integration
jurasic-pf Aug 26, 2026
6b48819
Update vmecpp differences and missing features
jurasic-pf Aug 26, 2026
29311fa
Remove test_bench_cli_invalid_input from benchmarks (#709)
Copilot Aug 26, 2026
a24e265
Use adaptive preconditioning for interior solves
krystophny Aug 26, 2026
6ae48e5
Merge upstream main into exact-hvp-integration
krystophny Aug 26, 2026
4776c04
Replace solver-specific AD surface with geometry API foundation
krystophny Aug 26, 2026
8f6b282
Add output-independent geometry evaluator and VJP
krystophny Aug 26, 2026
eb1004b
geometry: smooth radial evaluation with cubic interpolation
krystophny Aug 26, 2026
f457ca4
enzyme: restore exact force JVP and transpose VJP foundation
krystophny Aug 26, 2026
6ede756
pr582: keep the exact derivative foundation focused
krystophny Aug 26, 2026
1564c37
ci: remove deleted Enzyme test
krystophny Aug 26, 2026
3a86374
test: bound cross-language iteration roundoff
krystophny Aug 26, 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
2 changes: 1 addition & 1 deletion .github/actions/run-benchmarks/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake libnetcdf-dev liblapack-dev libomp-dev libhdf5-dev
sudo apt-get install -y build-essential cmake libnetcdf-dev libomp-dev libhdf5-dev

- name: Mount bazel cache
uses: actions/cache@v4
Expand Down
3 changes: 3 additions & 0 deletions .github/constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Block simsopt 1.11.0 wheels with unsupported AVX-512 instructions. Python 3.14
# has no wheel and must use the corrected 1.11.0 source distribution.
simsopt!=1.11.0; python_version != "3.14"
5 changes: 5 additions & 0 deletions .github/workflows/benchmarks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ permissions:
contents: read
pull-requests: write

# CI-only dependency workaround, see .github/constraints.txt
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/constraints.txt
UV_CONSTRAINT: ${{ github.workspace }}/.github/constraints.txt

jobs:
benchmark:
runs-on: ubuntu-22.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang_tidy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
id: review
with:
config_file: ".clang-tidy"
apt_packages: libhdf5-dev, liblapack-dev, libnetcdf-dev, gfortran, python3-dev, libomp-dev
apt_packages: zlib1g-dev, gfortran, python3-dev, libomp-dev
build_dir: build
cmake_command: cmake -B build && cmake -DCMAKE_EXPORT_COMPILE_COMMANDS:STRING=ON build
# bazel-built test and benchmark files have no cmake compile_commands
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ on:
paths:
- .github/workflows/copilot-setup-steps.yml

# CI-only dependency workaround, see .github/constraints.txt
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/constraints.txt
UV_CONSTRAINT: ${{ github.workspace }}/.github/constraints.txt

jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
Expand All @@ -37,10 +42,8 @@ jobs:
sudo apt-get install -y \
build-essential \
cmake \
libnetcdf-dev \
liblapack-dev \
zlib1g-dev \
libomp-dev \
libhdf5-dev \
python3-dev

- name: Install vmecpp with test dependencies
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ concurrency:
group: "pages"
cancel-in-progress: false

# CI-only dependency workaround, see .github/constraints.txt
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/constraints.txt
UV_CONSTRAINT: ${{ github.workspace }}/.github/constraints.txt

jobs:
benchmark:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -48,7 +53,7 @@ jobs:
- name: Build docs
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake libnetcdf-dev liblapack-dev libomp-dev libhdf5-dev
sudo apt-get install -y build-essential cmake zlib1g-dev libomp-dev
# must actually install the package otherwise sphinx can't autogenerate the API reference
python -m pip install -v .[docs]
sphinx-apidoc --module-first --no-toc --force --separate -o docs/api src/vmecpp/ && sphinx-build docs html_docs
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/full_validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: ${{ github.ref_name != 'main' }}

# CI-only dependency workaround, see .github/constraints.txt
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/constraints.txt
UV_CONSTRAINT: ${{ github.workspace }}/.github/constraints.txt

jobs:
validation:
name: Run VMEC++ validation
Expand All @@ -28,6 +33,9 @@ jobs:
# wout with Fortran VMEC2000 in Docker plus one with VMEC++: budget generously.
# The short run finishes in minutes and won't come close to this limit.
timeout-minutes: 360
env:
PIP_CONSTRAINT: ${{ github.workspace }}/vmecpp/.github/constraints.txt
UV_CONSTRAINT: ${{ github.workspace }}/vmecpp/.github/constraints.txt
steps:
- name: Check out VMEC++
uses: actions/checkout@v4
Expand All @@ -49,8 +57,8 @@ jobs:
- name: Install required system packages for Ubuntu
run: |
sudo apt-get update && sudo apt-get install -y \
build-essential cmake libnetcdf-dev liblapack-dev liblapacke-dev libopenmpi-dev \
libomp-dev libeigen3-dev nlohmann-json3-dev libhdf5-dev
build-essential cmake zlib1g-dev libopenmpi-dev \
libomp-dev libeigen3-dev nlohmann-json3-dev

- name: Install vmecpp-validation's Python requirements
run: |
Expand All @@ -61,7 +69,7 @@ jobs:
python -m pip install -r requirements.no-vmecpp.txt

- name: Install VMEC++ from this commit
run: python -m pip install ./vmecpp
run: python -m pip install "./vmecpp" "numpy<2.1"

- name: Run short validation
if: github.event_name == 'push'
Expand Down Expand Up @@ -96,8 +104,8 @@ jobs:
- name: Install required packages for Ubuntu
run: |
sudo apt-get update && sudo apt-get install -y \
build-essential cmake libnetcdf-dev liblapack-dev liblapacke-dev libopenmpi-dev \
libomp-dev libeigen3-dev nlohmann-json3-dev libhdf5-dev
build-essential cmake zlib1g-dev libopenmpi-dev \
libomp-dev libeigen3-dev nlohmann-json3-dev
- name: Install package
run: python -m pip install -v .[test]
- name: Run slow QUASR free-boundary tests
Expand Down
38 changes: 27 additions & 11 deletions .github/workflows/pypi_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,24 @@ on:
# allows running workflows manually
workflow_dispatch:

pull_request:

release:
types: [published]

# CI-only dependency workaround, see .github/constraints.txt
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/constraints.txt
UV_CONSTRAINT: ${{ github.workspace }}/.github/constraints.txt

jobs:
main:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# ubuntu-24.04-arm not supported due to lack of netcdf-devel hdf5-devel
os: [ubuntu-24.04, macos-14, macos-15-intel]
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-14, macos-15-intel]

steps:
- name: Checkout repository
Expand All @@ -26,11 +32,15 @@ jobs:
uses: pypa/cibuildwheel@v3.3.1
# All the settings for cibuildwheel are in pyproject.toml
env:
# Linux builds run in a container, where PIP_CONSTRAINT above does not
# apply and the repo is mounted at /project.
CIBW_ENVIRONMENT_LINUX: >
PIP_CONSTRAINT=/project/.github/constraints.txt
UV_CONSTRAINT=/project/.github/constraints.txt
CIBW_ENVIRONMENT_MACOS: >
MACOSX_DEPLOYMENT_TARGET=${{ matrix.os == 'macos-14' && '14.0' || '15.0' }}
DYLD_LIBRARY_PATH=/usr/local/opt/gcc/lib/gcc/current/:$DYLD_LIBRARY_PATH
FC=gfortran-14
HDF5_ROOT=$(brew --prefix hdf5)
OpenMP_ROOT=$(brew --prefix)/opt/libomp
with:
package-dir: .
Expand Down Expand Up @@ -76,7 +86,15 @@ jobs:
# "debian:testing-20250224", # TODO(jurasic): re-enable when 3.14 support unblocked
"fedora:41",
]
runs-on: ubuntu-24.04
runner: [ubuntu-24.04]
include:
# Exercise the aarch64 wheels too, on a native arm64 runner. One
# distro is enough here -- this job is about testing the wheel
# actually works on a plain distro, and the multi-distro matrix
# above already covers distro-specific quirks on x86_64.
- distro: "ubuntu:24.04"
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
container: ${{ matrix.distro }}

steps:
Expand Down Expand Up @@ -116,19 +134,17 @@ jobs:
merge-multiple: true
path: ./wheelhouse/
- name: Install wheel
# Install the appropriate file for vmecpp from the wheelhouse directory.
# --no-index prevents installing from PyPi, so we don't accidentally install
# a published version instead of the newly built ones. At the same time it prevents
# loading dependencies from PyPi, so the first installation fails. We only use the console output
# from this command to get the appropriate .whl file for this platform and environment.
run: |
ls wheelhouse/

$PYTHON -m venv venv
. venv/bin/activate
wheel_filename=$(find wheelhouse/$($PYTHON --version | awk '{print $2}' | awk -F. '{printf "vmecpp*-cp%s%s-*manylinux*.whl", $1, $2}'))
# Let pip's own tag matching pick the single wheel compatible with this
# interpreter and architecture; --no-index keeps it from reaching PyPi.
pip download --no-index --no-deps --find-links=wheelhouse/ --dest selected-wheel/ vmecpp
wheel_filename=$(ls selected-wheel/*.whl)
echo "Found matching wheel: $wheel_filename"
pip install $wheel_filename
pip install "$wheel_filename"

pip install pytest
python -m pytest tests/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pyright.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential cmake libnetcdf-dev liblapack-dev python3-dev
sudo apt-get install build-essential cmake zlib1g-dev python3-dev
# Parse the dependencies from the pyproject.toml file and install them,
# without installing and building the entire vmecpp project
- run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_bazel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
lfs: true # for the mgrid test data
- name: Install required system packages for Ubuntu
run: |
sudo apt-get update && sudo apt-get install -y build-essential cmake liblapack-dev libomp-dev python3-dev python3-pip python-is-python3
sudo apt-get update && sudo apt-get install -y build-essential cmake libomp-dev python3-dev python3-pip python-is-python3
- name: Mount bazel cache
uses: actions/cache@v4
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test_conda_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: ${{ github.ref_name != 'main' }}

# CI-only dependency workaround, see .github/constraints.txt
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/constraints.txt
UV_CONSTRAINT: ${{ github.workspace }}/.github/constraints.txt

jobs:
test-conda-env:
name: Test conda env
Expand Down
28 changes: 27 additions & 1 deletion .github/workflows/test_enzyme.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
sudo ./llvm.sh "${LLVM_VERSION}"
sudo apt-get install -y \
"llvm-${LLVM_VERSION}-dev" "clang-${LLVM_VERSION}" "libclang-${LLVM_VERSION}-dev" \
cmake ninja-build
"libomp-${LLVM_VERSION}-dev" \
cmake gfortran libhdf5-dev liblapack-dev libnetcdf-dev ninja-build python3-dev

- name: Cache the ClangEnzyme plugin build
id: enzyme-cache
Expand Down Expand Up @@ -75,3 +76,28 @@ jobs:
--copt="-fplugin=${ENZYME_PLUGIN}" \
--test_output=all \
//vmecpp/common/enzyme:enzyme_smoke_test

- uses: astral-sh/setup-uv@v6

- name: Run Enzyme force-derivative integration tests
env:
CC: clang-${{ env.LLVM_VERSION }}
CXX: clang++-${{ env.LLVM_VERSION }}
CMAKE_ARGS: >-
-DVMECPP_ENABLE_ENZYME=ON
-DVMECPP_ENZYME_PLUGIN=${{ env.ENZYME_PLUGIN }}
run: |
uv sync --reinstall-package vmecpp
uv run --with pytest pytest -q \
tests/test_hessian.py \
tests/test_external_optimizers.py

- name: Run exact-HVP benchmark
run: |
uv run python benchmarks/benchmark_exact_hvp.py | tee exact_hvp_benchmark.txt
{
echo "### Exact-HVP benchmark"
echo '```text'
cat exact_hvp_benchmark.txt
echo '```'
} >> "${GITHUB_STEP_SUMMARY}"
17 changes: 12 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: ${{ github.ref_name != 'main' }}

# CI-only dependency workaround, see .github/constraints.txt
env:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/constraints.txt
UV_CONSTRAINT: ${{ github.workspace }}/.github/constraints.txt

jobs:
pre-commit:
env:
Expand All @@ -32,7 +37,7 @@ jobs:
matrix:
os: [ubuntu-22.04, macos-14]
editable: [true, false]
python-version: ["3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -44,12 +49,14 @@ jobs:
- name: Install required packages for MacOS
if: ${{ contains(matrix.os, 'macos') }}
run: |
brew install ninja libomp netcdf-cxx eigen lapack git
brew install ninja libomp eigen git
- name: Install required packages for Ubuntu
if: ${{ contains(matrix.os, 'ubuntu') }}
run: |
# install VMEC++ deps as well as VMEC2000 deps (we need to import VMEC2000 in a test)
sudo apt-get update && sudo apt-get install -y build-essential cmake libnetcdf-dev liblapack-dev libomp-dev
# install VMEC++ deps as well as VMEC2000 deps (we need to import VMEC2000 in a test).
# VMEC2000 itself gets libopenblas-dev/libscalapack-mpi-dev below, which cover its
# LAPACK needs; VMEC++ no longer links LAPACK at all.
sudo apt-get update && sudo apt-get install -y build-essential cmake zlib1g-dev libomp-dev
- name: Cache the VMEC2000 wheel
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.python-version == '3.10' }}
uses: actions/cache@v4
Expand Down Expand Up @@ -111,7 +118,7 @@ jobs:
cache: 'pip'
- name: Install required packages for Ubuntu
run: |
sudo apt-get update && sudo apt-get install -y build-essential cmake libnetcdf-dev liblapack-dev libomp-dev
sudo apt-get update && sudo apt-get install -y build-essential cmake zlib1g-dev libomp-dev
- name: Install package
run: python -m pip install .[test]
- name: Test example scripts
Expand Down
Loading
Loading