Gromacs
2026.0-dev-20250207-8469bad
|
#include "gmxpre.h"
#include "bench_setup.h"
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <algorithm>
#include <filesystem>
#include <memory>
#include <optional>
#include <utility>
#include <vector>
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/gpu_utils/hostallocator.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdlib/dispersioncorrection.h"
#include "gromacs/mdlib/force_flags.h"
#include "gromacs/mdlib/forcerec.h"
#include "gromacs/mdlib/gmx_omp_nthreads.h"
#include "gromacs/mdtypes/enerdata.h"
#include "gromacs/mdtypes/forcerec.h"
#include "gromacs/mdtypes/interaction_const.h"
#include "gromacs/mdtypes/locality.h"
#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdatom.h"
#include "gromacs/mdtypes/simulation_workload.h"
#include "gromacs/nbnxm/atomdata.h"
#include "gromacs/nbnxm/nbnxm.h"
#include "gromacs/nbnxm/nbnxm_simd.h"
#include "gromacs/nbnxm/pairlistparams.h"
#include "gromacs/nbnxm/pairlistset.h"
#include "gromacs/nbnxm/pairlistsets.h"
#include "gromacs/nbnxm/pairsearch.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/simd/simd.h"
#include "gromacs/timing/cyclecounter.h"
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/enumerationhelpers.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/logger.h"
#include "gromacs/utility/range.h"
#include "bench_system.h"
This file defines functions for setting up kernel benchmarks.
Functions | |
static std::optional< std::string > | gmx::checkKernelSetup (const NbnxmKernelBenchOptions &options) |
Checks the kernel setup. More... | |
static NbnxmKernelType | gmx::translateBenchmarkEnum (const NbnxmBenchMarkKernels &kernel) |
Helper to translate between the different enumeration values. | |
static NbnxmKernelSetup | gmx::getKernelSetup (const NbnxmKernelBenchOptions &options) |
Returns the kernel setup. | |
static interaction_const_t | gmx::setupInteractionConst (const NbnxmKernelBenchOptions &options) |
Return an interaction constants struct with members used in the benchmark set appropriately. | |
static LJCombinationRule | gmx::convertLJCombinationRule (const NbnxmBenchMarkCombRule combRule) |
Converts the benchmark LJ comb.rule. enum to the corresponding NBNxM enum. | |
static std::unique_ptr < nonbonded_verlet_t > | gmx::setupNbnxmForBenchInstance (const NbnxmKernelBenchOptions &options, const BenchmarkSystem &system) |
Sets up and returns a Nbnxm object for the given benchmark options and system. | |
static void | gmx::expandSimdOptionAndPushBack (const NbnxmKernelBenchOptions &options, std::vector< NbnxmKernelBenchOptions > *optionsList) |
Add the options instance to the list for all requested kernel SIMD types. | |
static void | gmx::setupAndRunInstance (const BenchmarkSystem &system, const NbnxmKernelBenchOptions &options, const bool doWarmup) |
Sets up and runs the requested benchmark instance and prints the results. | |
void | gmx::bench (int sizeFactor, const NbnxmKernelBenchOptions &options) |
Sets up and runs one or more Nbnxm kernel benchmarks. More... | |