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",
101 float ctm = this->tot_time - this->last_tot_time;
102 this->tot_calls += this->calls;
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;
142 float tstm_A = this->slvtime_A - this->lastSlvtime_A;
143 float tstm_B = this->slvtime_B - this->lastSlvtime_B;
144 float tstm_D = this->slvtime_D - this->lastSlvtime_D;
148 snprintf(abuf,
sizeof abuf,
"%7.2f %7.2f %6d %6d %10.4f %10.4f", this->minAT, this->maxAT, this->
tot - this->
last_tot, this->
tot, tstm_A, this->slvtime_A);
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;
155 this->lastSlvtime_A = this->slvtime_A;
156 this->lastSlvtime_B = this->slvtime_B;
157 this->lastSlvtime_D = this->slvtime_D;
173 float tstm_A = this->slvtime_A - this->lastSlvtime_A;
174 float tstm_B = this->slvtime_B - this->lastSlvtime_B;
175 float tstm_D = this->slvtime_D - this->lastSlvtime_D;
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-------";
184 log_msg(NULL, 0,
ECHO |
FLUSH,
"active list: %7i \tbc applied: %3s", this->activeList, this->bc_status ?
"yes" :
"no");
189 this->bc_status =
false;
190 this->last_minAT = this->minAT;
191 this->last_maxAT = this->maxAT;
int totsolves
total # of solutions
void log_stats(double tm, bool cflg)
void init_logger(const char *filename)
FILE_SPEC logger
file in which to write stats
int solves
#solutions performed
void init_logger(const char *filename)
void update_cli(double time, bool cflg)
void log_stats(double time, bool cflg)
double lastSlvtime
total solver time
void init_logger(const char *filename)
void update_iter(const int curiter)
int min
minimum #interations
int last_tot
previous total #
void log_stats(double tm, bool cflg)
void update_iter(const int curiter)
void log_msg(FILE_SPEC out, int level, unsigned char flag, const char *fmt,...)
double slvtime
total solver time
int max
maximum #iterations
Basic utility structs and functions, mostly IO related.
FILE_SPEC f_open(const char *fname, const char *mode)
Open a FILE_SPEC.