62 const AutoTunerInfo &autoTunerInfo,
unsigned int rebuildFrequency,
const std::string &outputSuffix);
129 [[nodiscard]] std::tuple<Configuration, bool>
getNextConfig();
180 std::tuple<double, double, double, long>
sampleEnergy();
265 size_t getCurrentNumSamples()
const;
273 [[nodiscard]]
long estimateRuntimeFromSamples()
const;
284 bool tuneConfiguration();
289 SelectorStrategyOption _selectorStrategy;
295 std::vector<std::unique_ptr<TuningStrategyInterface>> _tuningStrategies;
301 size_t _iteration{0};
309 size_t _tuningPhase{0};
315 size_t _tuningInterval;
320 TuningMetricOption _tuningMetric;
325 bool _useLOESSSmoothening;
331 bool _energyMeasurementPossible;
339 double _rebuildFrequency;
350 double _earlyStoppingFactor;
355 bool _needsHomogeneityAndMaxDensity;
365 std::vector<double> _homogeneitiesOfLastTenIterations{};
370 std::vector<double> _maxDensitiesOfLastTenIterations{};
378 std::vector<long> _samplesNotRebuildingNeighborLists;
384 std::vector<long> _samplesRebuildingNeighborLists{};
389 EvidenceCollection _evidenceCollection{};
402 std::vector<Configuration> _configQueue;
413 TuningResultLogger _tuningResultLogger;
418 TuningDataLogger _tuningDataLogger;
423 utils::EnergySensor _energySensor;
428 bool _isTuning{
false};
435 bool _endOfTuningPhase{
false};
441 bool _forceRetune{
false};
447 bool _earlyStoppingOfResampling{
false};
454 size_t _iterationBaseline{0};
This class manages all logic related to the auto tuning mechanic.
Definition: AutoTuner.h:41
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:77
AutoTuner & operator=(AutoTuner &&other) noexcept
Move assignment operator.
Definition: AutoTuner.cpp:54
void bumpIterationCounters(bool needToWait=false)
Increase internal iteration counters by one.
Definition: AutoTuner.cpp:308
std::tuple< Configuration, bool > getNextConfig()
Ask the tuner for the next configuration to use.
Definition: AutoTuner.cpp:177
void addHomogeneityAndMaxDensity(double homogeneity, double maxDensity, long time)
Adds measurements of homogeneity and maximal density to the vector of measurements.
Definition: AutoTuner.cpp:59
void logTuningResult(bool tuningIteration, long tuningTime) const
After a tuning phase has finished, write the result to a file.
Definition: AutoTuner.cpp:65
std::set< Configuration > SearchSpaceType
Type for the search space holding all possible configurations.
Definition: AutoTuner.h:50
bool willRebuildNeighborLists() const
Returns whether rebuildNeighborLists() should be triggered in the next iteration.
Definition: AutoTuner.cpp:328
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:420
std::vector< std::unique_ptr< TuningStrategyInterface > > TuningStrategiesListType
Type for the member holding all tuning strategies.
Definition: AutoTuner.h:46
bool inLastTuningIteration() const
Indicate if the tuner is in the last iteration of the tuning phase.
Definition: AutoTuner.cpp:440
std::tuple< Configuration, bool > rejectConfig(const Configuration &rejectedConfig, bool indefinitely)
Tell the tuner that the given config is not applicable.
Definition: AutoTuner.cpp:193
void addMeasurement(long sample, bool neighborListRebuilt)
Save the runtime of a given traversal.
Definition: AutoTuner.cpp:229
const std::vector< Configuration > & getConfigQueue() const
Getter for the current queue of configurations.
Definition: AutoTuner.cpp:418
bool initEnergy()
Initialize pmt sensor.
Definition: AutoTuner.cpp:342
bool canMeasureEnergy() const
Returns whether the AutoTuner can take energy measurements.
Definition: AutoTuner.cpp:444
bool inTuningPhase() const
Indicate if the tuner considers itself currently in a tuning phase according to its internal counters...
Definition: AutoTuner.cpp:432
bool needsHomogeneityAndMaxDensityBeforePrepare() const
Indicator whether tuner needs homogeneity and max density information before the next call to prepare...
Definition: AutoTuner.cpp:411
void receiveLiveInfo(const LiveInfo &liveInfo)
Pass live info on to all tuning strategies.
Definition: AutoTuner.cpp:424
bool inFirstTuningIteration() const
Indicate if the tuner is in the first iteration of a tuning phase.
Definition: AutoTuner.cpp:438
const Configuration & getCurrentConfig() const
Get the currently selected configuration.
Definition: AutoTuner.cpp:175
const EvidenceCollection & getEvidenceCollection() const
Getter for the internal evidence collection.
Definition: AutoTuner.cpp:442
const TuningMetricOption & getTuningMetric() const
Getter for the primary metric for tuning.
Definition: AutoTuner.cpp:430
bool searchSpaceIsTrivial() const
Indicator function whether the search space consists of exactly one configuration.
Definition: AutoTuner.cpp:75
bool prepareIteration()
Determines what live infos are needed and passes collected live info to the tuning strategies.
Definition: AutoTuner.cpp:374
void forceRetune()
Force the internal tuner to enter a new tuning phase upon the next call to computeInteractions().
Definition: AutoTuner.cpp:79
void setRebuildFrequency(double rebuildFrequency)
Sets the _rebuildFrequency.
Definition: AutoTuner.cpp:446
void checkEarlyStoppingCondition()
Checks whether the current configuration performs so poorly that it shouldn't be resampled further wi...
Definition: AutoTuner.cpp:448
Class containing multiple options that form an algorithm configuration for the pairwise iteration.
Definition: Configuration.h:24
Class to manage all evidence.
Definition: EvidenceCollection.h:21
This class is able to gather and store important information for a tuning phase from a container and ...
Definition: LiveInfo.h:31
Class representing the load estimator choices.
Definition: TuningMetricOption.h:18
Timer class to stop times.
Definition: Timer.h:20
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:32
Helper struct encapsulating most minor information for the auto tuner.
Definition: AutoTunerInfo.h:17