62 const AutoTunerInfo &autoTunerInfo,
unsigned int rebuildFrequency,
const std::string &outputSuffix);
135 [[nodiscard]] std::tuple<Configuration, bool>
getNextConfig();
186 std::tuple<double, double, double, long>
sampleEnergy();
272 size_t getCurrentNumSamples()
const;
280 [[nodiscard]]
long estimateRuntimeFromSamples()
const;
291 bool tuneConfiguration();
296 SelectorStrategyOption _selectorStrategy;
302 std::vector<std::unique_ptr<TuningStrategyInterface>> _tuningStrategies;
308 size_t _iteration{0};
316 size_t _tuningPhase{0};
322 size_t _tuningInterval;
327 TuningMetricOption _tuningMetric;
332 bool _useLOESSSmoothening;
338 bool _energyMeasurementPossible;
346 double _rebuildFrequency;
357 double _earlyStoppingFactor;
362 bool _needsDomainSimilarityStatistics;
372 std::vector<double> _pdBinDensityStdDevOfLastTenIterations{};
377 std::vector<double> _pdBinMaxDensityOfLastTenIterations{};
385 std::vector<long> _samplesNotRebuildingNeighborLists;
391 std::vector<long> _samplesRebuildingNeighborLists{};
396 EvidenceCollection _evidenceCollection{};
409 std::vector<Configuration> _configQueue;
414 TuningResultLogger _tuningResultLogger;
419 TuningDataLogger _tuningDataLogger;
424 utils::EnergySensor _energySensor;
429 bool _isTuning{
false};
436 bool _endOfTuningPhase{
false};
442 bool _forceRetune{
false};
448 bool _earlyStoppingOfResampling{
false};
455 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:348
bool searchSpaceIsEmpty() const
Indicator function whether the search space has no configurations in it.
Definition: AutoTuner.cpp:76
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:59
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:307
std::tuple< Configuration, bool > getNextConfig()
Ask the tuner for the next configuration to use.
Definition: AutoTuner.cpp:176
void logTuningResult(bool tuningIteration, long tuningTime) const
After a tuning phase has finished, write the result to a file.
Definition: AutoTuner.cpp:64
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:327
bool resetEnergy()
Reset the rapl meter to prepare for a new measurement.
Definition: AutoTuner.cpp:346
const std::vector< std::unique_ptr< TuningStrategyInterface > > & getTuningStrategies() const
Get the list of tuning strategies that are used.
Definition: AutoTuner.cpp:386
std::vector< std::unique_ptr< TuningStrategyInterface > > TuningStrategiesListType
Type for the member holding all tuning strategies.
Definition: AutoTuner.h:46
bool isStartOfTuningPhase() const
Returns true if the AutoTuner is about to calculate the first interactions of a tuning phase (i....
Definition: AutoTuner.cpp:373
bool inLastTuningIteration() const
Indicate if the tuner is in the last iteration of the tuning phase.
Definition: AutoTuner.cpp:428
std::tuple< Configuration, bool > rejectConfig(const Configuration &rejectedConfig, bool indefinitely)
Tell the tuner that the given config is not applicable.
Definition: AutoTuner.cpp:192
void addMeasurement(long sample, bool neighborListRebuilt)
Save the runtime of a given traversal.
Definition: AutoTuner.cpp:228
bool needsLiveInfo() const
Returns true if the AutoTuner needs live info.
Definition: AutoTuner.cpp:379
const std::vector< Configuration > & getConfigQueue() const
Getter for the current queue of configurations.
Definition: AutoTuner.cpp:384
bool initEnergy()
Initialize pmt sensor.
Definition: AutoTuner.cpp:341
bool canMeasureEnergy() const
Returns whether the AutoTuner can take energy measurements.
Definition: AutoTuner.cpp:432
bool inTuningPhase() const
Indicate if the tuner considers itself currently in a tuning phase according to its internal counters...
Definition: AutoTuner.cpp:420
void receiveLiveInfo(const LiveInfo &liveInfo)
Pass live info on to all tuning strategies.
Definition: AutoTuner.cpp:390
bool inFirstTuningIteration() const
Indicate if the tuner is in the first iteration of a tuning phase.
Definition: AutoTuner.cpp:426
const Configuration & getCurrentConfig() const
Get the currently selected configuration.
Definition: AutoTuner.cpp:174
const EvidenceCollection & getEvidenceCollection() const
Getter for the internal evidence collection.
Definition: AutoTuner.cpp:430
const TuningMetricOption & getTuningMetric() const
Getter for the primary metric for tuning.
Definition: AutoTuner.cpp:418
bool searchSpaceIsTrivial() const
Indicator function whether the search space consists of exactly one configuration.
Definition: AutoTuner.cpp:74
void forceRetune()
Force the internal tuner to enter a new tuning phase upon the next call to computeInteractions().
Definition: AutoTuner.cpp:78
void setRebuildFrequency(double rebuildFrequency)
Sets the _rebuildFrequency.
Definition: AutoTuner.cpp:434
void checkEarlyStoppingCondition()
Checks whether the current configuration performs so poorly that it shouldn't be resampled further wi...
Definition: AutoTuner.cpp:436
bool tuningPhaseAboutToBegin() const
Returns true if the AutoTuner is within 10 iterations of the start of a tuning phase.
Definition: AutoTuner.cpp:377
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:32
Class representing the load estimator choices.
Definition: TuningMetricOption.h:18
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