15 const char* h1 =
" ----- ----- ------- ----- ----- | ---- ----- --------- --------- --------- |";
16 const char* h2 =
" mn it mx it avg it its ttits | ss ts st stps stpit |";
19 log_msg(NULL, 3, 0,
"%s error: Could not open file %s in %s. Turning off logging.\n",
44 float stm = tstm / this->
solves;
47 float itm = its ? tstm / its : 0.;
53 snprintf(itbuf,
sizeof itbuf,
"%5d %5d %7.1f %6d %6d",
56 snprintf(stbuf,
sizeof stbuf,
"%4d %5d %9.4f %9.4f %9.4f", this->
solves, this->
totsolves,
57 (
float)tstm, stm, itm);
59 unsigned char flag = cflg ?
ECHO : 0;
66 this->lastSlvtime = this->
slvtime;
71 if (curiter >
max)
max = curiter;
72 if (curiter <
min)
min = curiter;
81 const char* h1 =
" ----- ----- | --------- --------- |";
82 const char* h2 =
" cls ttcls | time tot time |";
85 log_msg(NULL, 3, 0,
"%s error: Could not open file %s in %s. Turning off logging.\n",
104 snprintf(cbuf,
sizeof cbuf,
"%5d %5d", this->
calls, this->
tot_calls);
105 snprintf(tbuf,
sizeof tbuf,
"%9.4f %9.4f", ctm, this->
tot_time);
107 unsigned char flag = cflg ?
ECHO : 0;
110 this->last_tot_time = this->
tot_time;
118 const char* h1 =
" CycFIM (Step A) ------ ------ --------- --------- | Idiff (Step B) ------ | Repol. times (Step D)";
119 const char* h2 =
" mn AT mx AT its ttits time tttime | time tttime | time tttime";
122 log_msg(NULL, 3, 0,
"%s error: Could not open file %s in %s. Turning off logging.\n",
132 if (!this->
logger)
return;
149 snprintf(bbuf,
sizeof bbuf,
"%10.4f %10.4f", tstm_B, this->
slvtime_B);
150 snprintf(dbuf,
sizeof dbuf,
"%10.4f %10.4f", tstm_D, this->
slvtime_D);
152 unsigned char flag = cflg ?
ECHO : 0;
177 snprintf(buf,
sizeof buf,
"EIK_CYC %d", this->
cycle);
178 log_msg(NULL, 0,
ECHO |
FLUSH,
"%.2f\t----\t%.1f\t%15s", time, tstm_A+tstm_B+tstm_D, buf);
180 if (param_globals::output_level > 1) {
181 const char* end_out =
"----\t----- \t----\t-------\t-------";
Basic utility structs and functions, mostly IO related.
FILE_SPEC f_open(const char *fname, const char *mode)
Open a FILE_SPEC.
void log_msg(FILE_SPEC out, int level, unsigned char flag, const char *fmt,...)
int solves
#solutions performed
FILE_SPEC logger
file in which to write stats
double slvtime_A
total time in Step A
int totsolves
total # of solutions
double lastSlvtime_D
last total time in Step D
double last_minAT
previous minimum activation time
void log_stats(double time, bool cflg)
double minAT
minimum activation time in current solve
int last_tot
previous total # iterations
double last_maxAT
previous maximum activation time
double maxAT
maximum activation time in current solve
void init_logger(const char *filename)
int tot
total # iterations
int activeList
number of nodes currently in list
double lastSlvtime_A
last total time in Step A
void update_iter(const int curiter)
double slvtime_B
total time in Step B
double slvtime_D
total time in Step D
bool bc_status
boundary conditions were applied?
void update_cli(double time, bool cflg)
double lastSlvtime_B
last total time in Step B
void log_stats(double tm, bool cflg)
FILE_SPEC logger
file in which to write stats
void init_logger(const char *filename)
int tot_calls
total # calls
double last_tot_time
last total time
int calls
# calls for this interval, this is incremented externally
double tot_time
total time, this is incremented externally
void init_logger(const char *filename)
FILE_SPEC logger
file in which to write stats
int last_tot
previous total #
void log_stats(double tm, bool cflg)
int min
minimum #interations
int max
maximum #iterations
double lastSlvtime
total solver time
void update_iter(const int curiter)
int solves
#solutions performed
double slvtime
total solver time
int totsolves
total # of solutions