bug-glpk
[Top][All Lists]
Advanced

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

Re: [Bug-glpk] glpsol: crash on display


From: Xypron
Subject: Re: [Bug-glpk] glpsol: crash on display
Date: Thu, 20 Nov 2008 01:01:26 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.18) Gecko/20081030 SeaMonkey/1.1.13

Andrew Makhorin wrote:
Yes, probably it would be reasonable to add such check to avoid silly
errors. BTW, this check may be performed on the translation phase.
In more general case to prevent infinite recursion on computing indexed
sets/parameters the maximum recursion level could be limited to some
predefined value. (I added this note to the todo list.)


Hello Andrew,

the allowable recursion depth will depend on the stack size.

set A := {0..99999};
param p{a in A} := if a == 4 then 5 else p[(a-1) mod 100000];
display p;

ran fine on my Ubuntu PC after issuing
$ ulimit -s 100000000
to reserve 100 MBytes for stack.

gcc has a flag -fstack-check. It might make sense to compile with this flag.

I found the following information in
http://cs.nyu.edu/exact/core/doc/stackOverflow.txt

How to change the default stack size on different platforms:
In general, under Unix-like platforms, the stack size is controlled
by environment variable, not the program itself.
So you cannot pass any flags to the
compilers, like gcc, to setup stack size. Under Windows platforms, the
stack size information is contained in the executable files.

Best regards

Xypron




reply via email to

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