-------- Forwarded Message -------- From: Deepesh Damodaran <[email protected]> To: [email protected] Subject: Re: GLPK 4.40 on centos Date: Fri, 14 Jun 2013 07:20:06 +0530
I am using "CentOS release 6.3 (Final) " On Fri, Jun 14, 2013 at 7:17 AM, Deepesh Damodaran <[email protected]> wrote: When I do yum install glpk, I get version 4.40. This has a bug that if we give the computation time for MIP, it is the CPU time(using clock()) and not the absolute time or 'wall clock time'. Secondly if we run the function twice within 10 min interval, and give 2 min computation time, there is a chance that it might execute for much less than 2 min. I looked at the source code and there is a bug. What is the best way to upgrade from 4.40 to 4.47. Why doesn't yum automatically install the latest version? Code which results in these 2 problems: xlong_t xtime(void) { LIBENV *env = lib_link_env(); xlong_t t; clock_t c; double secs; xassert(sizeof(clock_t) <= sizeof(env->c_init)); t = zeit(); if (xlcmp(xlsub(t, env->t_init), xlset(600 * 1000)) <= 0) { /* not more than ten minutes since the last call */ memcpy(&c, env->c_init, sizeof(clock_t)); secs = (double)(clock() - c) / (double)CLOCKS_PER_SEC; if (0.0 <= secs && secs <= 1000.0) { /* looks like correct value */ t = xladd(env->t_init, xlset((int)(1000.0 * secs + 0.5))); goto done; } } /* re-initialize */ if (xlcmp(t, env->t_last) < 0) t = env->t_last; env->t_init = t; c = clock(); memcpy(env->c_init, &c, sizeof(clock_t)); done: xassert(xlcmp(env->t_last, t) <= 0); env->t_last = t; return t; } Thanks, Deepesh _______________________________________________ Bug-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-glpk
