Economics should be open

June 3, 2010

Tips for running long stata jobs, UNIX

Filed under: Uncategorized — howardchong @ 12:51 am

Here are some tips for running large stata jobs in linux/Unix

  1. Turn off the GUI and run the command on the command line
  2. hit CTRL-F1
    login
    sudo /etc/init.d/gdm stop  // this stops the GUI
    stata -b do mydofile.do
  3. Run one command after another
  4. stata -b do firstfile.do ; stata -b do secondfile.do ; stata -b do third.do
  5. Delay the start of the command
  6. sleep 14400 ; stata -b do myfile.do
    #NOTE: sleep takes seconds as argument, so that is 4 hours. Adjust to your needs.

Don’t forget top to check on your processes. Don’t allocate so much memory that you start paging to disk.

Your hints/advice are welcome!


Advertisements

2 Comments »

  1. With a default installation, you should’t have to ‘turn off the GUI’, that should be the difference between /usr/local/stata12/stata-mp and /usr/local/stata12/xstata-mp with the latter having x enabled, thus a GUI,

    When people do run batch jobs, they’ll need reminding that they must put exit, STATA to their batch do files. Otherwise they’ll be sitting at a stata prompt when the .do file is complete.

    Comment by djhousley — June 10, 2014 @ 9:02 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: