1#ifndef SRC_IO_VECTORIZATIONTUNER_H_
2#define SRC_IO_VECTORIZATIONTUNER_H_
5enum MoleculeCntIncreaseTypeEnum{
15#include "particleContainer/adapter/CellProcessor.h"
17#include "plugins/PluginBase.h"
18#include "ensemble/EnsembleBase.h"
19#include "parallel/LoadCalc.h"
22#include "particleContainer/ParticleCellForwardDeclaration.h"
68 Domain * ,
unsigned long )
override {}
89 void tune(std::vector<Component>& ComponentList,
TunerLoad& times, std::vector<int> particleNums,
bool generateNewFiles,
bool useExistingFiles,
bool allowMPIReduce);
96 unsigned int _minMoleculeCnt{2};
99 unsigned int _maxMoleculeCnt{512};
102 MoleculeCntIncreaseTypeEnum _moleculeCntIncreaseType{both};
108 double _cutoffRadius{};
111 double _LJCutoffRadius{};
115 unsigned int _numRepetitionsMax{4000000};
118 static constexpr
double _cutoffRadiusBig{5.};
121 static constexpr
double _LJCutoffRadiusBig{5.};
124 std::unique_ptr<FlopCounter> _flopCounterBigRc;
127 std::unique_ptr<FlopCounter> _flopCounterNormalRc;
130 std::unique_ptr<FlopCounter> _flopCounterZeroRc;
150 void tune(std::vector<Component>& ComponentList);
161 void iterate(std::vector<Component>& ComponentList,
unsigned int numMols,
double& gflopsOwnBig,
double& gflopsPairBig,
double& gflopsOwnNormal,
double& gflopsPairNormalFace,
162 double& gflopsPairNormalEdge,
double& gflopsPairNormalCorner,
double& gflopsOwnZero,
double& gflopsPairZero);
164 void iteratePair (
unsigned int numRepetitions,
167 void iterateOwn (
unsigned int numRepetitions,
218 void moveMolecules(
double direction[3],
ParticleCell& cell);
242 void iterateOwn(
unsigned int numRepetitions,
245 void iteratePair(
unsigned int numRepetitions,
251 virtual ~~VTWriterI() =
default;
252 virtual void initWrite(
const std::string& outputPrefix,
double cutoffRadius,
double LJCutoffRadius,
253 double cutoffRadiusBig,
double LJCutoffRadiusBig)=0;
254 virtual void writeHeader(
const std::string& distributionTypeString)=0;
255 virtual void write(
unsigned int numMols,
double gflopsOwnBig,
double gflopsPairBig,
double gflopsOwnNormal,
256 double gflopsPairNormalFace,
double gflopsPairNormalEdge,
double gflopsPairNormalCorner,
257 double gflopsOwnZero,
double gflopsPairZero)=0;
258 virtual void close()=0;
263 class VTWriter:
public VTWriterI {
265 void initWrite(
const std::string& outputPrefix,
double cutoffRadius,
double LJCutoffRadius,
266 double cutoffRadiusBig,
double LJCutoffRadiusBig)
override;
267 void writeHeader(
const std::string& distributionTypeString)
override;
268 void write(
unsigned int numMols,
double gflopsOwnBig,
double gflopsPairBig,
double gflopsOwnNormal,
269 double gflopsPairNormalFace,
double gflopsPairNormalEdge,
double gflopsPairNormalCorner,
270 double gflopsOwnZero,
double gflopsPairZero)
override;
271 void close()
override;
276 class VTWriterStatistics:
public VTWriterI {
278 void initWrite(
const std::string& outputPrefix,
double cutoffRadius,
double LJCutoffRadius,
279 double cutoffRadiusBig,
double LJCutoffRadiusBig)
override;
280 void writeHeader(
const std::string& distributionTypeString)
override;
281 void write(
unsigned int numMols,
double gflopsOwnBig,
double gflopsPairBig,
double gflopsOwnNormal,
282 double gflopsPairNormalFace,
double gflopsPairNormalEdge,
double gflopsPairNormalCorner,
283 double gflopsOwnZero,
double gflopsPairZero)
override;
284 void close()
override;
289 std::unique_ptr<VTWriterI> vtWriter{
new VTWriter()};
A CellProcessor that produces Flop information.
Definition: CellProcessor.h:29
Class implementing molecules as rigid rotators consisting out of different interaction sites (LJcente...
Definition: Component.h:14
handle boundary region and multiple processes
Definition: DomainDecompBase.h:51
This class is used to read in the phasespace and to handle macroscopic values.
Definition: Domain.h:47
Definition: FlopCounter.h:60
FullParticleCell data structure. Renamed from ParticleCell.
Definition: FullParticleCell.h:49
This Interface is used to get access to particles and pairs of particles.
Definition: ParticleContainer.h:69
The PluginBase class provides the interface for any kind of output/plugin classes - called "(output) ...
Definition: PluginBase.h:47
Definition: LoadCalc.h:44
VectorizationTuner class.
Definition: VectorizationTuner.h:31
void tune(std::vector< Component > &ComponentList, TunerLoad ×, std::vector< int > particleNums, bool generateNewFiles, bool useExistingFiles, bool allowMPIReduce)
Definition: VectorizationTuner.cpp:243
void endStep(ParticleContainer *, DomainDecompBase *, Domain *, unsigned long) override
Method endStep will be called at the end of each time step.
Definition: VectorizationTuner.h:67
void init(ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) override
Method init will be called at the begin of the simulation.
Definition: VectorizationTuner.cpp:749
VectorizationTuner()=default
Constructor of VectorizationTuner for the xml input mode.
void finish(ParticleContainer *, DomainDecompBase *, Domain *) override
Method finish will be called at the end of the simulation.
Definition: VectorizationTuner.cpp:72
~VectorizationTuner() override=default
std::string getPluginName() override
return the name of the plugin
Definition: VectorizationTuner.h:75
void readXML(XMLfileUnits &xmlconfig) override
Read in XML configuration for the VectorizationTuner.
Definition: VectorizationTuner.cpp:28
XML file with unit attributes abstraction.
Definition: xmlfileUnits.h:25
::xsd::cxx::tree::name< char, token > name
C++ type corresponding to the Name XML Schema built-in type.
Definition: vtk-punstructured.h:288
::xsd::cxx::tree::time< char, simple_type > time
C++ type corresponding to the time XML Schema built-in type.
Definition: vtk-punstructured.h:438
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
Definition: vtk-punstructured.h:270