STATA

Description

From the STATA website: STATA is a complete, integrated statistical software package that provides everything you need for data analysis, data management, and graphics.

Version

  • 14

Authorized Users

  • STATA is available only to USF research groups that already have an existing STATA license.

Platforms

  • CIRCE cluster

Modules

  • apps/stata/14

Running STATA on CIRCE

The STATA user guide is essential to understanding the application and making the most of it. The guide and this page should help you to get started with your simulations. Please refer to the Documentation section for a link to the guide.

  • Note on CIRCE: Make sure to run your jobs from your $WORK directory!
  • Note: Scripts are provided as examples only. Your SLURM executables, tools, and options may vary from the example below. For help on submitting jobs to the queue, see our SLURM User’s Guide.

Interactive Mode

Establishing a GUI connection to CIRCE

To use STATA, you will need to connect to CIRCE with GUI redirection, either using:

  • CIRCE/SC Desktop Environment
  • SSH with X11 redirection
    • If connecting from OSX or Linux via SSH, please ensure that you use one of the following commands to properly redirect X11:
      • [user@localhost ~]$ ssh -X circe.rc.usf.edu

Next, use "srun" to enter an interactive shell (SLURM_Interactive). This example is for 24 hours using 4 cpu cores on 1 node with 8GB of shared memory:

echo $DISPLAY


The above command will show you which display to forward your connection to. The output of which will look similar to the following:

itn1.rc.usf.edu:18.0


You can now start an interactive srun session with the following command:

srun --time=24:00:00 --mem=8192 --nodes=1 --ntasks-per-node=4 --pty /bin/bash


Once you get dropped into an interactive shell on the execution host, you need to load the STATA module and set your DISPLAY variable to the output of your previous "echo" command.

module load apps/stata/14
export DISPLAY=itn1.rc.usf.edu:18.0


You should now be able to execute “xstata-se” (graphical mode) from the command line.

Batch Job submission

To run batch jobs on the CIRCE cluster, users will need to submit their jobs to the scheduling environment if their jobs take more than 20 minutes to run on a standard PC.

If, for example, you have a STATA script file named testjob.do with all your tasks defined in it, you would set up a submit script (called stata-test.sh in the example below) to use the stata command like this:

#!/bin/bash
#
#SBATCH --job-name=stata-test
#SBATCH --time=48:00:00
#SBATCH --mem=8192
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --output=output.%j.stata-test

#### SLURM serial STATA test to run for 48 hours with 8 GB of memory.

# Load the STATA module:
module load apps/stata/14

# Start STATA
stata-se -b do testjob.do
  • Note: The STATA license is limited to a single core (serial process) and 5000 variables.

Next, make sure you are in the job’s directory, and run the sbatch command to submit the job:

[user@login0 ~]$ cd my/jobdir
[user@login0 jobdir]$ sbatch ./stata-test.sh
  • You can view the status of your job with the “squeue -u <username>” command

Documentation

Home Page, User Guides, and Manuals

Benchmarks, Known Tests, Examples, Tutorials, and Other Resources

More Job Information

See the following for more detailed job submission information:

Reporting Bugs

Report bugs with STATA to the IT Help Desk: rc-help@usf.edu