Skip to content

Commit

Permalink
Merge pull request #19 from ctkelley/main
Browse files Browse the repository at this point in the history
Update CI and termination criterion
  • Loading branch information
ctkelley authored Jun 13, 2024
2 parents 5628524 + 1d873a2 commit 27b6813
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
Binary file modified Publications_and_Presentations/MPArray.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/src/Details/Termination.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ We terminate the loop when
```math
\| r \| < \tau (\| b \| + \| A \| \| x \|)
```
where we use $\tau = 10 * eps(TW)$, where $eps(TW)$ is the working
where we use $\tau = 0.5 * eps(TW)$, where $eps(TW)$ is the working
precision floating
point machine epsilon. The problem with this criterion is
that IR can stagnate, especially for ill-conditioned problems, before
Expand Down
2 changes: 1 addition & 1 deletion src/Solvers/mpgeslir.jl
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ function mpgeslir(AF::MPFact, b; TR=Float16, reporting = false, verbose = true)
# the residual norms stagnate (res_old > .9 res_new)
#
(TW == TB) || error("inconsistent precisions; A and b must have same type")
tolf = eps(TR)*TR.(10.0)
tolf = eps(TR)*TR.(.5)
#
# Keep the records and accumulate the statistics.
#
Expand Down
2 changes: 1 addition & 1 deletion src/Solvers/mpkrir.jl
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function mpkrir(AF::MPKFact, b; reporting = false,
normtype = Inf
TB = eltype(b)
# remember that eps(TB) = 2 * unit roundoff
tolf = TB(10.0)*eps(TB)
tolf = TB(0.5)*eps(TB)
n = length(b)
onetb = TB(1.0)
bsc = copy(b)
Expand Down
2 changes: 1 addition & 1 deletion test/Greens/gtest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function greensHok(n = 31)
ok32 = (e32 < 1.e-13) && (l32 <= 4)
ok32 || println("GreensH fail at TF=Float64-32, $ok32, $e32, $l32")
(e16, l16) = gtestH(G; TF = Float16)
ok16 = (e16 < 1.e-14) && (l16 == 6)
ok16 = (e16 < 1.e-14) && (l16 <= 7)
ok16 || println("GreensH fail at TF=Float64-16")
(e3216, l3216) = gtestH(G; TF = Float16, TW = Float32)
ok3216 = (e3216 < 1.e-6) && (l3216 <= 4)
Expand Down
2 changes: 1 addition & 1 deletion test/Wilkinson/wilk_test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ mout = hires_sol(A, b; TF=Float16)
#
lres=length(mout.rhist)
ndel=norm(mout.sol - xe,Inf)
(alpha < 500.0) ? lt=6 : lt=8
(alpha < 500.0) ? lt=7 : lt=9
l2ok=(lres <= lt)
s2ok=(ndel < 1.e-10);
A2ok=l2ok && s1ok
Expand Down

0 comments on commit 27b6813

Please sign in to comment.