#include <assert.h>
#include <sys/times.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
Include dependency graph for pbedefs.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Classes | |
struct | pbeparameter |
struct | timer |
struct | benchmark |
Defines | |
#define | CLK_TCK 100 |
#define | pbe_start_noname(handle) writestart_noname( (handle) ) |
#define | pbe_start(handle, parname) if (( (handle) >0) && ( (handle) <= pbe_data->slots)) writestart( (handle) , (parname) ) |
#define | pbe_stop(handle) if (( (handle) >0) && ( (handle) <= pbe_data->slots)) writestop( (handle) ) |
#define | pbe_resetcounter(handle) |
#define | pbe_getrealtime(handle) (pbe_data->timers[(handle)].realtimes[1] / ((float) CLK_TCK)) |
#define | pbe_getsystime(handle) |
#define | pbe_getusrtime(handle) |
#define | pbe_getsysusrtime(handle) (pbe_getsystime(handle) + pbe_getusrtime(handle)) |
#define | pbe_getcounter(handle) (pbe_data->timers[handle].counter) |
#define | writestart(handle, parname) |
#define | writestart_noname(handle) pbe_data->timers[(handle)].realtimes[0]=times(&(pbe_data->timers[(handle)].times[0])) |
#define | writestop(handle) |
Functions | |
int | pbe_init (const char *name, int numofslots, int argparametercount, struct pbeparameter *argparameters) |
void | pbe_dump () |
int | pbe_finalize (int numofiterations) |
Variables | |
benchmark * | pbe_data |
tms | _tms_aid |
benchmark * | pbe_data |
#define CLK_TCK 100 |
#define pbe_getcounter | ( | handle | ) | (pbe_data->timers[handle].counter) |
#define pbe_getrealtime | ( | handle | ) | (pbe_data->timers[(handle)].realtimes[1] / ((float) CLK_TCK)) |
#define pbe_getsystime | ( | handle | ) |
Value:
((pbe_data->timers[(handle)].times[1].tms_stime + \ pbe_data->timers[(handle)].times[1].tms_cstime) \ / ((float) CLK_TCK))
Definition at line 90 of file pbedefs.h.
Referenced by pbe_dump(), and pbe_finalize().
#define pbe_getsysusrtime | ( | handle | ) | (pbe_getsystime(handle) + pbe_getusrtime(handle)) |
#define pbe_getusrtime | ( | handle | ) |
Value:
((pbe_data->timers[(handle)].times[1].tms_utime + \ pbe_data->timers[(handle)].times[1].tms_cutime) \ / ((float) CLK_TCK))
Definition at line 93 of file pbedefs.h.
Referenced by pbe_dump(), and pbe_finalize().
#define pbe_resetcounter | ( | handle | ) |
Value:
if (( (handle) >0) && ( (handle) <= pbe_data->slots))\ { pbe_data->timers[(handle)].realtimes[1] = 0; \ pbe_data->timers[(handle)].times[1].tms_utime = 0; \ pbe_data->timers[(handle)].times[1].tms_stime = 0; \ pbe_data->timers[(handle)].times[1].tms_cutime = 0; \ pbe_data->timers[(handle)].times[1].tms_cstime = 0; \ pbe_data->timers[(handle)].counter = 0; \ }
#define pbe_start | ( | handle, | |||
parname | ) | if (( (handle) >0) && ( (handle) <= pbe_data->slots)) writestart( (handle) , (parname) ) |
Definition at line 75 of file pbedefs.h.
Referenced by Projector::Apply(), HierarchicalBasisPrec::Apply(), HierarchicalBasisPrec::ApplyInverse(), LinearEigsolvOperators::buildPreconditioner(), FemaxxDriver::calculate_eigenfields(), FemaxxDriver::FemaxxDriver(), QuadraticEigsolvOperators::getAsigmaPrec(), LinearEigsolvOperators::getAsigmaPrec(), QuadraticEigsolvOperators::getHPrec(), LinearEigsolvOperators::getHPrec(), QuadraticEigsolvOperators::getHSolver(), LinearEigsolvOperators::getHSolver(), HierarchicalBasisPrec::HierarchicalBasisPrec(), FemaxxDriver::load_mesh(), main(), QuadraticEigsolvOperators::matrixAssembly(), LinearEigsolvOperators::matrixAssembly(), and FemaxxDriver::postprocess().
#define pbe_start_noname | ( | handle | ) | writestart_noname( (handle) ) |
#define pbe_stop | ( | handle | ) | if (( (handle) >0) && ( (handle) <= pbe_data->slots)) writestop( (handle) ) |
Definition at line 77 of file pbedefs.h.
Referenced by Projector::Apply(), HierarchicalBasisPrec::Apply(), HierarchicalBasisPrec::ApplyInverse(), LinearEigsolvOperators::buildPreconditioner(), FemaxxDriver::calculate_eigenfields(), QuadraticEigsolvOperators::getAsigmaPrec(), LinearEigsolvOperators::getAsigmaPrec(), QuadraticEigsolvOperators::getHPrec(), LinearEigsolvOperators::getHPrec(), QuadraticEigsolvOperators::getHSolver(), LinearEigsolvOperators::getHSolver(), HierarchicalBasisPrec::HierarchicalBasisPrec(), FemaxxDriver::load_mesh(), main(), QuadraticEigsolvOperators::matrixAssembly(), LinearEigsolvOperators::matrixAssembly(), FemaxxDriver::postprocess(), and FemaxxDriver::~FemaxxDriver().
#define writestart | ( | handle, | |||
parname | ) |
#define writestop | ( | handle | ) |
Value:
{ \ pbe_data->timers[(handle)].counter += 1; \ pbe_data->timers[(handle)].realtimes[1]+=times(&_tms_aid) - pbe_data->timers[(handle)].realtimes[0]; \ pbe_data->timers[(handle)].times[1].tms_utime += _tms_aid.tms_utime - pbe_data->timers[(handle)].times[0].tms_utime; \ pbe_data->timers[(handle)].times[1].tms_stime += _tms_aid.tms_stime - pbe_data->timers[(handle)].times[0].tms_stime; \ pbe_data->timers[(handle)].times[1].tms_cutime += _tms_aid.tms_cutime - pbe_data->timers[(handle)].times[0].tms_cutime; \ pbe_data->timers[(handle)].times[1].tms_cstime += _tms_aid.tms_cstime - pbe_data->timers[(handle)].times[0].tms_cstime; }
void pbe_dump | ( | ) |
Print timing statistics for all timers to stdout
Definition at line 138 of file pbe.h.
References benchmark::have_mpi, benchmark::mpirank, timer::name, pbe_data, pbe_getcounter, pbe_getrealtime, pbe_getsystime, pbe_getsysusrtime, pbe_getusrtime, pbe_reduce(), benchmark::slots, and benchmark::timers.
Referenced by main(), and FemaxxDriver::~FemaxxDriver().
Here is the call graph for this function:
int pbe_finalize | ( | int | numofiterations | ) |
Dumps timing stats (maximised over all CPUs) to a file and frees all memory.
numofiterations | all times are divided by this number of they are dumped to the output file. If this parameter is zero, no output file is created. |
Definition at line 168 of file pbe.h.
References CLK_TCK, benchmark::have_mpi, benchmark::mpirank, benchmark::mpisize, timer::name, pbeparameter::name, benchmark::name, benchmark::parametercount, benchmark::parameters, pbe_data, pbe_getcounter, pbe_getrealtime, pbe_getsystime, pbe_getsysusrtime, pbe_getusrtime, pbe_reduce(), pbeparameter::shortname, benchmark::slots, benchmark::timers, and pbeparameter::value.
Referenced by main(), and FemaxxDriver::~FemaxxDriver().
Here is the call graph for this function:
int pbe_init | ( | const char * | name, | |
int | numofslots, | |||
int | argparametercount, | |||
struct pbeparameter * | argparameters | |||
) |
Definition at line 41 of file pbe.h.
References benchmark::have_mpi, benchmark::mpirank, benchmark::mpisize, benchmark::name, timer::name, benchmark::parametercount, benchmark::parameters, pbe_data, benchmark::slots, and benchmark::timers.
Referenced by FemaxxDriver::FemaxxDriver(), and main().