How to diagnose the reasons why "Not enough storage is available to process this command"?

To begin, I’m going to ask an overly-generic question. Hopefully, the post has enough information so that someone can point me in the right direction, and I can then ask more specific questions, with specific examples from my code.

I have a GAMS .gms script that solves the same model numerous times in a loop (each time I solve, I change some parameters). After solving many times, the loop eventually fails prematurely, and the following message is reported to the display:

Not enough storage is available to process this command.
ERROR: Solver “LINDO” returned with nonzero exitcode 8

*** Error: Could not spawn gamscmex, rc = 8
Cmex executable : C:\GAMS\win64\24.1\gamscmex.exe
System directory: C:\GAMS\win64\24.1
Not enough storage is available to process this command.
err: solver rc 8


In general, why do these types of errors occur in GAMS? That is, what types of problems should I look for in my script? Are there common “RAM leaks” (i.e. memory leaks) that can be avoided?

I’ve completely turned off the .lst listing file and the .log file, but this doesn’t seem to help (which makes sense, because this uses physical memory, not RAM).
I also open and close my “put” results file each time I append to it, but I would guess that this is irrelevant…?

Thank you for your time,

Tom


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.

Tom,

Without taking a closer look at your GAMS program it’s hard to see what’s going on. The GAMS log actually indicates how much memory the entire GAMS system has allocated:

— trnsport.gms(66) 4 Mb

You can observe if and how this memory increases over time/iteration. If you just replace data, this number should not increase, if you store some results in GAMS parameters that contain the loop index, this could/will result in growing memory requirement:

loop(s,
rep(s,i,j) = x.l(i,j);
);

Sometimes users have a model with a time index t and solve slices. GAMS by default merges the solutions of the slices together, so the GAMS database continuously grows for every solve.

We are not aware of true memory leaks in GAMS, but it seems that you use the Lindo(Global) solver with GAMS option solvelink=5 (GAMS attaches the solver to the main process as a DLL, so any leak in the GAMS link to Lindo or in the Lindo solver, become a memory leak in GAMS). You might want to run this with solvelink=2, if that works better, it would indicate a problem in the GAMS/Lindo solver.

Hope this helps,
Michael Bussieck - GAMSWorld Coordinator
On Saturday, September 7, 2013 12:34:15 PM UTC-4, Tom wrote:

To begin, I’m going to ask an overly-generic question. Hopefully, the post has enough information so that someone can point me in the right direction, and I can then ask more specific questions, with specific examples from my code.

I have a GAMS .gms script that solves the same model numerous times in a loop (each time I solve, I change some parameters). After solving many times, the loop eventually fails prematurely, and the following message is reported to the display:

Not enough storage is available to process this command.
ERROR: Solver “LINDO” returned with nonzero exitcode 8

*** Error: Could not spawn gamscmex, rc = 8
Cmex executable : C:\GAMS\win64\24.1\gamscmex.exe
System directory: C:\GAMS\win64\24.1
Not enough storage is available to process this command.
err: solver rc 8


In general, why do these types of errors occur in GAMS? That is, what types of problems should I look for in my script? Are there common “RAM leaks” (i.e. memory leaks) that can be avoided?

I’ve completely turned off the .lst listing file and the .log file, but this doesn’t seem to help (which makes sense, because this uses physical memory, not RAM).
I also open and close my “put” results file each time I append to it, but I would guess that this is irrelevant…?

Thank you for your time,

Tom


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/groups/opt_out.