61 const AutoTunerInfo &autoTunerInfo,
unsigned int rebuildFrequency,
const std::string &outputSuffix);
170 std::tuple<double, double, double, long>
sampleEnergy();
186 void addMeasurement(
long sampleRebuild,
long sampleTraverseParticles,
bool neighborListRebuilt,
size_t iteration,
263 bool tuneConfiguration(
size_t currentIteration,
size_t tuningPhase,
bool isStartOfTuningPhase);
285 void handleEndOfTuningPhase(
size_t tuningPhase);
290 void selectBestConfiguration(
size_t tuningPhase);
296 size_t getCurrentNumSamples()
const;
305 [[nodiscard]] std::tuple<long, long, long> estimateRuntimeFromSamples()
const;
310 SelectorStrategyOption _selectorStrategy;
316 std::vector<std::unique_ptr<TuningStrategyInterface>> _tuningStrategies;
326 bool _useLOESSSmoothening;
332 bool _energyMeasurementPossible;
340 double _rebuildFrequency;
351 double _earlyStoppingFactor;
356 bool _needsDomainSimilarityStatistics;
366 std::vector<double> _pdBinDensityStdDevOfLastTenIterations{};
371 std::vector<double> _pdBinMaxDensityOfLastTenIterations{};
379 std::vector<long> _samplesTraverseInteractions;
385 std::vector<long> _samplesRebuildingNeighborLists{};
390 EvidenceCollection _evidenceCollection{};
403 std::vector<Configuration> _configQueue;
408 TuningResultLogger _tuningResultLogger;
413 TuningDataLogger _tuningDataLogger;
418 utils::EnergySensor _energySensor;
423 bool _isTuning{
false};
430 bool _endOfTuningPhase{
false};
436 bool _forceRetune{
false};
442 bool _earlyStoppingOfResampling{
false};
This class manages all logic related to the auto tuning mechanic.
Definition: AutoTuner.h:40
std::tuple< double, double, double, long > sampleEnergy()
Take an energy measurement.
Definition: AutoTuner.cpp:349
bool searchSpaceIsEmpty() const
Indicator function whether the search space has no configurations in it.
Definition: AutoTuner.cpp:75
bool tuneConfiguration(size_t currentIteration, size_t tuningPhase, bool isStartOfTuningPhase)
Tune available algorithm configurations.
Definition: AutoTuner.cpp:85
Configuration rejectConfig(const Configuration &rejectedConfig, bool indefinitely, size_t tuningPhase)
Tell the tuner that the given config is not applicable.
Definition: AutoTuner.cpp:211
void addDomainSimilarityStatistics(double pdBinDensityStdDev, double pdBinMaxDensity)
Adds domain similarity statistics to a vector of measurements, which can be smoothed for use in MPI T...
Definition: AutoTuner.cpp:58
AutoTuner & operator=(AutoTuner &&other) noexcept
Move assignment operator.
Definition: AutoTuner.cpp:51
void addMeasurement(long sampleRebuild, long sampleTraverseParticles, bool neighborListRebuilt, size_t iteration, size_t tuningPhase)
Save the runtime of a given traversal.
Definition: AutoTuner.cpp:250
void logTuningResult(long tuningTime, size_t currentIteration) const
After a tuning phase has finished, write the result to a file.
Definition: AutoTuner.cpp:63
bool needsDomainSimilarityStatistics() const
Returns true if the AutoTuner needs domain similarity statistics.
Definition: AutoTuner.cpp:373
std::set< Configuration > SearchSpaceType
Type for the search space holding all possible configurations.
Definition: AutoTuner.h:49
void checkEarlyStoppingCondition(size_t tuningPhase)
Checks whether the current configuration performs so poorly that it shouldn't be resampled further wi...
Definition: AutoTuner.cpp:429
bool willRebuildNeighborLists() const
Returns whether rebuildNeighborLists() should be triggered in the next iteration.
Definition: AutoTuner.cpp:334
bool resetEnergy()
Reset the rapl meter to prepare for a new measurement.
Definition: AutoTuner.cpp:347
const std::vector< std::unique_ptr< TuningStrategyInterface > > & getTuningStrategies() const
Get the list of tuning strategies that are used.
Definition: AutoTuner.cpp:377
std::vector< std::unique_ptr< TuningStrategyInterface > > TuningStrategiesListType
Type for the member holding all tuning strategies.
Definition: AutoTuner.h:45
bool inLastTuningIteration() const
Indicates if the tuner is in the last iteration of the tuning phase.
Definition: AutoTuner.cpp:421
~AutoTuner()
Default destructor defined in .cpp as it's too big to be inlined.
bool needsLiveInfo() const
Returns true if the AutoTuner needs live info.
Definition: AutoTuner.cpp:371
const std::vector< Configuration > & getConfigQueue() const
Getter for the current queue of configurations.
Definition: AutoTuner.cpp:375
bool initEnergy()
Initialize pmt sensor.
Definition: AutoTuner.cpp:342
bool canMeasureEnergy() const
Returns whether the AutoTuner can take energy measurements.
Definition: AutoTuner.cpp:425
bool inTuningPhase() const
Indicate if the tuner considers itself currently in a tuning phase according to its internal counters...
Definition: AutoTuner.cpp:415
const Configuration & getCurrentConfig() const
Get the currently selected configuration.
Definition: AutoTuner.cpp:203
const EvidenceCollection & getEvidenceCollection() const
Getter for the internal evidence collection.
Definition: AutoTuner.cpp:423
const TuningMetricOption & getTuningMetric() const
Getter for the primary metric for tuning.
Definition: AutoTuner.cpp:413
bool searchSpaceIsTrivial() const
Indicator function whether the search space consists of exactly one configuration.
Definition: AutoTuner.cpp:73
void setOptimalConfiguration(const Configuration &optimalConfig)
Pushes the provided config into the _configQueue and ends tuning immediately.
Definition: AutoTuner.cpp:195
void forceRetune()
Force the internal tuner to enter a new tuning phase upon the next call to computeInteractions().
Definition: AutoTuner.cpp:77
void setRebuildFrequency(double rebuildFrequency)
Sets the _rebuildFrequency.
Definition: AutoTuner.cpp:427
const std::set< Configuration > & getSearchSpace() const
Return the search space as a const reference.
Definition: AutoTuner.cpp:451
void receiveLiveInfo(const LiveInfo &liveInfo, bool isStartOfTuningPhase)
Pass live info on to all tuning strategies.
Definition: AutoTuner.cpp:381
Class containing multiple options that form an algorithm configuration for the pairwise iteration.
Definition: Configuration.h:26
Class to manage all evidence.
Definition: EvidenceCollection.h:24
This class is able to gather and store important information for a tuning phase from a container and ...
Definition: LiveInfo.h:33
Class representing the load estimator choices.
Definition: TuningMetricOption.h:18
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:34
Helper struct encapsulating most minor information for the auto tuner.
Definition: AutoTunerInfo.h:17