[gecode-users] Controlling memory use

Christian Schulte cschulte at kth.se
Mon Mar 31 11:15:19 CEST 2008


What contributes to memory consumption are:
    - How many variables and how big their domain (where size is roughly
      the number of disjoint non-overlapping intervals it is composed of
      for both integer and set variables). For variables it matters
      whether they are referenced from the space itself (that is, the
      variables that constitute the solution). Better keep it small:
      if a variable is not any longer referenced it will go away.
    - How many propagators and how many variables it each propagator
      has. Then also: do you have propagators written in Java or just
      in C++ (Java propagators take much much more memory). The
      capability to add propagators in Java to Gecode/J is just for
      educational purposes.
    - How deep is the search tree.
    - Which recomputation distance are you using. In particular in
      your case, not having any failures, you should increase the
      recomputation distance for search.

As you don't say how many propagators you use we can't really say whether it
is an awful lot of memory or not.

Hope that helps
Christian

On 3/31/08 2:51 AM, "Malcolm Ryan" <malcolmr at cse.unsw.edu.au> wrote:

> In general, the memory use in my search problem seems to be quite a
> lot larger than I expected. I have a system with about 250 IntVars. I
> did a search and found a solution with the following statistics:
> 
> Clones: 23
> Commits: 178
> Fails: 0
> Propagates: 276937
> Memory: 62.4 Mb (65477136 bytes)
> 
> That seems like an awfully large amount of memory for a relatively
> small problem. How do I work out what is causing this? In general,
> what are the factors that contribute towards memory usage and how do I
> control them?
> 
> Malcolm
> 
> On 30/03/2008, at 4:53 PM, Malcolm Ryan wrote:
>> My searches in Gecode/J are crashing when with messages like:
>> 
>> java(221,0xb0801000) malloc: *** mmap(size=65536) failed (error
>> code=12)
>> *** error: can't allocate region
>> *** set a breakpoint in malloc_error_break to debug
>> terminate called after throwing an instance of
>> 'Gecode::MemoryExhausted'
>>   what():  Memory: Heap memory exhausted
>> 
>> Is there any way to avoid these, or at least to make the search fail
>> more gracefully?
>> 
>> Malcolm
>> 
>> _______________________________________________
>> Gecode users mailing list
>> users at gecode.org
>> https://www.gecode.org/mailman/listinfo/gecode-users
> 
> 
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users

--
Christian Schulte, web.ict.kth.se/~cschulte/









More information about the gecode-users mailing list