|
One can carefully watch the screen or IDE process window (LOG file) report during execution. In that display, GAMS reports the line number that it is executing. If the program pauses on a line number for a moderately long time, then one would look at that line as a cause of slow execution (reasons why a statement may be slow are discussed below).
Example:
When I run gamsslow.gms, the diligent screen watcher may see that the line reporting pauses longest on statements 29,30,31,32 but I really can't on my computer.
Notes:
Screen watching and or LOG file examination are not good problem detection techniques for two reasons.
| • | 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. |
| • | GAMS line reporting is misleading when loops, if and other control structure 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-31. 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. |
|