This class is able to gather and store important information for a tuning phase from a container and functor.
More...
#include <LiveInfo.h>
|
using | InfoType = std::variant< bool, double, size_t, ContainerOption, TraversalOption, LoadEstimatorOption, DataLayoutOption, Newton3Option > |
| The type of an info.
|
|
|
template<class Particle_T > |
void | gather (ContainerIterator< Particle_T, true, false > particleIter, size_t rebuildFrequency, size_t numOwnedParticles, std::array< double, 3 > boxMin, std::array< double, 3 > boxMax, double cutoff, double skin) |
| Gathers key statistics that define the computational profile of the simulation, in order to provide lower dimensional and human understandable inputs for the tuning strategies.
|
|
const auto & | get () const |
| Returns a map of all infos.
|
|
template<typename T > |
T | get (const std::string &key) const |
| Gets a single value from the infos that corresponds to the given string.
|
|
std::string | toString () const |
| Creates a string containing all live info gathered.
|
|
std::pair< std::string, std::string > | getCSVLine () const |
| Generate a csv representation containing all values from the toString() method.
|
|
This class is able to gather and store important information for a tuning phase from a container and functor.
Infos are identified by a string. Their type is InfoType.
◆ gather()
template<class Particle_T >
void autopas::LiveInfo::gather |
( |
ContainerIterator< Particle_T, true, false > |
particleIter, |
|
|
size_t |
rebuildFrequency, |
|
|
size_t |
numOwnedParticles, |
|
|
std::array< double, 3 > |
boxMin, |
|
|
std::array< double, 3 > |
boxMax, |
|
|
double |
cutoff, |
|
|
double |
skin |
|
) |
| |
|
inline |
Gathers key statistics that define the computational profile of the simulation, in order to provide lower dimensional and human understandable inputs for the tuning strategies.
A lot of the information is based on a couple of different spatial bin resolutions:
- cells: Bin dimensions are the same as cells in the Linked Cells container with CSF 1.
- particleDependentBins: Bin dimensions are designed such that the are approximately 10 particles per bin.
- blurredBins: The domain is divided equally into 3x3x3 "blurred" bins
- Note
- It is not clear how useful the statistics derived from the particleDependentBins are, as the "resolution" varies depending on the number of particles. E.g. Consider a sparse simulation with a "macroscopic" heterogeneity and a dense simulation with a "microscopic" heterogeneity but at a "macroscopic" level is rather homogeneous. These could have the same particleDependentBin homogeneity (relative std. dev. of bin counts) but would respond to traversals very differently. This could, however, provide a useful metric for homogeneity which is somewhat independent of particle density (e.g. could be useful for determining the best traversal with one statistic independently of what cell-size factor is chosen)
Currently, it provides: -— Bin Independent Statistics -—
- numOwnedParticles: The number of particles in the container that are marked as owned.
- numHaloParticles: The number of particles in the container that are marked as halo.
- cutoff: The configured cutoff radius.
- skin: The configured skin radius.
- domainSizeX: The size of the domain on the x-axis.
- domainSizeY: The size of the domain on the y-axis.
- domainSizeZ: The size of the domain on the z-axis.
- particleSize: The number of bytes one particle in AoS layout needs.
- threadCount: The number of OMP threads that can be used.
- rebuildFrequency: The current verlet-rebuild-frequency of the simulation. -— Cell Statistics -—
- numCells: The number of cell-bins in the domain.
- numEmptyCells: The number of cell-bins that are empty.
- minParticlesPerCell: The minimum number of particles in a cell-bin.
- maxParticlesPerCell: The maximum number of particles in a cell-bin.
- medianParticlesPerCell: The median number of particles per cell-bin.
- lowerQuartileParticlesPerCell: The lower quartile number of particles per cell-bin.
- upperQuartileParticlesPerCell: The upper quartile number of particles per cell-bin.
- meanParticlesPerCell: The average number of particles per cell-bin.
- particlesPerCellStdDev: The standard deviation in the number of particles per cell-bin.
- relativeParticlesPerCellStdDev: The, relative to the mean, standard deviation in the number of particles per cell-bin.
- estimatedNumNeighborInteractions: Rough estimation of number of neighbor interactions. Assumes that neighboring cell-bins contain roughly the same number of particles. Estimation does not work well if this is not the case. -— Particle Dependent Bin Statistics -—
- particleDependentBinMaxDensity: The maximum density of particles of a particle-dependent bin.
- particleDependentBinDensityStdDev: The standard deviation in the density of particles per particle-dependent bin. In earlier versions of AutoPas, this was referred to as "Homogeneity". -— Blurred Bin Statistics -—
- maxParticlesPerBlurredBin: The maximum number of particles in a blurred bin.
- minParticlesPerBlurredBin: The minimum number of particles in a blurred bin.
- medianParticlesPerBlurredBin: The median number of particles per blurred bin.
- lowerQuartileParticlesPerBlurredBin: The lower quartile number of particles per blurred bin.
- upperQuartileParticlesPerBlurredBin: The upper quartile number of particles per blurred bin.
- meanParticlesPerBlurredBin: The mean number of particles per blurred bin.
- particlesPerBlurredBinStdDev: The standard deviation in the number of particles per blurred bin.
- relativeParticlesPerBlurredBinStdDev: The, relative to the mean, standard deviation in the number of particles per blurred bin.
- Template Parameters
-
Particle_T | The type of particle the container stores. |
- Parameters
-
particleIter | Iterator to the first particle in the AutoPas container. |
rebuildFrequency | The current verlet rebuild frequency that is used in the simulation. |
numOwnedParticles | The number of owned particles in the container. |
boxMin | Lower left corner of (sub)domain. |
boxMax | Upper right corner of (sub)domain. |
cutoff | The cutoff. |
skin | The (Verlet) skin. |
◆ get() [1/2]
const auto & autopas::LiveInfo::get |
( |
| ) |
const |
|
inline |
Returns a map of all infos.
- Returns
- A map of all infos.
◆ get() [2/2]
template<typename T >
T autopas::LiveInfo::get |
( |
const std::string & |
key | ) |
const |
|
inline |
Gets a single value from the infos that corresponds to the given string.
- Template Parameters
-
- Parameters
-
key | string key for the infos map |
- Returns
◆ getCSVLine()
std::pair< std::string, std::string > autopas::LiveInfo::getCSVLine |
( |
| ) |
const |
|
inline |
Generate a csv representation containing all values from the toString() method.
Since the keys are not necessarily known in advance, this method generates a CSV header and a CSV line.
- Returns
- A pair of strings in the form of (header, line).
◆ toString()
std::string autopas::LiveInfo::toString |
( |
| ) |
const |
|
inline |
Creates a string containing all live info gathered.
- Returns
- A string containing all live info gathered.
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & |
out, |
|
|
const LiveInfo & |
info |
|
) |
| |
|
friend |
Stream operator to write the LiveInfo to a stream.
- Parameters
-
- Returns
◆ operator>>
std::istream & operator>> |
( |
std::istream & |
in, |
|
|
LiveInfo & |
info |
|
) |
| |
|
friend |
Stream operator to read the LiveInfo in from a stream.
- Parameters
-
- Returns
The documentation for this class was generated from the following file: