ls1-MarDyn
ls1-MarDyn molecular dynamics code
|
A CellProcessor that produces Flop information. More...
#include "CellProcessor.h"
#include <memory>
#include <vector>
#include <stddef.h>
#include <string>
#include <sstream>
#include "molecules/MoleculeForwardDeclaration.h"
Go to the source code of this file.
Classes | |
class | FlopCounter |
A CellProcessor that produces Flop information.
TODO: documentation severely outdated
The LJFlopCounter calculates the number of flops that are required to calculate the LJ force calculation for the given Molecules. Then it calls another CellProcessor and measures its runtime.
The output shows the flop counts for each of the parts of the LJ flop calculation, for the current iteration and accumulated over all iterations performed so far. It also prints the runtime of the child CellProcessor and calculates the flops per second for the ChildCellProcessor.
If you wish to exclude some parts of the calculation or change the flop counts for an individual part of the calculation, you have to sum up the specific flop counts manually and calculate the flops per second using the provided time.
If you wish to calculate the effective flops per second based on the total runtime of the simulation, including the traversal of the CellContainer and other things, you can run the simulation once with the LJFlopCounter, and once without, using the same CellProcessor and the same input for the actual calculation. Then you can take the flop counts and the runtime of the simulation without the LJFlopCounter and calculate the flops per second based on these.
The LJFlopCounter can also be used to find out how many of the checked MoleculePairs actually are inside the cutoff radius. Note that this only works for single centered molecules. For this you divide the flop counts for molecule distance calculation and center distance calculation by the weights for a single of these operations to acquire the number of such calculations done. The molecule distances give the number of Molecule pairs checked, the center distances provide the number of Molecule pairs that are close enough to each other.
The flop values for each operation are based on the unvectorized calculation in VectorizedLJCellProcessor. Details can be found for each value individually in the class documentation.