![]() |
Peano
|
Go to the source code of this file.
Functions | |
tarch::logging::Log | _log ("::") |
void | initInputData (double *Q) |
Set input data. More... | |
void | allocateAndStoreOutcome (const double *const *Q, const double *const maxEigenvalue, const int numberOfCells) |
Allocates and stores outcome of one compute kernel. More... | |
void | freeOutcome (const int numberOfCells) |
void | validateOutcome (const double *const *Q, const double *const maxEigenvalue, const int numberOfCells) |
Validate data against pre-stored simulation outcome. More... | |
void | reportRuntime (const std::string &kernelIdentificator, const tarch::timing::Measurement &timingKernelLaunch, int numberOfCells) |
Reports the runtime and throughput of the benchmarks. More... | |
double | runKernels (int device, exahype2::CellData< double, double > &cellData, int cellIndex, tarch::timing::Measurement &measurement) |
void | runBenchmarks (int numberOfCells) |
Run the benchmark for one particular number of cells. More... | |
int | main (int argc, char **argv) |
Variables | |
constexpr double | TimeStamp = 0.0 |
constexpr double | TimeStepSize = 1e-6 |
const tarch::la::Vector< DIMENSIONS, double > | CellCenter = benchmarks::exahype2::kernelbenchmarks::DomainOffset + 0.5*benchmarks::exahype2::kernelbenchmarks::DomainSize |
const tarch::la::Vector< DIMENSIONS, double > | CellSize = benchmarks::exahype2::kernelbenchmarks::DomainSize / 81.0 |
constexpr int | NumberOfInputEntriesPerCell |
constexpr int | NumberOfOutputEntriesPerCell = 0 |
constexpr int | NumberOfFiniteVolumesPerCell |
double ** | validQ = nullptr |
double * | validMaxEigenvalue = nullptr |
bool | outcomeIsInvalid = false |
tarch::timing::Measurement | timingComputeKernel |
tarch::logging::Log _log | ( | "::" | ) |
void allocateAndStoreOutcome | ( | const double *const * | Q, |
const double *const | maxEigenvalue, | ||
const int | numberOfCells | ||
) |
Allocates and stores outcome of one compute kernel.
Make a persistent snapshot of a solution and assume, from hereon, that this snapshot is the valid data. You can call this routine as often as you want. Only the very first call will trigger a snapshot.
Note: needs to freed using the freeOutcome() routine.
Definition at line 128 of file KernelBenchmarks-main.cpp.
References applications::exahype2::ccz4::maxEigenvalue(), benchmarks::exahype2::kernelbenchmarks::NumberOfOutputEntriesPerCell, validMaxEigenvalue, and validQ.
Referenced by runBenchmarks().
void freeOutcome | ( | const int | numberOfCells | ) |
Definition at line 145 of file KernelBenchmarks-main.cpp.
References validMaxEigenvalue, and validQ.
Referenced by main().
void initInputData | ( | double * | Q | ) |
Set input data.
We use the values from the centralMost Cell in the domain with an arbitrary cell size of 1/81 of the domain size.
TODO: should we update this to actual initial conditions?
Definition at line 94 of file KernelBenchmarks-main.cpp.
References CellCenter, and CellSize.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 425 of file KernelBenchmarks-main.cpp.
References freeOutcome(), static-limiting-euler-airfoil::init, outcomeIsInvalid, and runBenchmarks().
void reportRuntime | ( | const std::string & | kernelIdentificator, |
const tarch::timing::Measurement & | timingKernelLaunch, | ||
int | numberOfCells | ||
) |
Reports the runtime and throughput of the benchmarks.
First set of outputs refers to the time of the compute kernel itself. Second set of outputs refers to the time including the kernel launch overhead. The throughput is measured in the updates of volumes per second (dof/s).
Definition at line 227 of file KernelBenchmarks-main.cpp.
References timingComputeKernel.
void runBenchmarks | ( | int | numberOfCells | ) |
Run the benchmark for one particular number of cells.
numberOfCells | Number of cells to study |
Definition at line 348 of file KernelBenchmarks-main.cpp.
References allocateAndStoreOutcome(), CellCenter, CellSize, benchmarks::exahype2::kernelbenchmarks::initInputData(), benchmarks::exahype2::kernelbenchmarks::NumberOfInputEntriesPerCell, benchmarks::exahype2::kernelbenchmarks::NumberOfOutputEntriesPerCell, benchmarks::exahype2::kernelbenchmarks::reportRuntime(), runKernels(), TimeStamp, TimeStepSize, timingComputeKernel, and validateOutcome().
Referenced by main().
double runKernels | ( | int | device, |
exahype2::CellData< double, double > & | cellData, | ||
int | cellIndex, | ||
tarch::timing::Measurement & | measurement | ||
) |
Definition at line 247 of file KernelBenchmarks-main.cpp.
References CellCenter, CellSize, applications::exahype2::ccz4::maxEigenvalue(), TimeStamp, and TimeStepSize.
Referenced by runBenchmarks().
void validateOutcome | ( | const double *const * | Q, |
const double *const | maxEigenvalue, | ||
const int | numberOfCells | ||
) |
Validate data against pre-stored simulation outcome.
Works if and only if storeOutcome has been performed before. Does not abort in case there are errors. If there are errors, we return a status code != 0.
Definition at line 164 of file KernelBenchmarks-main.cpp.
References applications::exahype2::ccz4::maxEigenvalue(), benchmarks::exahype2::kernelbenchmarks::NumberOfOutputEntriesPerCell, outcomeIsInvalid, validMaxEigenvalue, and validQ.
Referenced by runBenchmarks().
const tarch::la::Vector<DIMENSIONS,double> CellCenter = benchmarks::exahype2::kernelbenchmarks::DomainOffset + 0.5*benchmarks::exahype2::kernelbenchmarks::DomainSize |
Definition at line 48 of file KernelBenchmarks-main.cpp.
Referenced by initInputData(), benchmarks::exahype2::kernelbenchmarks::initInputData(), runBenchmarks(), and runKernels().
const tarch::la::Vector<DIMENSIONS,double> CellSize = benchmarks::exahype2::kernelbenchmarks::DomainSize / 81.0 |
Definition at line 49 of file KernelBenchmarks-main.cpp.
Referenced by applyBoundaryConditionsToAxis(), createMarkerFromIndex(), initInputData(), benchmarks::exahype2::kernelbenchmarks::initInputData(), runBenchmarks(), and runKernels().
|
constexpr |
Definition at line 71 of file KernelBenchmarks-main.cpp.
|
constexpr |
Definition at line 54 of file KernelBenchmarks-main.cpp.
|
constexpr |
Definition at line 62 of file KernelBenchmarks-main.cpp.
bool outcomeIsInvalid = false |
Definition at line 82 of file KernelBenchmarks-main.cpp.
Referenced by main(), and validateOutcome().
|
constexpr |
Definition at line 46 of file KernelBenchmarks-main.cpp.
Referenced by runBenchmarks(), and runKernels().
|
constexpr |
Definition at line 47 of file KernelBenchmarks-main.cpp.
Referenced by runBenchmarks(), and runKernels().
tarch::timing::Measurement timingComputeKernel |
Definition at line 84 of file KernelBenchmarks-main.cpp.
Referenced by benchmarks::exahype2::kernelbenchmarks::reportRuntime(), reportRuntime(), runBenchmarks(), variant1::runBenchmarks(), variant2::runBenchmarks(), variant3::runBenchmarks(), variant4::runBenchmarks(), variant5::runBenchmarks(), and variant6::runBenchmarks().
double* validMaxEigenvalue = nullptr |
Definition at line 81 of file KernelBenchmarks-main.cpp.
Referenced by allocateAndStoreOutcome(), freeOutcome(), and validateOutcome().
double** validQ = nullptr |
Definition at line 80 of file KernelBenchmarks-main.cpp.
Referenced by allocateAndStoreOutcome(), freeOutcome(), and validateOutcome().