ROSS
mpi_allreduce.h
Go to the documentation of this file.
1 #ifndef INC_gvt_mpi_allreduce_h
2 #define INC_gvt_mpi_allreduce_h
3 
4 static double gvt_print_interval = 0.01;
5 static double percent_complete = 0.0;
6 
7 static inline int
9 {
10  return pe->gvt_status;
11 }
12 
13 static inline void
15 {
16  if(gvt_print_interval == 1.0)
17  return;
18 
19  if(percent_complete == 0.0)
20  {
22  return;
23  }
24 
25  double ts = TW_STIME_DBL(gvt);
26 
27  printf("GVT #%d: simulation %d%% complete, max event queue size %u (",
29  (int) ROSS_MIN(100, floor(100 * (ts/g_tw_ts_end))),
31 
32  if (ts == DBL_MAX)
33  printf("GVT = %s", "MAX");
34  else
35  printf("GVT = %.4f", ts);
36 
37  printf(").\n");
38 
39 #ifdef AVL_TREE
40  printf("AVL tree size: %d\n", g_tw_pe->avl_tree_size);
41 #endif
42 
44 }
45 
47 
48 #endif
unsigned int g_tw_gvt_done
Definition: ross-global.c:81
unsigned char gvt_status
Bits available for gvt computation.
Definition: ross-types.h:400
double tw_stime
Definition: ross.h:150
tw_stat st_get_allreduce_count()
Definition: mpi_allreduce.c:20
double g_tw_ts_end
Definition: ross-global.c:68
Holds the entire PE state.
Definition: ross-types.h:375
#define ROSS_MIN(a, b)
static double gvt_print_interval
Definition: mpi_allreduce.h:4
static int tw_gvt_inprogress(tw_pe *pe)
Definition: mpi_allreduce.h:8
unsigned int tw_pq_max_size(splay_tree *pq)
Definition: splay.c:357
tw_pq * pq
Priority queue used to sort events.
Definition: ross-types.h:381
unsigned avl_tree_size
Definition: ross-types.h:393
tw_pe * g_tw_pe
Definition: ross-global.c:75
unsigned long long tw_stat
Definition: ross-types.h:48
static double percent_complete
Definition: mpi_allreduce.h:5
static void gvt_print(tw_stime gvt)
Definition: mpi_allreduce.h:14
tw_pe * pe
Definition: avl_tree.c:11
#define TW_STIME_DBL(x)
Definition: ross.h:153