62 const AutoTunerInfo &autoTunerInfo,
unsigned int rebuildFrequency,
const std::string &outputSuffix);
171 std::tuple<double, double, double, long>
sampleEnergy();
187 void addMeasurement(
long sampleRebuild,
long sampleTraverseParticles,
bool neighborListRebuilt,
size_t iteration,
264 bool tuneConfiguration(
size_t currentIteration,
size_t tuningPhase,
bool isStartOfTuningPhase);
301 void handleEndOfTuningPhase(
size_t tuningPhase);
306 void selectBestConfiguration(
size_t tuningPhase);
312 size_t getCurrentNumSamples()
const;
321 [[nodiscard]] std::tuple<long, long, long> estimateRuntimeFromSamples()
const;
326 SelectorStrategyOption _selectorStrategy;
332 std::vector<std::unique_ptr<TuningStrategyInterface>> _tuningStrategies;
342 bool _useLOESSSmoothening;
348 bool _energyMeasurementPossible;
356 double _rebuildFrequency;
367 double _earlyStoppingFactor;
372 bool _needsDomainSimilarityStatistics;
382 std::vector<double> _pdBinDensityStdDevOfLastTenIterations{};
387 std::vector<double> _pdBinMaxDensityOfLastTenIterations{};
395 std::vector<long> _samplesTraverseInteractions;
401 std::vector<long> _samplesRebuildingNeighborLists{};
406 EvidenceCollection _evidenceCollection{};
419 std::vector<Configuration> _configQueue;
424 TuningResultLogger _tuningResultLogger;
429 TuningDataLogger _tuningDataLogger;
434 utils::EnergySensor _energySensor;
439 bool _isTuning{
false};
446 bool _endOfTuningPhase{
false};
452 bool _forceRetune{
false};
458 bool _earlyStoppingOfResampling{
false};
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:350
bool searchSpaceIsEmpty() const
Indicator function whether the search space has no configurations in it.
Definition: AutoTuner.cpp:76
bool tuneConfiguration(size_t currentIteration, size_t tuningPhase, bool isStartOfTuningPhase)
Tune available algorithm configurations.
Definition: AutoTuner.cpp:86
Configuration rejectConfig(const Configuration &rejectedConfig, bool indefinitely, size_t tuningPhase)
Tell the tuner that the given config is not applicable.
Definition: AutoTuner.cpp:212
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:52
void addMeasurement(long sampleRebuild, long sampleTraverseParticles, bool neighborListRebuilt, size_t iteration, size_t tuningPhase)
Save the runtime of a given traversal.
Definition: AutoTuner.cpp:251
void logTuningResult(long tuningTime, size_t currentIteration) const
After a tuning phase has finished, write the result to a file.
Definition: AutoTuner.cpp:64
bool needsDomainSimilarityStatistics() const
Returns true if the AutoTuner needs domain similarity statistics.
Definition: AutoTuner.cpp:374
std::set< Configuration > SearchSpaceType
Type for the search space holding all possible configurations.
Definition: AutoTuner.h:50
SortingThresholdBenchmark & getSortingThresholdBenchmark()
Returns the sorting-threshold benchmark owned by this tuner.
Definition: AutoTuner.h:286
void checkEarlyStoppingCondition(size_t tuningPhase)
Checks whether the current configuration performs so poorly that it shouldn't be resampled further wi...
Definition: AutoTuner.cpp:430
bool willRebuildNeighborLists() const
Returns whether rebuildNeighborLists() should be triggered in the next iteration.
Definition: AutoTuner.cpp:335
bool resetEnergy()
Reset the rapl meter to prepare for a new measurement.
Definition: AutoTuner.cpp:348
const std::vector< std::unique_ptr< TuningStrategyInterface > > & getTuningStrategies() const
Get the list of tuning strategies that are used.
Definition: AutoTuner.cpp:378
std::vector< std::unique_ptr< TuningStrategyInterface > > TuningStrategiesListType
Type for the member holding all tuning strategies.
Definition: AutoTuner.h:46
bool inLastTuningIteration() const
Indicates if the tuner is in the last iteration of the tuning phase.
Definition: AutoTuner.cpp:422
~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:372
const std::vector< Configuration > & getConfigQueue() const
Getter for the current queue of configurations.
Definition: AutoTuner.cpp:376
bool initEnergy()
Initialize pmt sensor.
Definition: AutoTuner.cpp:343
bool canMeasureEnergy() const
Returns whether the AutoTuner can take energy measurements.
Definition: AutoTuner.cpp:426
bool inTuningPhase() const
Indicate if the tuner considers itself currently in a tuning phase according to its internal counters...
Definition: AutoTuner.cpp:416
const Configuration & getCurrentConfig() const
Get the currently selected configuration.
Definition: AutoTuner.cpp:204
const EvidenceCollection & getEvidenceCollection() const
Getter for the internal evidence collection.
Definition: AutoTuner.cpp:424
const TuningMetricOption & getTuningMetric() const
Getter for the primary metric for tuning.
Definition: AutoTuner.cpp:414
bool searchSpaceIsTrivial() const
Indicator function whether the search space consists of exactly one configuration.
Definition: AutoTuner.cpp:74
void setOptimalConfiguration(const Configuration &optimalConfig)
Pushes the provided config into the _configQueue and ends tuning immediately.
Definition: AutoTuner.cpp:196
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:428
const std::set< Configuration > & getSearchSpace() const
Return the search space as a const reference.
Definition: AutoTuner.cpp:452
void receiveLiveInfo(const LiveInfo &liveInfo, bool isStartOfTuningPhase)
Pass live info on to all tuning strategies.
Definition: AutoTuner.cpp:382
Class containing multiple options that form an algorithm configuration for the pairwise iteration.
Definition: Configuration.h:30
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
Determines the per-Newton3-state, per-direction-type particle-count threshold at which using a sorted...
Definition: SortingThresholdBenchmark.h:38
Class representing the load estimator choices.
Definition: TuningMetricOption.h:18
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:33
Helper struct encapsulating most minor information for the auto tuner.
Definition: AutoTunerInfo.h:17