The ROme OpTimistic Simulator  2.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
statistics.h File Reference

Statistics module. More...

+ Include dependency graph for statistics.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  stat_t
 

Macros

#define DEFAULT_OUTPUT_DIR   "outputs"
 This macro specified the default output directory, if nothing is passed as an option.
 
#define MAX_PATHLEN   512
 Longest length of a path.
 
#define STAT_FILE_NAME_NODE   "execution_stats"
 
#define STAT_FILE_NAME_GLOBAL   "global_execution_stats"
 
#define STAT_FILE_NAME_THREAD   "local_stats"
 
#define STAT_FILE_NAME_GVT   "gvt"
 
#define STAT_FILE_NAME_LP   "lps"
 

Typedefs

typedef double vec_double
 

Enumerations

enum  stat_file_unique { STAT_FILE_U_NODE = 0, STAT_FILE_U_GLOBAL, NUM_STAT_FILE_U }
 
enum  stat_file_per_thread { STAT_FILE_T_THREAD = 0, STAT_FILE_T_GVT, STAT_FILE_T_LP, NUM_STAT_FILE_T }
 
enum  stat_msg_t {
  STAT_ANTIMESSAGE = 1001, STAT_EVENT, STAT_COMMITTED, STAT_ROLLBACK,
  STAT_CKPT, STAT_CKPT_TIME, STAT_CKPT_MEM, STAT_RECOVERY,
  STAT_RECOVERY_TIME, STAT_EVENT_TIME, STAT_IDLE_CYCLES, STAT_SILENT,
  STAT_GVT_ROUND_TIME, STAT_GET_SIMTIME_ADVANCEMENT, STAT_GET_EVENT_TIME_LP
}
 
enum  stats_levels {
  STATS_INVALID = 0, STATS_GLOBAL, STATS_PERF, STATS_LP,
  STATS_ALL
}
 

Functions

void _mkdir (const char *path)
 
void print_config (void)
 
void statistics_init (void)
 
void statistics_fini (void)
 
void statistics_start (void)
 
void statistics_stop (int exit_code)
 
void statistics_on_gvt (double gvt)
 
void statistics_on_gvt_serial (double gvt)
 
void statistics_post_data (struct lp_struct *, enum stat_msg_t type, double data)
 
void statistics_post_data_serial (enum stat_msg_t type, double data)
 
double statistics_get_lp_data (struct lp_struct *, unsigned int type)
 

Detailed Description

Statistics module.

All facitilies to collect, gather, and dump statistics are implemented in this module. The statistics subsystem relies on the struct stat_t type to keep the relevant fields. Every statistic variable must be a double, because the aggregation functions are type-agnostic and consider every value to be a double. This allows to speedup some aggregations by relying on vectorized instructions.

There are two main entry points in this module:

  • statistics_post_data() can be called anywhere in the runtime library, allowing to specify a numerical code which identifies some statistic information. A value can be also passed, which is handled depending on the type of statistics managed. This function allows to update statistics values for each LP of the system.
  • statistics_get_lp_data() can be called to retrieve current per-LP statistical values. This is useful to implement autonomic policies which self-tune the behaviour of the runtime depending on, e.g., workload factors.

At the end of the simulation (or if the simulation is stopped), this module implements a coordination protocol to reduce all values, both at a machine level, and among distributed processes (using MPI).

This file is part of ROOT-Sim (ROme OpTimistic Simulator).

ROOT-Sim is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; only version 3 of the License applies.

ROOT-Sim is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with ROOT-Sim; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Author
Andrea Piccione
Alessandro Pellegrini
Tommaso Tocci
Roberto Vitali

Definition in file statistics.h.

Enumeration Type Documentation

Enumerator
STATS_INVALID 

By convention 0 is the invalid field

STATS_GLOBAL 

xxx documentation

STATS_PERF 

xxx documentation

STATS_LP 

xxx documentation

STATS_ALL 

xxx documentation

Definition at line 105 of file statistics.h.

Function Documentation

void _mkdir ( const char *  path)

This is an helper-function to allow the statistics subsystem create a new directory

Author
Alessandro Pellegrini
Parameters
pathThe path of the new directory to create

Definition at line 198 of file statistics.c.

+ Here is the caller graph for this function:

void statistics_fini ( void  )

This function finalize the Statistics subsystem

Author
Alessandro Pellegrini

Definition at line 736 of file statistics.c.

+ Here is the caller graph for this function:

void statistics_init ( void  )

This function initializes the Statistics subsystem

Author
Alessandro Pellegrini

Definition at line 660 of file statistics.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void statistics_start ( void  )

This function registers when the actual simulation is starting.

Definition at line 286 of file statistics.c.

+ Here is the caller graph for this function:

void statistics_stop ( int  exit_code)

This function print in the output file all the statistics associated with the simulation

Author
Francesco Quaglia
Roberto Vitali
Alessandro Pellegrini
Parameters
exit_codeThe exit code of the simulator, used to display a happy or sad termination message

Definition at line 442 of file statistics.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function: