Skip to content

Move Enzyme tests to NoPre test group to fix prerelease CI failures #672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .github/workflows/CI_NonlinearSolve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,18 @@ jobs:
- downstream
- wrappers
- misc
- nopre
version:
- "1"
- "lts"
- "pre"
os:
- ubuntu-latest
- macos-latest
exclude:
# Don't run nopre tests on prerelease Julia
- group: nopre
version: "pre"
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/CI_SimpleNonlinearSolve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ jobs:
- core
- adjoint
- alloc_check
- nopre
exclude:
# Don't run nopre tests on prerelease Julia
- group: nopre
version: "pre"
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
Expand Down
4 changes: 1 addition & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ CommonSolve = "0.2.4"
ConcreteStructs = "0.2.3"
DiffEqBase = "6.158.3"
DifferentiationInterface = "0.6.18, 0.7"
Enzyme = "0.13.11"
ExplicitImports = "1.5"
FastClosures = "0.3.2"
FastLevenbergMarquardt = "0.1"
Expand Down Expand Up @@ -123,7 +122,6 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
BandedMatrices = "aae01518-5342-5314-be14-df237901396f"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9"
ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7"
FastLevenbergMarquardt = "7a0df574-e128-4d35-8cbd-3d84502bf7ce"
FixedPointAcceleration = "817d07cb-a79a-5c30-9a31-890123675176"
Expand Down Expand Up @@ -170,5 +168,5 @@ path = "lib/NonlinearSolveSpectralMethods"
path = "lib/SimpleNonlinearSolve"

[targets]
test = ["Aqua", "BandedMatrices", "BenchmarkTools", "CUDA", "Enzyme", "ExplicitImports", "FastLevenbergMarquardt", "FixedPointAcceleration", "Hwloc", "InteractiveUtils", "LeastSquaresOptim", "LineSearches", "MINPACK", "NLSolvers", "NLsolve", "NaNMath", "NonlinearProblemLibrary", "OrdinaryDiffEqTsit5", "PETSc", "Pkg", "PolyesterForwardDiff", "Random", "ReTestItems", "SIAMFANLEquations", "SparseConnectivityTracer", "SpeedMapping", "StableRNGs", "StaticArrays", "Sundials", "Test", "Zygote"]
test = ["Aqua", "BandedMatrices", "BenchmarkTools", "CUDA", "ExplicitImports", "FastLevenbergMarquardt", "FixedPointAcceleration", "Hwloc", "InteractiveUtils", "LeastSquaresOptim", "LineSearches", "MINPACK", "NLSolvers", "NLsolve", "NaNMath", "NonlinearProblemLibrary", "OrdinaryDiffEqTsit5", "PETSc", "Pkg", "PolyesterForwardDiff", "Random", "ReTestItems", "SIAMFANLEquations", "SparseConnectivityTracer", "SpeedMapping", "StableRNGs", "StaticArrays", "Sundials", "Test", "Zygote"]

2 changes: 1 addition & 1 deletion test/23_test_problems_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ end
export test_on_library, problems, dicts
end

@testitem "23 Test Problems: PolyAlgorithms" setup=[RobustnessTesting] tags=[:core] begin
@testitem "23 Test Problems: PolyAlgorithms" setup=[RobustnessTesting] tags=[:nopre] begin
alg_ops=(RobustMultiNewton(), FastShortcutNonlinearPolyalg())

broken_tests=Dict(alg=>Int[] for alg in alg_ops)
Expand Down
12 changes: 6 additions & 6 deletions test/core_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@test sol1.u ≈ sol2.u
end

@testitem "Basic PolyAlgorithms" tags=[:core] begin
@testitem "Basic PolyAlgorithms" tags=[:nopre] begin
f(u, p) = u .* u .- 2
u0 = [1.0, 1.0]

Expand Down Expand Up @@ -60,7 +60,7 @@ end
end
end

@testitem "PolyAlgorithms Autodiff" tags=[:core] begin
@testitem "PolyAlgorithms Autodiff" tags=[:nopre] begin
cache = zeros(2)
function f(du, u, p)
cache .= u .* u
Expand Down Expand Up @@ -126,7 +126,7 @@ end
@test SciMLBase.successful_retcode(sol.retcode)
end

@testitem "Ensemble Nonlinear Problems" tags=[:core] begin
@testitem "Ensemble Nonlinear Problems" tags=[:nopre] begin
prob_func(prob, i, repeat) = remake(prob; u0 = prob.u0[:, i])

prob_nls_oop = NonlinearProblem((u, p) -> u .* u .- p, rand(4, 128), 2.0)
Expand Down Expand Up @@ -350,7 +350,7 @@ end
end
end

@testitem "Out-of-place Matrix Resizing" tags=[:core] begin
@testitem "Out-of-place Matrix Resizing" tags=[:nopre] begin
using StableRNGs

ff(u, p) = u .* u .- p
Expand All @@ -368,7 +368,7 @@ end
end
end

@testitem "Inplace Matrix Resizing" tags=[:core] begin
@testitem "Inplace Matrix Resizing" tags=[:nopre] begin
using StableRNGs

fiip(du, u, p) = (du .= u .* u .- p)
Expand Down Expand Up @@ -437,7 +437,7 @@ end
@test sol.retcode == ReturnCode.StalledSuccess
end

@testitem "Default Algorithm Singular Handling" tags=[:core] begin
@testitem "Default Algorithm Singular Handling" tags=[:nopre] begin
f(u, p) = [u[1]^2 - 2u[1] + 1, sum(u)]
prob = NonlinearProblem(f, [1.0, 1.0])
sol = solve(prob)
Expand Down
2 changes: 1 addition & 1 deletion test/forward_ad_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ compatible(::KINSOL, ::Val{:oop_cache}) = false
export test_f!, test_f, jacobian_f, solve_with, compatible
end

@testitem "ForwardDiff.jl Integration" setup=[ForwardADTesting] tags=[:core] begin
@testitem "ForwardDiff.jl Integration" setup=[ForwardADTesting] tags=[:nopre] begin
@testset for alg in (
NewtonRaphson(),
TrustRegion(),
Expand Down
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ if GROUP == "all" || GROUP == "downstream"
push!(EXTRA_PKGS, Pkg.PackageSpec("ModelingToolkit"))
push!(EXTRA_PKGS, Pkg.PackageSpec("SymbolicIndexingInterface"))
end
if GROUP == "all" || GROUP == "nopre"
# Only add Enzyme for nopre group if not on prerelease Julia
if isempty(VERSION.prerelease)
push!(EXTRA_PKGS, Pkg.PackageSpec("Enzyme"))
end
end
length(EXTRA_PKGS) ≥ 1 && Pkg.add(EXTRA_PKGS)

const RETESTITEMS_NWORKERS = parse(
Expand Down
Loading