Difference between revisions of "Stata"

From Storrs HPC Wiki
Jump to: navigation, search
Line 23: Line 23:
 
# You must connect using [https://wiki.hpc.uconn.edu/index.php/X X2Go] software (unless you are using Unix or Linux, in which case can use SSH with the options -XC, for X windows and compression).
 
# You must connect using [https://wiki.hpc.uconn.edu/index.php/X X2Go] software (unless you are using Unix or Linux, in which case can use SSH with the options -XC, for X windows and compression).
  
When you start X2Go, you will get a console.  In this console, type the following
+
When you start X2Go, you will get a console like this.   
 +
 
 +
 
 +
[[File:Stata-screen-1.png|border|X2Go opens this window]]
 +
 
 +
 
 +
In this console, type the following
 
   module purge
 
   module purge
 
   module load stata/15-SE
 
   module load stata/15-SE
 
   xstata-se &
 
   xstata-se &
After a few seconds, you should see a window like this
+
 
 +
 
 +
[[File:Stata-screen-2.png|border|Commands to start XStata]]
 +
 
 +
 
 +
Once Stata starts, you should see a window like this:
 +
 
 +
[[File:Stata-screen-3.png|border|Xstata startup window]]

Revision as of 16:48, 6 September 2018

Running Stata as batch Job

Here's an example as batch file that you can use to run Stata

 #!/bin/bash
 #SBATCH --ntasks=1
 #SBATCH --partition=general

 module purge
 module load stata/15-SE

 stata-se -b MyJob.do

This will run the Stata commands that you've placed in the file MyJob.do.


Running Stata via its interactive GUI

UNDER CONSTRUCTION

You can run Stata as a GUI, so that Stata runs on the HPC cluster, but it will display its GUI Window on your local desktop/laptop. You will need to meet these conditions

  1. You must be on campus, or use the VPN, to run the Stata GUI. You can learn more about the VPN here
  2. You must connect using X2Go software (unless you are using Unix or Linux, in which case can use SSH with the options -XC, for X windows and compression).

When you start X2Go, you will get a console like this.


X2Go opens this window


In this console, type the following

  module purge
  module load stata/15-SE
  xstata-se &


Commands to start XStata


Once Stata starts, you should see a window like this:

Xstata startup window