Skip to content

Commit b10df4b

Browse files
authored
Add more tests for the option warm-start (#961)
* Add more tests for the option warm-start * Fix breakage tests (#4) * Fix breakage tests * Update .github/workflows/Breakage.yml
1 parent 52c1619 commit b10df4b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+532
-318
lines changed

.github/workflows/Breakage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ jobs:
160160
done >> summary.md
161161
162162
- name: PR comment with file
163-
uses: actions/github-script@v6
163+
uses: actions/github-script@main
164164
with:
165165
github-token: ${{ secrets.GITHUB_TOKEN }}
166166
script: |

src/bicgstab.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ kwargs_bicgstab = (:c, :M, :N, :ldiv, :atol, :rtol, :itmax, :timemax, :verbose,
171171
stats.niter = 0
172172
stats.solved, stats.inconsistent = true, false
173173
stats.timer = start_time |> ktimer
174-
stats.status = "x = 0 is a zero-residual solution"
174+
stats.status = "x is a zero-residual solution"
175+
warm_start && kaxpy!(n, one(FC), Δx, x)
175176
solver.warm_start = false
176177
return solver
177178
end
@@ -189,6 +190,7 @@ kwargs_bicgstab = (:c, :M, :N, :ldiv, :atol, :rtol, :itmax, :timemax, :verbose,
189190
stats.solved, stats.inconsistent = false, false
190191
stats.timer = start_time |> ktimer
191192
stats.status = "Breakdown bᴴc = 0"
193+
warm_start && kaxpy!(n, one(FC), Δx, x)
192194
solver.warm_start = false
193195
return solver
194196
end

src/bilq.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ kwargs_bilq = (:c, :transfer_to_bicg, :M, :N, :ldiv, :atol, :rtol, :itmax, :time
165165
stats.solved = true
166166
stats.inconsistent = false
167167
stats.timer = start_time |> ktimer
168-
stats.status = "x = 0 is a zero-residual solution"
168+
stats.status = "x is a zero-residual solution"
169+
warm_start && kaxpy!(n, one(FC), Δx, x)
169170
solver.warm_start = false
170171
return solver
171172
end
@@ -181,6 +182,7 @@ kwargs_bilq = (:c, :transfer_to_bicg, :M, :N, :ldiv, :atol, :rtol, :itmax, :time
181182
stats.inconsistent = false
182183
stats.timer = start_time |> ktimer
183184
stats.status = "Breakdown bᴴc = 0"
185+
warm_start && kaxpy!(n, one(FC), Δx, x)
184186
solver.warm_start = false
185187
return solver
186188
end

src/bilqr.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ kwargs_bilqr = (:transfer_to_bicg, :atol, :rtol, :itmax, :timemax, :verbose, :hi
168168
stats.solved_dual = false
169169
stats.timer = start_time |> ktimer
170170
stats.status = "Breakdown bᴴc = 0"
171+
warm_start && kaxpy!(n, one(FC), Δx, x)
172+
warm_start && kaxpy!(n, one(FC), Δy, t)
171173
solver.warm_start = false
172174
return solver
173175
end

src/car.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ kwargs_car = (:M, :ldiv, :atol, :rtol, :itmax, :timemax, :verbose, :history, :ca
165165
stats.niter = 0
166166
stats.solved, stats.inconsistent = true, false
167167
stats.timer = start_time |> ktimer
168-
stats.status = "x = 0 is a zero-residual solution"
168+
stats.status = "x is a zero-residual solution"
169+
warm_start && kaxpy!(n, one(FC), Δx, x)
169170
solver.warm_start = false
170171
return solver
171172
end

src/cg.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ kwargs_cg = (:M, :ldiv, :radius, :linesearch, :atol, :rtol, :itmax, :timemax, :v
149149
stats.niter = 0
150150
stats.solved, stats.inconsistent = true, false
151151
stats.timer = start_time |> ktimer
152-
stats.status = "x = 0 is a zero-residual solution"
152+
stats.status = "x is a zero-residual solution"
153+
warm_start && kaxpy!(n, one(FC), Δx, x)
153154
solver.warm_start = false
154155
return solver
155156
end

src/cg_lanczos.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ kwargs_cg_lanczos = (:M, :ldiv, :check_curvature, :atol, :rtol, :itmax, :timemax
148148
stats.Anorm = zero(T)
149149
stats.indefinite = false
150150
stats.timer = start_time |> ktimer
151-
stats.status = "x = 0 is a zero-residual solution"
151+
stats.status = "x is a zero-residual solution"
152+
warm_start && kaxpy!(n, one(FC), Δx, x)
152153
solver.warm_start = false
153154
return solver
154155
end

src/cg_lanczos_shift.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ kwargs_cg_lanczos_shift = (:M, :ldiv, :check_curvature, :atol, :rtol, :itmax, :t
149149
stats.niter = 0
150150
stats.solved = true
151151
stats.timer = start_time |> ktimer
152-
stats.status = "x = 0 is a zero-residual solution"
152+
stats.status = "x is a zero-residual solution"
153153
return solver
154154
end
155155

src/cgls.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ kwargs_cgls = (:M, :ldiv, :radius, :λ, :atol, :rtol, :itmax, :timemax, :verbose
153153
stats.niter = 0
154154
stats.solved, stats.inconsistent = true, false
155155
stats.timer = start_time |> ktimer
156-
stats.status = "x = 0 is a zero-residual solution"
156+
stats.status = "x is a zero-residual solution"
157157
history && push!(rNorms, zero(T))
158158
history && push!(ArNorms, zero(T))
159159
return solver

src/cgls_lanczos_shift.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ kwargs_cgls_lanczos_shift = (:M, :ldiv, :atol, :rtol, :itmax, :timemax, :verbose
150150
stats.niter = 0
151151
stats.solved = true
152152
stats.timer = start_time |> ktimer
153-
stats.status = "x = 0 is a zero-residual solution"
153+
stats.status = "x is a zero-residual solution"
154154
return solver
155155
end
156156

0 commit comments

Comments
 (0)