Charades
Classes | Macros | Functions | Variables
statistics.h File Reference

Declaration of the Statistics class and associated methods/variables. More...

#include "typedefs.h"
#include <charm++.h>

Go to the source code of this file.

Classes

class  Statistics
 Class for holding all PE level statistics for a given simulation run. More...
 

Macros

#define PE_STATS(x)   get_statistics()->x
 MACRO to more easily access PE local statistics.
 

Functions

Statisticsget_statistics ()
 Helper function for accessing the local Statistics object.
 
CkReductionMsg * statsReduction (int nMsg, CkReductionMsg **msgs)
 Reducer function used by the Charm++ runtime when doing a stats reduction. More...
 
void registerStatsReduction ()
 Called during node init to register the stats reduction type.
 

Variables

CkReduction::reducerType statsReductionType
 The type of the stats reduction used by the Charm++ runtime.
 

Detailed Description

Declaration of the Statistics class and associated methods/variables.

Currently, each PE maintains a single instance of a Statistics object, and at the end of the simulation, a reduction is done to compute total statistics. Some of the PE level statistics may also be logged for projections intermittently if tracing is turned on, which requires an additional instance a Statistics object on each PE.

Todo:
More modular statistics
  • A top level composite statistics class
  • Smaller stats modules for things like scheduler, GVT, etc.
  • Modules register with the top level class
Todo:
LP level statistics/tracing
  • Related to above, could be a module, however there would be one per LP
  • Tracing would require some added functionality to Projections
Todo:
Better stats tracing
  • Probably subclass or composite pattern to make logging self-contained
  • Calling log() would dump current stats to file, and accumulate
  • Final reduction only needs aggregate stats
  • Maybe have a separate type for stats that is a pair when tracing is enabled, which will make all stats traceable more easily
Todo:
Model specific stats and logging
  • May be entirely taken care of by modular and lp level above

Function Documentation

◆ statsReduction()

CkReductionMsg* statsReduction ( int  nMsg,
CkReductionMsg **  msgs 
)

Reducer function used by the Charm++ runtime when doing a stats reduction.

Parameters
nMsgthe number of messages to reduce
msgsan array of message pointers to the actual messages
Returns
a single message that is the reduction of the passed in messages