Skip to content

Commit

Permalink
tests: Merge common tests together
Browse files Browse the repository at this point in the history
  • Loading branch information
jngrad committed May 25, 2022
1 parent f4c3783 commit 7450767
Show file tree
Hide file tree
Showing 10 changed files with 180 additions and 354 deletions.
15 changes: 4 additions & 11 deletions testsuite/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ python_test(FILE dds-and-bh-gpu.py MAX_NUM_PROC 4 LABELS gpu)
python_test(FILE electrostaticInteractions.py MAX_NUM_PROC 2)
python_test(FILE engine_langevin.py MAX_NUM_PROC 4)
python_test(FILE engine_lb.py MAX_NUM_PROC 2 LABELS gpu)
python_test(FILE engine_lb_hybrid.py MAX_NUM_PROC 2 LABELS gpu)
python_test(FILE engine_lb_hybrid.py MAX_NUM_PROC 1 LABELS gpu SUFFIX 1_core)
python_test(FILE engine_lb_nsquare.py MAX_NUM_PROC 1 LABELS gpu)
python_test(FILE engine_lb.py MAX_NUM_PROC 1 LABELS gpu SUFFIX n_square)
python_test(FILE icc.py MAX_NUM_PROC 4)
python_test(FILE mass-and-rinertia_per_particle.py MAX_NUM_PROC 2 LABELS long)
python_test(FILE integrate.py MAX_NUM_PROC 4)
Expand Down Expand Up @@ -194,10 +192,7 @@ python_test(FILE dipolar_interface.py MAX_NUM_PROC 1 LABELS gpu)
python_test(FILE dipolar_mpi_exceptions.py MAX_NUM_PROC 2)
python_test(FILE lb.py MAX_NUM_PROC 2 LABELS gpu)
python_test(FILE lb_stats.py MAX_NUM_PROC 2 LABELS gpu long)
python_test(FILE lb_stats_hybrid.py MAX_NUM_PROC 2 LABELS gpu long)
python_test(FILE lb_stats_hybrid.py MAX_NUM_PROC 1 LABELS gpu long SUFFIX
1_core)
python_test(FILE lb_stats_nsquare.py MAX_NUM_PROC 1 LABELS gpu long)
python_test(FILE lb_stats.py MAX_NUM_PROC 1 LABELS gpu long SUFFIX n_square)
python_test(FILE lb_vtk.py MAX_NUM_PROC 2 LABELS gpu)
python_test(FILE force_cap.py MAX_NUM_PROC 2)
python_test(FILE dpd.py MAX_NUM_PROC 4)
Expand Down Expand Up @@ -257,10 +252,8 @@ python_test(FILE lb_shear.py MAX_NUM_PROC 2 LABELS gpu)
python_test(FILE lb_thermostat.py MAX_NUM_PROC 2 LABELS gpu)
python_test(FILE lb_buoyancy_force.py MAX_NUM_PROC 4 LABELS gpu)
python_test(FILE lb_momentum_conservation.py MAX_NUM_PROC 4 LABELS gpu)
python_test(FILE lb_momentum_conservation_hybrid.py MAX_NUM_PROC 4 LABELS gpu)
python_test(FILE lb_momentum_conservation_hybrid.py MAX_NUM_PROC 1 LABELS gpu
SUFFIX 1_core)
python_test(FILE lb_momentum_conservation_nsquare.py MAX_NUM_PROC 1 LABELS gpu)
python_test(FILE lb_momentum_conservation.py MAX_NUM_PROC 1 LABELS gpu SUFFIX
n_square)
python_test(FILE p3m_electrostatic_pressure.py MAX_NUM_PROC 2)
python_test(FILE sigint.py DEPENDENCIES sigint_child.py MAX_NUM_PROC 1)
python_test(FILE lb_density.py MAX_NUM_PROC 1)
Expand Down
61 changes: 61 additions & 0 deletions testsuite/python/engine_lb.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,66 @@ def set_cellsystem(self):
self.system.cell_system.set_regular_decomposition()


@ut.skipIf(SwimmerTest.n_nodes > 1,
"LB with N-square only works on 1 MPI rank")
@utx.skipIfMissingFeatures(["ENGINE", "ROTATIONAL_INERTIA", "MASS"])
class SwimmerTestNSquareCPU(SwimmerTest, ut.TestCase):

lb_class = espressomd.lb.LBFluid
tol = 1e-10

def set_cellsystem(self):
self.system.cell_system.set_n_square()


@utx.skipIfMissingGPU()
@utx.skipIfMissingFeatures(["ENGINE", "ROTATIONAL_INERTIA", "MASS"])
class SwimmerTestNSquareGPU(SwimmerTest, ut.TestCase):

lb_class = espressomd.lb.LBFluidGPU
tol = 1e-5

def set_cellsystem(self):
self.system.cell_system.set_n_square()


@ut.skipIf(SwimmerTest.n_nodes > 1,
"LB with N-square only works on 1 MPI rank")
@utx.skipIfMissingFeatures(["ENGINE", "ROTATIONAL_INERTIA", "MASS"])
class SwimmerTestHybrid0CPU(SwimmerTest, ut.TestCase):

lb_class = espressomd.lb.LBFluid
tol = 1e-10

def set_cellsystem(self):
self.system.cell_system.set_hybrid_decomposition(
n_square_types={0}, cutoff_regular=1)


@ut.skipIf(SwimmerTest.n_nodes > 1,
"LB with N-square only works on 1 MPI rank")
@utx.skipIfMissingFeatures(["ENGINE", "ROTATIONAL_INERTIA", "MASS"])
class SwimmerTestHybrid1CPU(SwimmerTest, ut.TestCase):

lb_class = espressomd.lb.LBFluid
tol = 1e-10

def set_cellsystem(self):
self.system.cell_system.set_hybrid_decomposition(
n_square_types={1}, cutoff_regular=1)


@utx.skipIfMissingGPU()
@utx.skipIfMissingFeatures(["ENGINE", "ROTATIONAL_INERTIA", "MASS"])
class SwimmerTestHybrid0GPU(SwimmerTest, ut.TestCase):

lb_class = espressomd.lb.LBFluidGPU
tol = 1e-5

def set_cellsystem(self):
self.system.cell_system.set_hybrid_decomposition(
n_square_types={0}, cutoff_regular=1)


if __name__ == "__main__":
ut.main()
77 changes: 0 additions & 77 deletions testsuite/python/engine_lb_hybrid.py

This file was deleted.

49 changes: 0 additions & 49 deletions testsuite/python/engine_lb_nsquare.py

This file was deleted.

75 changes: 71 additions & 4 deletions testsuite/python/lb_momentum_conservation.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,90 @@ def test(self):


@utx.skipIfMissingGPU()
@utx.skipIfMissingFeatures(['EXTERNAL_FORCES'])
class TestLBGPUMomentumConservation(Momentum, ut.TestCase):
@utx.skipIfMissingFeatures(["EXTERNAL_FORCES"])
class TestRegularLBGPU(Momentum, ut.TestCase):

lb_class = espressomd.lb.LBFluidGPU

def set_cellsystem(self):
self.system.cell_system.set_regular_decomposition()


@utx.skipIfMissingFeatures(['EXTERNAL_FORCES'])
class TestLBCPUMomentumConservation(Momentum, ut.TestCase):
@utx.skipIfMissingFeatures(["EXTERNAL_FORCES"])
class TestRegularLBCPU(Momentum, ut.TestCase):

lb_class = espressomd.lb.LBFluid

def set_cellsystem(self):
self.system.cell_system.set_regular_decomposition()


@utx.skipIfMissingGPU()
@utx.skipIfMissingFeatures(["EXTERNAL_FORCES"])
class TestNSquareLBGPU(Momentum, ut.TestCase):

lb_class = espressomd.lb.LBFluidGPU

def set_cellsystem(self):
self.system.cell_system.set_n_square()


@ut.skipIf(Momentum.n_nodes > 1,
"LB with N-square only works on 1 MPI rank")
@utx.skipIfMissingFeatures(["EXTERNAL_FORCES"])
class TestNSquareLBCPU(Momentum, ut.TestCase):

lb_class = espressomd.lb.LBFluid

def set_cellsystem(self):
self.system.cell_system.set_n_square()


@utx.skipIfMissingGPU()
@utx.skipIfMissingFeatures(["EXTERNAL_FORCES"])
class TestHybrid0LBGPU(Momentum, ut.TestCase):

lb_class = espressomd.lb.LBFluidGPU

def set_cellsystem(self):
self.system.cell_system.set_hybrid_decomposition(
n_square_types={0}, cutoff_regular=1)


@utx.skipIfMissingGPU()
@utx.skipIfMissingFeatures(["EXTERNAL_FORCES"])
class TestHybrid1LBGPU(Momentum, ut.TestCase):

lb_class = espressomd.lb.LBFluidGPU

def set_cellsystem(self):
self.system.cell_system.set_hybrid_decomposition(
n_square_types={1}, cutoff_regular=1)


@ut.skipIf(Momentum.n_nodes > 1,
"LB with N-square only works on 1 MPI rank")
@utx.skipIfMissingFeatures(["EXTERNAL_FORCES"])
class TestHybrid0LBCPU(Momentum, ut.TestCase):

lb_class = espressomd.lb.LBFluid

def set_cellsystem(self):
self.system.cell_system.set_hybrid_decomposition(
n_square_types={0}, cutoff_regular=1)


@ut.skipIf(Momentum.n_nodes > 1,
"LB with N-square only works on 1 MPI rank")
@utx.skipIfMissingFeatures(["EXTERNAL_FORCES"])
class TestHybrid1LBCPU(Momentum, ut.TestCase):

lb_class = espressomd.lb.LBFluid

def set_cellsystem(self):
self.system.cell_system.set_hybrid_decomposition(
n_square_types={1}, cutoff_regular=1)


if __name__ == "__main__":
ut.main()
72 changes: 0 additions & 72 deletions testsuite/python/lb_momentum_conservation_hybrid.py

This file was deleted.

Loading

0 comments on commit 7450767

Please sign in to comment.