This is an old revision of the document!
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
#!/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
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