Skip to content

Commit

Permalink
Remove 1-core restriction for NSquare and HybridDecomposition + LB. (e…
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored and jngrad committed Mar 2, 2023
1 parent 80608de commit a3ca759
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 38 deletions.
7 changes: 0 additions & 7 deletions src/core/grid_based_algorithms/lb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -616,13 +616,6 @@ void lb_sanity_checks(const LB_Parameters &lb_parameters) {
if (lb_parameters.viscosity <= 0.0) {
runtimeErrorMsg() << "Lattice Boltzmann fluid viscosity not set";
}
if (local_geo.cell_structure_type() !=
CellStructureType::CELL_STRUCTURE_REGULAR) {
if (n_nodes > 1) {
runtimeErrorMsg() << "LB only works with regular decomposition, "
"if using more than one MPI node";
}
}
}

uint64_t lb_fluid_get_rng_state() {
Expand Down
9 changes: 0 additions & 9 deletions src/core/grid_based_algorithms/lb_particle_coupling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,6 @@ void lb_lbcoupling_calc_particle_lattice_ia(bool couple_virtual,
#endif
} else if (lattice_switch == ActiveLB::CPU) {
if (lb_particle_coupling.couple_to_md) {
bool using_regular_cell_structure =
(local_geo.cell_structure_type() ==
CellStructureType::CELL_STRUCTURE_REGULAR);
if (not using_regular_cell_structure) {
if (n_nodes > 1) {
throw std::runtime_error("LB only works with regular decomposition, "
"if using more than one MPI node");
}
}
switch (lb_lbinterpolation_get_interpolation_order()) {
case (InterpolationOrder::quadratic):
throw std::runtime_error("The non-linear interpolation scheme is not "
Expand Down
6 changes: 3 additions & 3 deletions testsuite/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ python_test(FILE dds-and-bh-gpu.py MAX_NUM_PROC 4 LABELS gpu)
python_test(FILE electrostatic_interactions.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.py MAX_NUM_PROC 1 LABELS gpu SUFFIX n_square)
python_test(FILE engine_lb.py MAX_NUM_PROC 1 LABELS gpu SUFFIX 1_core)
python_test(FILE icc.py MAX_NUM_PROC 4)
python_test(FILE icc_interface.py MAX_NUM_PROC 1 LABELS gpu)
python_test(FILE mass-and-rinertia_per_particle.py MAX_NUM_PROC 2 LABELS long)
Expand Down Expand Up @@ -219,7 +219,7 @@ python_test(FILE dipolar_interface.py MAX_NUM_PROC 2 LABELS gpu SUFFIX
python_test(FILE coulomb_interface.py MAX_NUM_PROC 2 LABELS gpu)
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.py MAX_NUM_PROC 1 LABELS gpu long SUFFIX n_square)
python_test(FILE lb_stats.py MAX_NUM_PROC 1 LABELS gpu long SUFFIX 1_core)
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 @@ -280,7 +280,7 @@ 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.py MAX_NUM_PROC 1 LABELS gpu SUFFIX
n_square)
1_core)
python_test(FILE p3m_electrostatic_pressure.py MAX_NUM_PROC 2 LABELS gpu)
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
7 changes: 0 additions & 7 deletions testsuite/python/engine_lb.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class SwimmerTest():
'kT': 0,
'tau': system.time_step}
gamma = 0.3
n_nodes = system.cell_system.get_state()['n_nodes']

def add_all_types_of_swimmers(
self,
Expand Down Expand Up @@ -152,8 +151,6 @@ 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):

Expand All @@ -175,8 +172,6 @@ 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):

Expand All @@ -188,8 +183,6 @@ def set_cellsystem(self):
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):

Expand Down
7 changes: 0 additions & 7 deletions testsuite/python/lb_momentum_conservation.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class Momentum(object):
system = espressomd.System(box_l=[BOX_SIZE] * 3)
system.time_step = TIME_STEP
system.cell_system.skin = 0.01
n_nodes = system.cell_system.get_state()['n_nodes']

def setUp(self):
self.set_cellsystem()
Expand Down Expand Up @@ -116,8 +115,6 @@ 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):

Expand Down Expand Up @@ -149,8 +146,6 @@ def set_cellsystem(self):
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):

Expand All @@ -161,8 +156,6 @@ def set_cellsystem(self):
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):

Expand Down
5 changes: 0 additions & 5 deletions testsuite/python/lb_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class TestLB:
system.time_step = 0.01
system.cell_system.skin = 1.0
dof = 3.
n_nodes = system.cell_system.get_state()['n_nodes']

def tearDown(self):
self.system.actors.clear()
Expand Down Expand Up @@ -164,8 +163,6 @@ def setUp(self):
self.params.update({"mom_prec": 1E-3, "mass_prec_per_node": 1E-5})


@ut.skipIf(TestLB.n_nodes > 1,
"LB with N-square only works on 1 MPI rank")
class TestNSquareLBCPU(TestLB, ut.TestCase):

def setUp(self):
Expand All @@ -185,8 +182,6 @@ def setUp(self):
self.params.update({"mom_prec": 1E-3, "mass_prec_per_node": 1E-5})


@ut.skipIf(TestLB.n_nodes > 1,
"LB with N-square only works on 1 MPI rank")
class TestHybrid0LBCPU(TestLB, ut.TestCase):

def setUp(self):
Expand Down

0 comments on commit a3ca759

Please sign in to comment.