Stata
-
Using the Statistical Analysis Package Stata
Stata License Information
UNCG has purchased a Stata license so that their faculty, staff, and students can take advantage of the HPC cluster. There are some specific departments within NC State that have purchased a license, but there is not a globally available license for all of NC State. Some Stata users have suggested that (due its handling of matrices), MATLAB scripts can sometimes be used instead of Stata.
Batch Runs of Stata
For an example input file named simulation-example.do, create a batch script run-stata.sh containing:#!/bin/bash #SBATCH --time=00:30:00 #SBATCH --ntasks=1 #SBATCH --output=out.%j #SBATCH --error=err.%j module load <name of stata module you use> stata -b do simulation-example
Then use the command
sbatch run-stata.sh
to submit the job. (Thanks to Matt Twombley for the example input file "simulation-example.do".)
In running your real job you will need to make changes to the example batch script based on your situation, such as changing the Slurm run time limit in "#SBATCH --time=00:30:00". For how to formulate an appropriate batch script please refer to the documentation on running jobs.Last modified: September 01 2026 21:22:40.
HPC Assistant