29#include "system/System.hpp"
33#include <boost/mpi/collectives/all_reduce.hpp>
34#include <boost/mpi/collectives/broadcast.hpp>
42std::string TuningFailed::get_first_error()
const {
45 auto message = std::string(
"tuning failed: an exception was thrown while "
46 "benchmarking the integration loop");
48 if (warning.level() == RuntimeError::ErrorLevel::ERROR) {
49 message +=
" (" + warning.what() +
")";
59 <<
"Clock resolution is too low to reliably time integration.";
61 if (acc.
sig() >= 0.1 * acc.
avg()) {
136 std::ranges::min(cell_structure->max_cutoff()) - maximal_cutoff(),
137 0.5 * std::ranges::max(box_geo->length()));
143 cell_structure->set_verlet_skin(a);
146 cell_structure->set_verlet_skin(b);
155 cell_structure->set_verlet_skin(0.5 * (a + b));
void tune_verlet_skin(double min_skin, double max_skin, double tol, int int_steps, bool adjust_max_skin)
Tune the Verlet skin.
Keep running average and variance.
Scalar avg() const
Average of the samples.
Scalar sig() const
Standard deviation of the samples.
cudaStream_t stream[1]
CUDA streams for parallel computing on CPU and GPU.
boost::mpi::communicator comm_cart
The communicator.
int this_node
The number of this node.
This file contains the errorhandling code for severe errors, like a broken bond or illegal parameter ...
#define runtimeWarningMsg()
Molecular dynamics integrator.
#define INTEG_ERROR_RUNTIME
#define INTEG_REUSE_FORCES_CONDITIONALLY
recalculate forces only if Propagation::recalc_forces is set
#define INTEG_REUSE_FORCES_NEVER
recalculate forces unconditionally (mostly used for timing)
std::vector< RuntimeError > mpi_gather_runtime_errors_all(bool is_head_node)
Gather messages on main rank.
Various procedures concerning interactions between particles.
static void run_full_force_calc(System::System &system, int reuse_forces)
static void check_statistics(Utils::Statistics::RunningAverage< double > &acc)
static double time_calc(System::System &system, int int_steps)
Time the integration.
double benchmark_integration_step(System::System &system, int int_steps)
Benchmark the integration loop.