AMPL shuts itself during algorithm

13 views
Skip to first unread message

Tobi

unread,
Oct 11, 2017, 10:45:12 AM10/11/17
to AMPL Modeling Language
Hi there,

I don't find an answer and don't quite understand the problem itself.

I modelled an iterative ant colony algorithm (quite complicated to explain).
One iteration looks like this:
- solving an MIP 50 times with CPLEX (different input is given). This takes ~ 0.5 sec per solve
- calculate a bunch of stuff via more or less simple formulas in a .run-file and store data. Takes ~15 min

The algorithm works for many cases/data inputs and runs smoothly. Now I put in a bit more data than before and AMPL just closes itself around the 3rd iteration. This happened two times pretty much after the same time was used (~40 min).
When does this happen? Too many parameters?
I don't get an error or don't see it (if there is one before AMPL shuts itself; it runs in the background and I can't watch it the whole time).

If anybody knows what I might do to solve this issue, I'd be happy if you'd let me know!

Cheers

Tobi

unread,
Oct 12, 2017, 10:10:29 AM10/12/17
to AMPL Modeling Language
I am pretty sure now, the problem arises due to the RAM consumed by AMPL.
Shortly before AMPL shuts down it uses ~1.6 GB. On my PC I have 8 GB (3.46 GB "usable") RAM.

I don't know if I really reach the point of the 3.46 GB usable RAM or if there is a mechanism that just reserves e.g. 2 GB for AMPL. Maybe this limit might be changeable.

Does anybody know? Otherwise I need more hardware to solve the problem :/

Robert Fourer

unread,
Oct 12, 2017, 10:42:35 AM10/12/17
to am...@googlegroups.com
To see AMPL's resource requirements in detail, set

option times 1, gentimes 1;
option show_stats 1;

Then you will see a lot of output that details time and memory used; there's a guide to interpreting the output at http://ampl.com/faqs/what-should-i-do-if-i-suspect-that-there-is-insufficient-memory-for-my-ampl-session/.

To take advantage of all available memory, be sure you are running the 64-bit versions of AMPL and the solvers. To see the version strings, use the AMPL commands

option version;
shell 'xxx -v';

where xxx is replaced by the name of your solver.

Bob Fourer
am...@googlegroups.com

=======
Reply all
Reply to author
Forward
0 new messages