25#ifdef AUTOPAS_ENABLE_HARMONY
51 ActiveHarmony(
const InteractionTypeOption &interactionType,
const std::set<ContainerOption> &allowedContainerOptions,
53 const std::set<TraversalOption> &allowedTraversalOptions,
54 const std::set<LoadEstimatorOption> &allowedLoadEstimatorOptions,
55 const std::set<DataLayoutOption> &allowedDataLayoutOptions,
56 const std::set<Newton3Option> &allowedNewton3Options,
bool mpiDivideAndConquer,
AutoPas_MPI_Comm comm);
81 bool reset(
size_t iteration,
size_t tuningPhase, std::vector<Configuration> &configQueue,
85#ifdef AUTOPAS_ENABLE_HARMONY
89 hdesc_t *hdesc =
nullptr;
93 htask_t *htask =
nullptr;
95 using hdef_t =
void *;
98 const InteractionTypeOption _interactionType;
100 std::set<ContainerOption> _allowedContainerOptions;
101 std::unique_ptr<NumberSet<double>> _allowedCellSizeFactors;
102 std::set<TraversalOption> _allowedTraversalOptions;
103 std::set<LoadEstimatorOption> _allowedLoadEstimatorOptions;
104 std::set<DataLayoutOption> _allowedDataLayoutOptions;
105 std::set<Newton3Option> _allowedNewton3Options;
107 size_t _tuningPhase{0};
108 bool _mpiDivideAndConquer;
110 bool _nonLocalServer;
125 void invalidateConfiguration();
134 template <
class OptionClass>
135 void configureTuningParameter(hdef_t *hdef,
const char *name,
const std::set<OptionClass> &options);
144 template <
class OptionClass>
145 OptionClass fetchTuningParameter(
const char *name,
const std::set<OptionClass> &options);
149 void setupTuningParameters(
int commSize, hdef_t *hdef);
151 static constexpr int cellSizeSamples = 100;
153 static constexpr const char *traversalOptionName =
"traversalOption";
154 static constexpr const char *loadEstimatorOptionName =
"loadEstimatorOption";
155 static constexpr const char *dataLayoutOptionName =
"dataLayoutOption";
156 static constexpr const char *cellSizeFactorsName =
"cellSizeFactor";
157 static constexpr const char *newton3OptionName =
"newton3Option";
Interface to the Active Harmony (AH) tuning framework.
Definition: ActiveHarmony.h:37
bool searchSpaceIsTrivial() const
Indicate if the search space contains only one configuration.
Definition: ActiveHarmony.cpp:270
bool searchSpaceIsEmpty() const
Indicate if the search space contains any configurations.
Definition: ActiveHarmony.cpp:281
TuningStrategyOption getOptionType() const override
Get this object's associated TuningStrategyOption type.
Definition: ActiveHarmony.cpp:340
bool needsSmoothedHomogeneityAndMaxDensity() const override
Indicate whether the strategy needs smoothed values of homogeneity and max density.
Definition: ActiveHarmony.cpp:338
bool reset(size_t iteration, size_t tuningPhase, std::vector< Configuration > &configQueue, const autopas::EvidenceCollection &evidenceCollection) override
Reset all internal parameters to the beginning of a new tuning phase.
Definition: ActiveHarmony.cpp:193
bool optimizeSuggestions(std::vector< Configuration > &configQueue, const EvidenceCollection &evidenceCollection) override
Optimizes the queue of configurations to process.
Definition: ActiveHarmony.cpp:128
void addEvidence(const Configuration &configuration, const Evidence &evidence) override
Notifies the strategy about empirically collected information for the given configuration.
Definition: ActiveHarmony.cpp:58
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
Helper class that associates a measurement with the iteration when it was taken.
Definition: Evidence.h:15
Virtual class describing a finite or infinite set of numbers.
Definition: NumberSet.h:22
Interface for tuning strategies for the auto tuner.
Definition: TuningStrategyInterface.h:23
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:32
AutoPas_MPI_Comm
Dummy for MPI_Comm.
Definition: WrapMPI.h:113