Friday, December 25, 2009

GAMS: very large listing file

I managed to create a ridiculously large listing file where the IDE has troubles displaying it. The size is 3,509,018,994 bytes, and more than 40 million lines. The GAMS IDE is quite smart in displaying large listing files: it does not store the whole file in memory. However in this case there is probably a problem in addressing file offsets. The IDE is not the only program that has problems with this. Also the tail command does not work:

C:\projects\xxx>dir lsterr.lst
Volume in drive C is HP
Volume Serial Number is 8AA3-C6D2

Directory of C:\projects\xxx

12/23/2009  06:50 PM     3,509,018,994 lsterr.lst
               1 File(s)  3,509,018,994 bytes
               0 Dir(s)  341,544,075,264 bytes free

C:\projects\xxx>tail lsterr.lst
tail: lsterr.lst: Invalid argument

In general I prefer to generate verbose listing files so I have a good chance I can find some relevant messages in case something goes wrong without rerunning the model. In this case the series of models just generated too much output. With option solprint=off; the listing file was small enough to be handled by the IDE without problems.

No comments:

Post a Comment