static glp_prob *best_prob;
static AdjWord *best_adjmatrix;
-static int n_max_frags, m_max_frags;
+static int n_max_frags=INT_MAX, m_max_frags=INT_MAX;
static int *weight;
static unsigned printcounter;
}
static void mc_iterate_worker(void) {
+ static time_t lastprint;
+
for (;;) {
mc_rwvsetup_outer();
ssize_t r = readv(mc_work[0], mc_iov, mc_niovs);
bool ok = maxhamweight_ok();
if (!ok) continue;
- ok = preconsider_ok(multicore_iteration_boundary, 1);
- progress_eol();
+ time_t now = time(0);
+ bool doprint = now != lastprint;
+ lastprint = now;
+
+ ok = preconsider_ok(multicore_iteration_boundary, doprint);
+ if (doprint) progress_eol();
if (!ok) continue;
/* stop iterate_recurse from trying to run multicore_outer_iteration */
glp_term_out(GLP_OFF);
setlinebuf(stderr);
weight = calloc(sizeof(*weight), m); assert(weight);
- n_max_frags = INT_MAX;
- m_max_frags = INT_MAX;
}
#if 0
int i;
fprintf(stderr," ");
for (i=0; i<n; i++) fprintf(stderr, " %"PRADJ, best_adjmatrix[i]);
- fprintf(stderr," OK\n");
}
+ fprintf(stderr, " best=%-12.8f nf<=%d mf<=%d\n",
+ best, n_max_frags, m_max_frags);
printf("%d into %d: ", n, m);
if (best_prob) {
double min = glp_get_obj_val(best_prob);
}
printf("\n");
}
+ } else {
+ printf(" none better than %9.3f ", best);
}
printf(" [%s]\n", VERSION);
if (ferror(stdout) || fclose(stdout)) { perror("stdout"); exit(-1); }
int main(int argc, char **argv) {
int opt;
- while ((opt = getopt(argc,argv,"j:")) >= 0) {
+ while ((opt = getopt(argc,argv,"j:b:")) >= 0) {
switch (opt) {
case 'j': ncpus = atoi(optarg); break;
case 'b': set_best(atof(optarg)); break;