Skip to content

Commit 5c722c0

Browse files
authored
ci: run windows tests with a single worker (#490)
* ci: run windows tests with a single worker * test: try fixing more mac tests * test: div by zero * test: add retries to guard against segfaults
1 parent 6b0002b commit 5c722c0

File tree

7 files changed

+31
-14
lines changed

7 files changed

+31
-14
lines changed

lib/NonlinearSolveFirstOrder/test/runtests.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ using ReTestItems, NonlinearSolveFirstOrder, Hwloc, InteractiveUtils, Pkg
55
const GROUP = lowercase(get(ENV, "GROUP", "All"))
66

77
const RETESTITEMS_NWORKERS = parse(
8-
Int, get(ENV, "RETESTITEMS_NWORKERS", string(min(Hwloc.num_physical_cores(), 4)))
8+
Int, get(ENV, "RETESTITEMS_NWORKERS",
9+
string(min(ifelse(Sys.iswindows(), 0, Hwloc.num_physical_cores()), 4))
10+
)
911
)
1012
const RETESTITEMS_NWORKER_THREADS = parse(Int,
1113
get(
1214
ENV, "RETESTITEMS_NWORKER_THREADS",
13-
string(max(Hwloc.num_virtual_cores() ÷ RETESTITEMS_NWORKERS, 1))
15+
string(max(Hwloc.num_virtual_cores() ÷ max(RETESTITEMS_NWORKERS, 1), 1))
1416
)
1517
)
1618

lib/NonlinearSolveQuasiNewton/test/runtests.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ using ReTestItems, NonlinearSolveQuasiNewton, Hwloc, InteractiveUtils, Pkg
55
const GROUP = lowercase(get(ENV, "GROUP", "All"))
66

77
const RETESTITEMS_NWORKERS = parse(
8-
Int, get(ENV, "RETESTITEMS_NWORKERS", string(min(Hwloc.num_physical_cores(), 4)))
8+
Int, get(ENV, "RETESTITEMS_NWORKERS",
9+
string(min(ifelse(Sys.iswindows(), 0, Hwloc.num_physical_cores()), 4))
10+
)
911
)
1012
const RETESTITEMS_NWORKER_THREADS = parse(Int,
1113
get(
1214
ENV, "RETESTITEMS_NWORKER_THREADS",
13-
string(max(Hwloc.num_virtual_cores() ÷ RETESTITEMS_NWORKERS, 1))
15+
string(max(Hwloc.num_virtual_cores() ÷ max(RETESTITEMS_NWORKERS, 1), 1))
1416
)
1517
)
1618

lib/NonlinearSolveSpectralMethods/test/runtests.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ using ReTestItems, NonlinearSolveSpectralMethods, Hwloc, InteractiveUtils, Pkg
55
const GROUP = lowercase(get(ENV, "GROUP", "All"))
66

77
const RETESTITEMS_NWORKERS = parse(
8-
Int, get(ENV, "RETESTITEMS_NWORKERS", string(min(Hwloc.num_physical_cores(), 4)))
8+
Int, get(ENV, "RETESTITEMS_NWORKERS",
9+
string(min(ifelse(Sys.iswindows(), 0, Hwloc.num_physical_cores()), 4))
10+
)
911
)
1012
const RETESTITEMS_NWORKER_THREADS = parse(Int,
1113
get(
1214
ENV, "RETESTITEMS_NWORKER_THREADS",
13-
string(max(Hwloc.num_virtual_cores() ÷ RETESTITEMS_NWORKERS, 1))
15+
string(max(Hwloc.num_virtual_cores() ÷ max(RETESTITEMS_NWORKERS, 1), 1))
1416
)
1517
)
1618

test/23_test_problems_tests.jl

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,11 @@ end
120120
broken_tests = Dict(alg => Int[] for alg in alg_ops)
121121
broken_tests[alg_ops[1]] = [1, 2, 3, 5, 21]
122122
if Sys.isapple()
123-
broken_tests[alg_ops[2]] = [1, 2, 3, 5, 6, 21]
123+
if VERSION v"1.11-"
124+
broken_tests[alg_ops[2]] = [1, 2, 3, 5, 6, 11, 21]
125+
else
126+
broken_tests[alg_ops[2]] = [1, 2, 3, 5, 6, 21]
127+
end
124128
else
125129
broken_tests[alg_ops[2]] = [1, 2, 3, 5, 6, 11, 21]
126130
end
@@ -143,11 +147,16 @@ end
143147
if Sys.isapple()
144148
broken_tests[alg_ops[1]] = [1, 5, 11]
145149
broken_tests[alg_ops[3]] = [1, 5, 6, 9, 11]
150+
if VERSION v"1.11-"
151+
broken_tests[alg_ops[5]] = [1, 4, 5, 11]
152+
else
153+
broken_tests[alg_ops[5]] = [1, 5, 11]
154+
end
146155
else
147156
broken_tests[alg_ops[1]] = [1, 5, 11, 15]
148157
broken_tests[alg_ops[3]] = [1, 5, 9, 11, 16]
158+
broken_tests[alg_ops[5]] = [1, 5, 11]
149159
end
150-
broken_tests[alg_ops[5]] = [1, 5, 11]
151160

152161
test_on_library(problems, dicts, alg_ops, broken_tests, Sys.isapple() ? 1e-3 : 1e-4)
153162
end

test/runtests.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ const EXTRA_PKGS = Pkg.PackageSpec[]
1010
length(EXTRA_PKGS) 1 && Pkg.add(EXTRA_PKGS)
1111

1212
const RETESTITEMS_NWORKERS = parse(
13-
Int, get(ENV, "RETESTITEMS_NWORKERS", string(min(Hwloc.num_physical_cores(), 4)))
13+
Int, get(ENV, "RETESTITEMS_NWORKERS",
14+
string(min(ifelse(Sys.iswindows(), 0, Hwloc.num_physical_cores()), 4))
15+
)
1416
)
1517
const RETESTITEMS_NWORKER_THREADS = parse(Int,
1618
get(
1719
ENV, "RETESTITEMS_NWORKER_THREADS",
18-
string(max(Hwloc.num_virtual_cores() ÷ RETESTITEMS_NWORKERS, 1))
20+
string(max(Hwloc.num_virtual_cores() ÷ max(RETESTITEMS_NWORKERS, 1), 1))
1921
)
2022
)
2123

test/wrappers/least_squares_tests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ end
8383

8484
push!(solvers, FastLevenbergMarquardtJL(linsolve; autodiff))
8585
end
86-
if Sys.isapple()
86+
if !Sys.isapple()
8787
for method in (:auto, :lm, :lmdif)
8888
push!(solvers, CMINPACK(; method))
8989
end

test/wrappers/rootfind_tests.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@testitem "Steady State Problems" tags=[:wrappers] begin
1+
@testitem "Steady State Problems" tags=[:wrappers] retries=3 begin
22
import NLSolvers, NLsolve, SIAMFANLEquations, MINPACK, PETSc
33

44
function f_iip(du, u, p, t)
@@ -43,7 +43,7 @@
4343
end
4444
end
4545

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

@@ -163,7 +163,7 @@ end
163163
end
164164
end
165165

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

169169
f(u, p) = u .* u .- 2

0 commit comments

Comments
 (0)