Skip to content

Commit 7a31550

Browse files
committed
Relax test tolerances
1 parent 4989e9e commit 7a31550

8 files changed

Lines changed: 12 additions & 12 deletions

testsuite/python/elc_vs_analytic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class TestCPU(Test, ut.TestCase):
114114
class TestGPU(Test, ut.TestCase):
115115

116116
p3m_class = espressomd.electrostatics.P3MGPU
117-
rtol = 4e-6
117+
rtol = 5e-6
118118

119119

120120
if __name__ == "__main__":

testsuite/python/lb.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -852,8 +852,8 @@ class LBTestWalberlaSinglePrecisionCPU(LBTest, ut.TestCase):
852852
lb_class = espressomd.lb.LBFluidWalberla
853853
lb_lattice_class = espressomd.lb.LatticeWalberla
854854
lb_params = {"single_precision": True}
855-
atol = 1e-7
856-
rtol = 5e-5
855+
atol = 5e-6
856+
rtol = 2e-4
857857

858858

859859
@utx.skipIfMissingGPU()
@@ -872,7 +872,7 @@ class LBTestWalberlaSinglePrecisionGPU(LBTest, ut.TestCase):
872872
lb_class = espressomd.lb.LBFluidWalberlaGPU
873873
lb_lattice_class = espressomd.lb.LatticeWalberla
874874
lb_params = {"single_precision": True}
875-
atol = 1e-6
875+
atol = 5e-6
876876
rtol = 2e-4
877877

878878

@@ -894,7 +894,7 @@ class LBTestWalberlaSinglePrecisionBlocksCPU(LBTest, ut.TestCase):
894894
blocks_per_mpi_rank = [2, 2, 2]
895895
lb_params = {"single_precision": True,
896896
"blocks_per_mpi_rank": blocks_per_mpi_rank}
897-
atol = 1e-6
897+
atol = 5e-6
898898
rtol = 2e-4
899899

900900

testsuite/python/lb_electrohydrodynamics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def test(self):
7171

7272
system.integrator.run(steps=500)
7373

74-
np.testing.assert_allclose(v_term, np.copy(p.v), atol=5e-5)
74+
np.testing.assert_allclose(v_term, np.copy(p.v), atol=6e-5)
7575

7676

7777
if __name__ == "__main__":

testsuite/python/lb_lees_edwards_particle_coupling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def test_momentum_conservation(self):
328328
np.sum(lbf[:, :, :].last_applied_force, axis=(0, 1, 2))), atol=1E-9)
329329
current_mom = np.copy(system.analysis.linear_momentum())
330330
np.testing.assert_allclose(
331-
initial_mom[1:], current_mom[1:], atol=2.75E-7)
331+
initial_mom[1:], current_mom[1:], atol=1E-6)
332332

333333

334334
if __name__ == '__main__':

testsuite/python/lb_planar_couette.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def check_profile(self, u_getter, **kwargs):
107107
u_ref = analytical(pos, system.time - 1. + 1., lbf.kinematic_viscosity,
108108
shear_velocity, h, k_max)
109109
u_lbf = np.copy(u_getter(lbf).reshape([-1]))
110-
np.testing.assert_allclose(u_lbf, u_ref, atol=1e-4, rtol=0.)
110+
np.testing.assert_allclose(u_lbf, u_ref, atol=2e-4, rtol=0.)
111111

112112
def test_profile_xy(self):
113113
if "blocks_per_mpi_rank" in self.lb_params:

testsuite/python/oif_volume_conservation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def check_relaxation(self, **kwargs):
9090
bounds=([-np.inf, 0., -np.inf, 0.], 4 * [np.inf]))
9191
self.assertGreater(prefactor, 0.)
9292
self.assertAlmostEqual(diameter_final, diameter_init, delta=0.005)
93-
self.assertAlmostEqual(lam, 0.0325, delta=0.0001)
93+
self.assertAlmostEqual(lam, 325e-4, delta=5e-4)
9494
self.system.thermostat.turn_off()
9595
self.system.part.clear()
9696

testsuite/python/p3m_fft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def test_fft_plans(self):
103103
ref_energy = -75.871906
104104
p3m_energy = self.system.analysis.energy()['coulomb']
105105
self.system.electrostatics.clear()
106-
np.testing.assert_allclose(p3m_energy, ref_energy, rtol=1e-4)
106+
np.testing.assert_allclose(p3m_energy, ref_energy, rtol=1e-3)
107107

108108
@utx.skipIfMissingFeatures("DP3M")
109109
@ut.skipIf(n_nodes < 2 or n_nodes >= 8, "only runs for 2 <= n_nodes <= 7")

testsuite/python/p3m_madelung.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def test_infinite_ionic_wire(self):
215215

216216
def check():
217217
energy, p_scalar, p_tensor = self.get_normalized_obs_per_ion()
218-
np.testing.assert_allclose(energy, ref_energy, atol=0., rtol=5e-7)
218+
np.testing.assert_allclose(energy, ref_energy, atol=0., rtol=7e-7)
219219
np.testing.assert_allclose(p_scalar, np.trace(ref_pressure) / 3.,
220220
atol=1e-12, rtol=1e-6)
221221
np.testing.assert_allclose(p_tensor, ref_pressure, atol=1e-12,
@@ -291,7 +291,7 @@ def test_infinite_ionic_cube(self):
291291

292292
def check():
293293
energy, p_scalar, p_tensor = self.get_normalized_obs_per_ion()
294-
np.testing.assert_allclose(energy, ref_energy, atol=0., rtol=1e-6)
294+
np.testing.assert_allclose(energy, ref_energy, atol=0., rtol=2e-6)
295295
np.testing.assert_allclose(p_scalar, np.trace(ref_pressure) / 3.,
296296
atol=1e-12, rtol=5e-6)
297297
np.testing.assert_allclose(p_tensor, ref_pressure, atol=5e-9,

0 commit comments

Comments
 (0)