ls1-MarDyn
ls1-MarDyn molecular dynamics code
Classes | Public Member Functions | Static Public Member Functions | List of all members
VectorizationTuner Class Reference

VectorizationTuner class. More...

#include <VectorizationTuner.h>

Inheritance diagram for VectorizationTuner:
PluginBase

Public Member Functions

 VectorizationTuner ()=default
 Constructor of VectorizationTuner for the xml input mode.
 
 ~VectorizationTuner () override=default
 
void init (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain) override
 Method init will be called at the begin of the simulation. More...
 
void readXML (XMLfileUnits &xmlconfig) override
 Read in XML configuration for the VectorizationTuner. More...
 
void endStep (ParticleContainer *, DomainDecompBase *, Domain *, unsigned long) override
 Method endStep will be called at the end of each time step. More...
 
void finish (ParticleContainer *, DomainDecompBase *, Domain *) override
 Method finish will be called at the end of the simulation. More...
 
std::string getPluginName () override
 return the name of the plugin More...
 
void tune (std::vector< Component > &ComponentList, TunerLoad &times, std::vector< int > particleNums, bool generateNewFiles, bool useExistingFiles, bool allowMPIReduce)
 
- Public Member Functions inherited from PluginBase
 PluginBase ()
 Subclasses should use their constructur to pass parameters (e.g. filenames)
 
virtual void beforeEventNewTimestep (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
 Method will be called first thing in a new timestep. More...
 
virtual void beforeForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
 Method beforeForces will be called before forcefields have been applied no alterations w.r.t. Forces shall be made here. More...
 
virtual void siteWiseForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
 Method siteWiseForces will be called before forcefields have been applied alterations to sitewise forces and fullMolecule forces can be made here. More...
 
virtual void afterForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
 Method afterForces will be called after forcefields have been applied no sitewise Forces can be applied here. More...
 
virtual void registerCallbacks (std::map< std::string, FunctionWrapper > &callbackMap)
 
virtual void accessAllCallbacks (const std::map< std::string, FunctionWrapper > &callbackMap)
 

Static Public Member Functions

static PluginBasecreateInstance ()
 

Detailed Description

VectorizationTuner class.

This class is used to get detailed information about the performance of the VectorizedCellProcessor. For different scenarios, the performance is evaluated and output. Later this could be used to actually use this class as a tuner, i.e. to use the best possible vectorization method for the actual computation.

Constructor & Destructor Documentation

◆ ~VectorizationTuner()

VectorizationTuner::~VectorizationTuner ( )
overridedefault

Destructor of the VectorizationTuner class.

Member Function Documentation

◆ endStep()

void VectorizationTuner::endStep ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain,
unsigned long  simstep 
)
inlineoverridevirtual

Method endStep will be called at the end of each time step.

This method will be called every time step passing the simstep as an additional parameter. It can be used e.g. to write per time step data to a file or perform additional computations.

Parameters
particleContainerparticle container storing the (local) molecules
domainDecompdomain decomposition in use
domain

Implements PluginBase.

◆ finish()

void VectorizationTuner::finish ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain 
)
overridevirtual

Method finish will be called at the end of the simulation.

This method will be called once at the end of the simulation. It can be used e.g. to closing output files or writing final statistics.

Parameters
particleContainerparticle container storing the (local) molecules
domainDecompdomain decomposition in use
domain

Implements PluginBase.

◆ getPluginName()

std::string VectorizationTuner::getPluginName ( )
inlineoverridevirtual

return the name of the plugin

Implements PluginBase.

◆ init()

void VectorizationTuner::init ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain 
)
overridevirtual

Method init will be called at the begin of the simulation.

This method will be called once at the begin of the simulation just right before the main time step loop. It can be used e.g. to open output files or initialize statistics.

Parameters
particleContainerparticle container storing the (local) molecules
domainDecompdomain decomposition in use
domain

Implements PluginBase.

◆ readXML()

void VectorizationTuner::readXML ( XMLfileUnits xmlconfig)
overridevirtual

Read in XML configuration for the VectorizationTuner.

The following xml object structure is handled by this method:

<plugin type="VectorizationTuner">
<outputprefix>STRING</outputprefix>
<minmoleculecnt>INTEGER</minmoleculecnt>
<maxmoleculecnt>INTEGER</maxmoleculecnt>
<numRepetitionsMax>INTEGER</numRepetitionsMax>
<moleculecntincreasetype>linear OR exponential OR both</moleculecntincreasetype> <!--default: both-->
<mode>stdout OR file</mode> <!--print to stdout or file-->
</plugin>
Todo:
This is a very improper way to do this - user does not know what the int values stand for

Implements PluginBase.

◆ tune()

void VectorizationTuner::tune ( std::vector< Component > &  ComponentList,
TunerLoad times,
std::vector< int >  particleNums,
bool  generateNewFiles,
bool  useExistingFiles,
bool  allowMPIReduce 
)

used in the KDDecomposition to fill the TunerTimes object

particleNums stores the number of particles until which the tuner should measure the values

useExistingFiles denotes whether the tuner is allowed to read the tuner values from existing tuner files (if they exist, otherwise they are still calculated)

generateNewFiles denotes whether the tuner should write his measured values to files, which also overwrites old files. If both are true and tuner files are available then the values that were read are written again,


The documentation for this class was generated from the following files: