Skip to content

Fix Downgrade: raise MKL_jll compat floor to 2022.2#1068

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:downgrade-mkl-jll-floor
Jun 28, 2026
Merged

Fix Downgrade: raise MKL_jll compat floor to 2022.2#1068
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:downgrade-mkl-jll-floor

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Problem

The Downgrade / Downgrade Tests - Core lane is red (e.g. run 28324898399 and main-push run 28302399780). Precompilation fails with:

ERROR: LoadError: UndefVarError: `is_available` not defined
  @ ~/work/LinearSolve.jl/LinearSolve.jl/src/LinearSolve.jl:69

cascading into all 19 extension precompile failures.

Cause

The root [compat] had MKL_jll = "2019, 2020, 2021, 2022, 2023, 2024, 2025". The downgrade resolver picked the lowest allowed, MKL_jll v2019.0.117+0. That old build's JLLWrappers-generated module does not define is_available. src/LinearSolve.jl:69 calls MKL_jll.is_available() during module init, so precompile dies.

I verified the boundary on Julia 1.10:

MKL_jll is_available defined
2019.0.117 no
2020.0.166 no
2021.1.1 yes
2022.2.0 yes

is_available is first emitted into MKL_jll wrappers at the 2021.x series.

Fix

Raise the floor to 2022.2. This is the correct minimal floor for two reasons:

  1. It is safely above the 2021.x point where is_available first appears.
  2. The surrounding source already documents that MKL_jll < 2022.2 is unusable (no mixed LP64/ILP64 _64 APIs) and gates usemkl on pkgversion(MKL_jll) >= v"2022.2". So 2022.2 aligns the compat floor with the version the code actually requires to enable MKL — no version below it was ever meaningfully usable.

MKL_jll = "2022.2, 2023, 2024, 2025"

The DowngradeSublibraries lane was already green because lib/LinearSolveAutotune/Project.toml independently pins MKL_jll = "2025.2.0".

Verification (Julia 1.10 LTS)

With MKL_jll pinned to the new 2022.2.0 floor and LinearSolve developed in:

MKL_jll version: 2022.2.0+0
is_available defined: true
is_available() = true
=== now loading LinearSolve ===
LinearSolve loaded OK; usemkl = false

Previously this is exactly the step that threw UndefVarError: is_available. Resolver confirmed honoring the floor (↓ MKL_jll v2025.2.0+0 ⇒ v2022.2.0+0).


Please ignore until reviewed by @ChrisRackauckas.

🤖 Generated with Claude Code

The Downgrade Core lane resolved MKL_jll to v2019.0.117+0, whose old
JLLWrappers-generated module does not define `is_available`. LinearSolve.jl
calls `MKL_jll.is_available()` at src/LinearSolve.jl:69 during module init,
so precompilation failed with `UndefVarError: is_available not defined`,
cascading into all extension precompile failures.

`is_available` is first emitted into MKL_jll wrappers at the 2021.x series;
2019/2020 lack it. The surrounding code already documents that MKL_jll
< 2022.2 is unusable (no mixed LP64/ILP64 `_64` APIs) and gates `usemkl` on
`pkgversion(MKL_jll) >= v"2022.2"`, so 2022.2 is the correct minimal floor:
it both defines `is_available` and matches the version the code actually
requires to enable MKL.

Verified on Julia 1.10 (LTS): with MKL_jll pinned to the 2022.2.0 floor,
`MKL_jll.is_available()` returns true and `using LinearSolve` precompiles
and loads cleanly (previously the failing step).

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review June 28, 2026 16:41
@ChrisRackauckas ChrisRackauckas merged commit aed137d into SciML:main Jun 28, 2026
52 of 56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants