22#ifndef ESPRESSO_SRC_CORE_P3M_TUNING_LOGGER_HPP
23#define ESPRESSO_SRC_CORE_P3M_TUNING_LOGGER_HPP
27#if defined(ESPRESSO_P3M) || defined(ESPRESSO_DP3M)
38 : m_verbose{verbose}, m_name{
std::
move(name)}, m_mode{
mode} {}
42 std::printf(
"mesh cao r_cut_iL alpha_L err "
43 "rs_err ks_err time [ms]\n");
47 template <
typename...
Types>
51 std::printf(
" %-8.2f\n", time);
55 template <
typename...
Types>
59 std::printf(
" %s\n",
reason.c_str());
65 std::printf(
"%-4d %-3d cao too large for this mesh\n", mesh, cao);
70 std::size_t n_particles,
double sum_prop)
const {
84 std::printf(
"%s tune parameters: Accuracy goal = %.5e prefactor = %.5e\n"
85 "System: box_l = %.5e # %s part = %zu %s = %.5e\n",
86 m_name.c_str(), accuracy, prefactor,
box_l,
93 double alpha_L,
double accuracy,
double time)
const {
96 "\nresulting parameters: mesh: (%d, %d, %d), cao: %d, r_cut_iL: %.4e,"
97 "\n alpha_L: %.4e, accuracy: %.4e, time: %.2f\n",
98 mesh[0], mesh[1], mesh[2], cao, r_cut_iL, alpha_L, accuracy, time);
104 std::printf(
"fixed cao %d\n", cao);
110 std::printf(
"fixed r_cut_iL %f\n", r_cut_iL);
116 std::printf(
"fixed mesh (%d, %d, %d)\n", mesh[0], mesh[1], mesh[2]);
127 void row(
int mesh,
int cao,
double r_cut_iL,
double alpha_L,
double accuracy,
129 std::printf(
"%-4d %-3d %.5e %.5e %.3e %.3e %.3e", mesh, cao, r_cut_iL,
Vector implementation and trait types for boost qvm interoperability.
TuningLogger(bool verbose, std::string name, Mode mode)
void log_tuning_start() const
void report_fixed_mesh(Utils::Vector3i const &mesh) const
void log_cao_too_large(int mesh, int cao) const
void log_skip(std::string reason, Types... parameter_set) const
void report_fixed_cao(int cao) const
void tuning_results(Utils::Vector3i const &mesh, int cao, double r_cut_iL, double alpha_L, double accuracy, double time) const
void log_success(double time, Types... parameter_set) const
void report_fixed_r_cut_iL(double r_cut_iL) const
void tuning_goals(double accuracy, double prefactor, double box_l, std::size_t n_particles, double sum_prop) const
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.