[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] Re: VC++ 6 problems with GLPK profiling

From: Andrew Makhorin
Subject: [Help-glpk] Re: VC++ 6 problems with GLPK profiling
Date: Thu, 15 Jan 2004 11:40:28 +0300

>This may be more my lack of experience with the MS VC++ environment
> but I have attempted to profile glpsol.exe using the MS profiler but
> the program fails as it is unable to allocate memory whilst profiling.
> The program runs correctly in both production and debug modes but
> under the profiler the umalloc call fails at the test:
>      if (size > env->mem_limit - env->mem_total)
>         fault("umalloc: size = %d; no memory available", size);
>and fails as env->mem_limit = 1 and env->mem_total = 0. When run
> normally, env->mem_limit is a huge integer.
>Has anyone any idea why the MS VC++ profiling environment does not seem
> to have any memory available to allocate?
>I have done some searching but havent found anything referring to this
> problem.

env->mem_limit is the maximum amount of memory (in bytes) available for
allocation via umalloc/ucalloc. On creating LIBENV it is initialized to
INT_MAX and then *never* changed.

If you compile the glpk library within ide, do not include sources from
'sysdep' and be sure that *all* sources from 'src' are included in the
project. If the problem persists, try to run the following program under
the profiler:

#include "glpk.h"
int main(void)
{     LIBENV *env;
      env = lib_env_ptr();
      print("mem_limit = %d", env->mem_limit);
      return 0;

If it prints 'mem_limit = 2147483647' (i.e. INT_MAX on 32-bit platform),
all is ok, and glpsol must work properly. If it prints something
different, some project settings may be wrong that involves incorrect
initialization of the glpk library environment.

Andrew Makhorin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]