This tutorial was generated from the file projects/Harvey2015/test/TestLoadBalanceSensitivityLiteratePaper.hpp at revision r23521.
Note that the code is given in full at the bottom of the page.
Test the load-balancing algorithm, and its sensitivity to the rebalancing frequency (Figure 6).#
This test suites demonstrates the use of the load-balancing algorithm
for parallel cell-based simulations.
This test starts a population from a seed of 25 cells, and allows
the population to grow for 100 hours. This test should be run on
progressively more processes to experience the speed-up
show in Figure 6(a).
Warning note: this test may take of the order of an hour to run (without the accompanying test in the suite) and
will not output to the screen during that time.
This test should be run in parallel,
so we enforce this condition with an exception.
The initial geometry is 25 cells in a ‘honeycomb’ configuration,
such that the cells are close to a stable equilibrium.
Using the cell locations configured above, we create a mesh (a collection of nodes).
that defines the geometry of the population.
Having created the geometry, we then assign one cell to each node in the
mesh. Each cell within the Chaste library has two states which must be
specified in the initial condition: the mutation state and the proliferative type.
Using WildTypeCellMutationState simply denotes that each cell has no defined
mutation, and behaves ’normally’.
Using TransitCellProliferativeType gives the cell a proliferative type such that
it can carry on dividing up to a maximum number of transit generations. For the purpose
of this test, it allows us to ensure that the cells keep dividing, and so the
population will keep growing.
The cells are given a cell cycle model that causes them to divide after
a fixed duration has elapsed.
Cells are configured to be born at some random time in the past,
so that cell division is not synchronised between all cells.
Set up a cell population from the geometry defined in the mesh and the set of cells created above.
Here we set a flag to make the population rebalance the distribution of
cells between processes during the simulation. To see the scaling
characteristics of this test without load-balancing, these two lines
should be removed or commented out.
Make a simulation object from the cell population, and set the end time to 99 hours,
this allows us to reset the timers and measure the speed-up in the final hour
of simulation.
Set output directory
This folder is to be found relative to CHASTE_TEST_OUTPUT which by default is
/tmp/$USER/testoutput
Create a force law and pass it to the OffLatticeSimulation.
We first solve the system up to 99 hours.
And then reset the timers to measure the final hour.
This test starts a population from a seed of 25 cells, and allows
the population to grow for 100 hours. The entire simulation is
run for different values of the load balancing frequency, which
is the rate at which the distribution of cells is rebalanced between
each of the processes.
Some post-processing is required to produce the data for plot in Figure 6c.
Warning note: each iteration of the main “rebalancing_frequency” loop may take of the order of 30 minutes to run (without the accompanying test in the suite)
as can be seen from the vertical axis of Figure 6c. This test will output intermittently and that output may well be buffered.
This test should be run in parallel,
so we enforce this condition with an exception.
Figure 6c was generated using 8 processes.
We run the test for rebalancing frequencies from every 10 time-steps,
up to every 100,000 time-steps.
We multiply by 5 or 2 on alternating iterations - see bottom of loop.
Print the rebalancing frequency for reference in final results.
The initial geometry 25 cells in a ‘honeycomb’ configuration,
such that the cells are close to a stable equilibrium.
Using the cell locations configured above, we create a mesh (a collection of nodes).
that defines the geometry of the population.
Having created the geometry, we then assign one cell to each node in the
mesh.
See the previous test for a brief overview of the states assigned to cells.
The cells are given a cell cycle model that causes them to divide after
a fixed duration has elapsed.
Cells are configured to be born at some random time in the past,
so that cell division is not synchronised between all cells.
Set up a cell population from the geometry defined in the mesh, and the set of cells.
Make a simulation object from the cell population, and set the end time to 99 hours,
this allows us to reset the timers and measure the speed-up in the final hour
of simulation.
Set output directory
This folder is to be found relative to CHASTE_TEST_OUTPUT which by default is
/tmp/$USER/testoutput
Create a force law and pass it to the OffLatticeSimulation.
We first solve the system up to 99 hours.
Report, and then reset the timers to measure the final hour.