how to choose not to output lst file in Linux

Problems with syntax of GAMS
yanzhiping
User
User
Posts: 63
Joined: 4 months ago

how to choose not to output lst file in Linux

Postby yanzhiping » 4 months ago

According to https://www.gams.com/latest/docs/userguides/userguide/_u_g__gams_call.html#GAMSLogOption, If we try

Code: Select all

gams trnsport, or gams trnsport  o myrun.lst
, The call will create an output file called trnsport.lst (for PC and Unix platforms) in the current directory.

So can we choose not to output lst file in Linux since it is such a huge document?

Fred
Posts: 6
Joined: 9 months ago

Re: how to choose not to output lst file in Linux

Postby Fred » 4 months ago

Hi Ping,

There is a page on how to to supress/reduce output to the listing file in the GAMS Support Wiki: http://support.gams.com/gams:how_do_i_r ... _.lst_file
To completely supress creation of the lst file you could run the trnsport example as follows (on a Windows machine):

Code: Select all

gams trnsport o=Nul


Please note furthermore that running

Code: Select all

gams trnsport  o myrun.lst

will NOT create trnsport.lst but myrun.lst.

I hope that helps!

Best,
Fred

yanzhiping
User
User
Posts: 63
Joined: 4 months ago

Re: how to choose not to output lst file in Linux

Postby yanzhiping » 4 months ago

I did try
gams trnsport o=Nul
, then it output a huge (~2.5G) file named Nul.
How may I avoid such file? I think I only want the log file which is much smaller and has everything I want.

Fred
Posts: 6
Joined: 9 months ago

Re: how to choose not to output lst file in Linux

Postby Fred » 4 months ago

Ping,

The example referred to Windows (I overlooked that you explicitly asked for a solution under Linux). However, under the Link I sent (http://support.gams.com/gams:how_do_i_r ... _.lst_file) you can find the relevant information:

You can completely shut off output to the lst file from the GAMS model by sending it to NUL under Windows or to /dev/null on most Unix machines. To run a model completely quietly (i.e. without any output to the screen or to the log file), run:
Windows: gams trnsport o=nul lo=2 lf=nul or gams trnsport o=nul lo=0
Unix: gams trnsport o=/dev/null lo=2 lf=/dev/null or gams trnsport o=/dev/null lo=0


Return to “Syntax”

Who is online

Users browsing this forum: ZNSen and 1 guest