Skip to content

Commit 3251957

Browse files
committed
minor: relax rtol in test_solver
1 parent 1a9549a commit 3251957

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_solver.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def test_cg(par):
127127
x0 = None
128128
y1 = BDiag * x_global
129129
xinv1 = pylops.cg(BDiag, y1, x0=x0, niter=par["nx"], tol=1e-5, show=True)[0]
130-
assert_allclose(xinv_array, xinv1, rtol=1e-14)
130+
assert_allclose(xinv_array, xinv1, rtol=1e-12)
131131

132132

133133
@pytest.mark.mpi(min_size=2)
@@ -175,7 +175,7 @@ def test_cgls(par):
175175
x0 = None
176176
y1 = BDiag * x_global
177177
xinv1 = pylops.cgls(BDiag, y1, x0=x0, niter=par["nx"], tol=1e-5, show=True)[0]
178-
assert_allclose(xinv_array, xinv1, rtol=1e-14)
178+
assert_allclose(xinv_array, xinv1, rtol=1e-12)
179179

180180

181181
@pytest.mark.mpi(min_size=2)
@@ -222,7 +222,7 @@ def test_cgls_broadcastdata(par):
222222
x0 = None
223223
y1 = Hstack @ x_global
224224
xinv1 = pylops.cgls(Hstack, y1, x0=x0, niter=par["nx"], tol=1e-5, show=True)[0]
225-
assert_allclose(xinv_array, xinv1, rtol=1e-14)
225+
assert_allclose(xinv_array, xinv1, rtol=1e-12)
226226

227227

228228
@pytest.mark.mpi(min_size=2)
@@ -272,7 +272,7 @@ def test_cgls_broadcastmodel(par):
272272
x0 = None
273273
y1 = Vstack @ x_global
274274
xinv1 = pylops.cgls(Vstack, y1, x0=x0, niter=par["nx"], tol=1e-5, show=True)[0]
275-
assert_allclose(xinv_array, xinv1, rtol=1e-13)
275+
assert_allclose(xinv_array, xinv1, rtol=1e-12)
276276

277277

278278
@pytest.mark.mpi(min_size=2)
@@ -336,7 +336,7 @@ def test_cg_stacked(par):
336336
x0 = None
337337
y1 = StackedBDiag * x_global
338338
xinv1 = pylops.cg(StackedBDiag, y1, x0=x0, niter=par["nx"], tol=1e-5, show=True)[0]
339-
assert_allclose(xinv_array, xinv1, rtol=1e-14)
339+
assert_allclose(xinv_array, xinv1, rtol=1e-12)
340340

341341

342342
@pytest.mark.mpi(min_size=2)
@@ -402,4 +402,4 @@ def test_cgls_stacked(par):
402402
x0 = None
403403
y1 = StackedBDiag * x_global
404404
xinv1 = pylops.cgls(StackedBDiag, y1, x0=x0, niter=par["nx"], tol=1e-5, show=True)[0]
405-
assert_allclose(xinv_array, xinv1, rtol=1e-13)
405+
assert_allclose(xinv_array, xinv1, rtol=1e-12)

0 commit comments

Comments
 (0)