User Tools

Site Tools


platform:how_do_i_run_gams_in_the_background_on_a_unix_machine

This is an old revision of the document!


How do I run GAMS in the background on a UNIX machine?

How do I run GAMS in the background?

   gams trnsport &

does not seem to work.

That is correct. GAMS writes directly to /dev/tty and a background job does not have access to that. The following command will do the job:

   gams -lo 0 trnsport &

The log option flag tells GAMS not to write anything to the screen. An even better way is to use a small script called gamsbatch that reads:

   #!/bin/csh -f
   set basename=$1:r
   gams $* -ll 1 -lo 2 -lf $basename.log &

This will write what normally goes to the screen to a log file instead. For example, if called as gamsbatch trnsport, transport.log will be created. Most GAMS systems contain this script.

On some systems after you log out even background processes will get killed. On those systems use:

   nohup gamsbatch trnsport
IMPRESSUM / LEGAL NOTICEPRIVACY POLICY platform/how_do_i_run_gams_in_the_background_on_a_unix_machine.1209968435.txt.gz · Last modified: 2008/05/05 08:20 by support