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#include "ross-extern.h"
5#include "ross-kernel-inline.h"
6#include "ross-types.h"
7#include "queue/tw-queue.h"
8#include <math.h>
9#include <sys/time.h>
10#include <time.h>
11
12static double gvt_print_interval = 0.01;
13static double percent_complete = 0.0;
14
15static inline int
17{
18 return pe->gvt_status;
19}
20
21static inline void
23{
24 if(gvt_print_interval == 1.0)
25 return;
26
27 if(percent_complete == 0.0)
28 {
30 return;
31 }
32
33 double ts = TW_STIME_DBL(gvt);
34
35 printf("GVT #%d: simulation %d%% complete, max event queue size %u (",
37 (int) ROSS_MIN(100, floor(100 * (ts/g_tw_ts_end))),
39
40 if (ts == DBL_MAX)
41 printf("GVT = %s", "MAX");
42 else
43 printf("GVT = %.4f", ts);
44
45#if HAVE_CTIME
46 time_t raw_time;
47 struct tm * timeinfo;
48 char time_str [80];
49 time(&raw_time);
50 timeinfo = localtime(&raw_time);
51 strftime(time_str, 80, "%c", timeinfo);
52 printf(") at %s.\n", time_str);
53#else
54 printf(").\n");
55#endif
56
57#ifdef AVL_TREE
58 printf("AVL tree size: %d\n", g_tw_pe->avl_tree_size);
59#endif
60
62}
63
65
66#endif
tw_pe * pe
Definition avl_tree.c:10
static double percent_complete
static double gvt_print_interval
static int tw_gvt_inprogress(tw_pe *pe)
static void gvt_print(tw_stime gvt)
tw_stat st_get_allreduce_count()
unsigned int tw_pq_max_size(tw_pq *)
Definition splay.c:424
#define TW_STIME_DBL(x)
Definition ross-base.h:42
double tw_stime
Definition ross-base.h:39
tw_pe * g_tw_pe
Definition ross-global.c:79
unsigned int g_tw_gvt_done
Definition ross-global.c:85
double g_tw_ts_end
Definition ross-global.c:72
#define ROSS_MIN(a, b)
unsigned long long tw_stat
Definition ross-types.h:58
Holds the entire PE state.
Definition ross-types.h:416