Tuesday, June 10, 2008

GAMS bug: interrupt does not work

The model below does not terminate. One would expect the Interrupt button would allow you to stop the GAMS run. Unfortunately that does not work. Only the Stop button works but that stops the process very abruptly leaving an unfinished listing file.

scalar s /1/;

while(1,
s = s + 1;
s = s - 1;
);

1 comment:

  1. GAMS has an option to limit the number of iterations in for/while loops: specify forlim=n on the command line.

    In addition I received confirmation this is fixed now: "At execution time we only check for pending ctrl at the start of a new unit. I have added a check at convenient points in the execution. Works very nice."

    ReplyDelete