HPC Grid Tutorial: How to Run STATA

Follow these steps to run STATA on the Grid. 

How to Run STATA - Interactive

You will need to download an X Window System. If you are using Unix, Linux, or OSX you can use X11. Follow the steps in the X11 Tutorial here, then continue at step 4 below. 

For Windows users, follow the Xming Tutorial here

1. Launch Xming.

2. Log on to the Grid.

3. Submit an interactive job: qsub -I -l mem=10gb -X

The -X option allows you to use an X Windows session.

4. Type: module load stata

5. Type: xstata

6. You are now running STATA.

 

How to Run STATA Non-Interactive

1. Log on to the Grid.

2. Create a my-stata.job similar to:

#!/bin/bash

#PBS -N stata

#PBS -l select=1:ncpus=8

#PBS -j oe

#PBS -m ea

module load stata

stata my-job-output.txt

3. Press the Escape key and type :wq to save and quit.

4. To submit the job type: qsub my-stata.job

5. The job is submitted. You can check to see what node it is running on with the following command: qme