Screen watching and LOG file examination

Top  Previous  Next

GAMS outputs information on memory use to the screen during execution.  Namely, the line number that is being executed and the current memory use are output. One may try to watch that display although it can go by very fast.  In particular, if can observe that the memory use jumps greatly during execution of a line number, then one would look at that line as a possible cause of excessive memory use.  For example in the model in toobig.gms the procedure shows a large jump to 60+ megs in the reporting but the display goes by too fast to see just where.  The LOG file and the IDE process window contain some memory information and the LOG file is often retained on the disk (this can be forced using the Logoption command line parameter) or can be opened by the IDE.  But these items are not very useful because the output does not contain much detail.

 

_img61

 

Screen watching is not very satisfactory because

Staring at the screen for long time periods may not be effective and one may miss certain statements, may identify statements improperly or get distracted and have to redo the approach repeatedly.  Also statements may scroll by too quickly to observe.
GAMS line reporting is misleading when loops and if statements are being executed.  For example in running gamsloop2.gms the statements within the LOOP are all reported as if they were at the line number of the loop statement -28 in this case.  Individual calculations in the loop are not reported to the screen i.e. lines 29-34.  Thus through screen watching, one would not get any indication other than the loop is taking a lot of time and would not know where within the loop to look.  The same thing happens within if statements and other GAMS control structures.