Skip to content
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

ci: run windows tests with a single worker #490

Merged
merged 4 commits into from
Nov 1, 2024
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
6 changes: 4 additions & 2 deletions lib/NonlinearSolveFirstOrder/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ using ReTestItems, NonlinearSolveFirstOrder, Hwloc, InteractiveUtils, Pkg
const GROUP = lowercase(get(ENV, "GROUP", "All"))

const RETESTITEMS_NWORKERS = parse(
Int, get(ENV, "RETESTITEMS_NWORKERS", string(min(Hwloc.num_physical_cores(), 4)))
Int, get(ENV, "RETESTITEMS_NWORKERS",
string(min(ifelse(Sys.iswindows(), 0, Hwloc.num_physical_cores()), 4))
)
)
const RETESTITEMS_NWORKER_THREADS = parse(Int,
get(
ENV, "RETESTITEMS_NWORKER_THREADS",
string(max(Hwloc.num_virtual_cores() ÷ RETESTITEMS_NWORKERS, 1))
string(max(Hwloc.num_virtual_cores() ÷ max(RETESTITEMS_NWORKERS, 1), 1))
)
)

Expand Down
6 changes: 4 additions & 2 deletions lib/NonlinearSolveQuasiNewton/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ using ReTestItems, NonlinearSolveQuasiNewton, Hwloc, InteractiveUtils, Pkg
const GROUP = lowercase(get(ENV, "GROUP", "All"))

const RETESTITEMS_NWORKERS = parse(
Int, get(ENV, "RETESTITEMS_NWORKERS", string(min(Hwloc.num_physical_cores(), 4)))
Int, get(ENV, "RETESTITEMS_NWORKERS",
string(min(ifelse(Sys.iswindows(), 0, Hwloc.num_physical_cores()), 4))
)
)
const RETESTITEMS_NWORKER_THREADS = parse(Int,
get(
ENV, "RETESTITEMS_NWORKER_THREADS",
string(max(Hwloc.num_virtual_cores() ÷ RETESTITEMS_NWORKERS, 1))
string(max(Hwloc.num_virtual_cores() ÷ max(RETESTITEMS_NWORKERS, 1), 1))
)
)

Expand Down
6 changes: 4 additions & 2 deletions lib/NonlinearSolveSpectralMethods/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ using ReTestItems, NonlinearSolveSpectralMethods, Hwloc, InteractiveUtils, Pkg
const GROUP = lowercase(get(ENV, "GROUP", "All"))

const RETESTITEMS_NWORKERS = parse(
Int, get(ENV, "RETESTITEMS_NWORKERS", string(min(Hwloc.num_physical_cores(), 4)))
Int, get(ENV, "RETESTITEMS_NWORKERS",
string(min(ifelse(Sys.iswindows(), 0, Hwloc.num_physical_cores()), 4))
)
)
const RETESTITEMS_NWORKER_THREADS = parse(Int,
get(
ENV, "RETESTITEMS_NWORKER_THREADS",
string(max(Hwloc.num_virtual_cores() ÷ RETESTITEMS_NWORKERS, 1))
string(max(Hwloc.num_virtual_cores() ÷ max(RETESTITEMS_NWORKERS, 1), 1))
)
)

Expand Down
13 changes: 11 additions & 2 deletions test/23_test_problems_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,11 @@ end
broken_tests = Dict(alg => Int[] for alg in alg_ops)
broken_tests[alg_ops[1]] = [1, 2, 3, 5, 21]
if Sys.isapple()
broken_tests[alg_ops[2]] = [1, 2, 3, 5, 6, 21]
if VERSION ≥ v"1.11-"
broken_tests[alg_ops[2]] = [1, 2, 3, 5, 6, 11, 21]
else
broken_tests[alg_ops[2]] = [1, 2, 3, 5, 6, 21]
end
else
broken_tests[alg_ops[2]] = [1, 2, 3, 5, 6, 11, 21]
end
Expand All @@ -143,11 +147,16 @@ end
if Sys.isapple()
broken_tests[alg_ops[1]] = [1, 5, 11]
broken_tests[alg_ops[3]] = [1, 5, 6, 9, 11]
if VERSION ≥ v"1.11-"
broken_tests[alg_ops[5]] = [1, 4, 5, 11]
else
broken_tests[alg_ops[5]] = [1, 5, 11]
end
else
broken_tests[alg_ops[1]] = [1, 5, 11, 15]
broken_tests[alg_ops[3]] = [1, 5, 9, 11, 16]
broken_tests[alg_ops[5]] = [1, 5, 11]
end
broken_tests[alg_ops[5]] = [1, 5, 11]

test_on_library(problems, dicts, alg_ops, broken_tests, Sys.isapple() ? 1e-3 : 1e-4)
end
Expand Down
6 changes: 4 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@ const EXTRA_PKGS = Pkg.PackageSpec[]
length(EXTRA_PKGS) ≥ 1 && Pkg.add(EXTRA_PKGS)

const RETESTITEMS_NWORKERS = parse(
Int, get(ENV, "RETESTITEMS_NWORKERS", string(min(Hwloc.num_physical_cores(), 4)))
Int, get(ENV, "RETESTITEMS_NWORKERS",
string(min(ifelse(Sys.iswindows(), 0, Hwloc.num_physical_cores()), 4))
)
)
const RETESTITEMS_NWORKER_THREADS = parse(Int,
get(
ENV, "RETESTITEMS_NWORKER_THREADS",
string(max(Hwloc.num_virtual_cores() ÷ RETESTITEMS_NWORKERS, 1))
string(max(Hwloc.num_virtual_cores() ÷ max(RETESTITEMS_NWORKERS, 1), 1))
)
)

Expand Down
2 changes: 1 addition & 1 deletion test/wrappers/least_squares_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ end

push!(solvers, FastLevenbergMarquardtJL(linsolve; autodiff))
end
if Sys.isapple()
if !Sys.isapple()
for method in (:auto, :lm, :lmdif)
push!(solvers, CMINPACK(; method))
end
Expand Down
6 changes: 3 additions & 3 deletions test/wrappers/rootfind_tests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@testitem "Steady State Problems" tags=[:wrappers] begin
@testitem "Steady State Problems" tags=[:wrappers] retries=3 begin
import NLSolvers, NLsolve, SIAMFANLEquations, MINPACK, PETSc

function f_iip(du, u, p, t)
Expand Down Expand Up @@ -43,7 +43,7 @@
end
end

@testitem "Nonlinear Root Finding Problems" tags=[:wrappers] begin
@testitem "Nonlinear Root Finding Problems" tags=[:wrappers] retries=3 begin
using LinearAlgebra
import NLSolvers, NLsolve, SIAMFANLEquations, MINPACK, PETSc

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

@testitem "PETSc SNES Floating Points" tags=[:wrappers] skip=:(Sys.iswindows()) begin
@testitem "PETSc SNES Floating Points" tags=[:wrappers] retries=3 skip=:(Sys.iswindows()) begin
import PETSc

f(u, p) = u .* u .- 2
Expand Down
Loading