r3 - 03 Dec 2013 - 11:44:31 - MartinCYou are here: TWiki >  Sandbox Web > TestTopic7

Stata on ARC1

Access to Stata

A two user network license of Stata/MP release 12 is installed on Arc1. This is the multicore version of Stata the data analysis and statistical software. The version installed will support Stata running on up to eight cores per job.

To access this software you need to be a member of the Stata unix group, please contact arc-help@lists.leeds.ac.uk if you wish to be added to this group.

Stata should be primarily run through batch queuing system, however short interactive runs can done on the login nodes. You can run Stata interactively though the batch queue system.

Setting the module environment

Before you can run the software you will need to load the Stata module. To load the module from the Arc1 command line, do:

module add stata

To check that module is loaded you can use:

module list

Interactive Stata sessions

It is anticipated that the main benefit of running Stata on the Arc1 facility will be from running non-interactive/unattended batch sessions. However, it is also possible to run in interactive more for short test for visualisation of data for instance.

Interactive sessions on the login nodes - for short tests only!

Stata can be launched on the login nodes for short tests, ideally less than 5 minutes computation, by using the appropriate executable name at the command prompt. For the Stata command line interface use:

and for the full graphical interface using:

Interactive sessions through interactive shells

For longer interactive sessions, it will be necessary to launch Stata through batch queues, using the command qrsh. The length of time required is specified as an option to the queueing system and specified in the format <hh:mm:ss> . For instance to request an interactive session for two hours, the full command takes the form:
qrsh -cwd -V -pe smp 8 -l h_rt=02:00:00,h_vmem=1536M xstata-mp
  • -cwd -V : run from current directory and with current environment, i.e. loaded module.
  • -pe smp 8 : request 8 cores in shared memory environment. The requests appropriate number of computational cores to take advantage of the multicore nature of Stata.
  • 00:02:00 : is the length of time needed for the job, 2 hours in this case. Job will be killed when this time has elapsed.
  • h_vmem=1536M : Amount of memory requested per core. The value given here will make use of all available memory on the majority of the Arc1 nodes.
For more details about these and other available options please look at the qrsh page.

Batch execution

In oder to submit a batch job to the cluster it is necessary to use a submission script. An example submission script, stata_sub_example.sh, takes the form:

# Batch script to run a Stata/MP job on Arc1

# Run from current directroy and environment.
#$ -cwd -V
# Request wallclock time. Format hh:mm:ss, for e.g 6 hours
# maximum allowed is 48 hours.
#$ -l h_rt=06:00:00
# Specify amount of memory per core. Default is 1Gb.
# For Stata best to request 1536M, as this will allocate all memory in node.
#$ -l h_vmem=1536M
# To get an email when the job begins and ends
#$ -m be
# Request 8 cores from the machine. 
#Current version of Stata can will needs to run on 8 Cores
#$ -pe smp 8

# Load the Stata module
module add stata

# Start the Stata job, with your program in
# a file your_do_file.do
stata-mp -b do your_do_scrip.do

The job can then be submitted to the queuing system using the command:

qsub stata_sub_example.sh

For more details on options used above and some of the other options available please look at the qsub page.

Comments & questions about this topic


-- DureidElMoghraby - 08 Nov 2012

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions

tip TWiki Tip of the Day
File attachments
One can attach files to any topic. The action of attaching a file to a topic is similar to attaching ... Read on Read more
HPC at Leeds University
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback