Stata - bwHPC Wiki Stata - bwHPC Wiki

Stata

From bwHPC Wiki
Jump to: navigation, search
Description Content
module load math/stata
Availability Up-to date availability
License Commercial.
Citing n/a
Links Homepage | Documentation
Graphical Interface Yes

1 Description

Stata is a software package for statistical computations in research and development. Many statistical methods are available.

2 Versions and Availability

A list of versions currently available on all bwHPC-C5-Clusters can be obtained from the
Cluster Information System CIS

3 General Usage

For Stata the following variants are available:

  • Stata/MP (MP = Multiprocessing)
  • Stata/SE (SE = Special Edition)
  • Stata/IC (IC=InterCooled)

The license allows the usage of the multiprocessing variant Stata/MP for up to 16 cores. Due to internal shared-memory parallelization you can expect a speed-up for large-scale applications. Working with Stata/MP does not differ from working with other Stata variants. The graphical user interface and the statistical functions are the same. You do not have to care about parallelization; Stata/MP manages this for you.

To check if Stata is available execute

$ module avail math/stata

If Stata is available you can load a specific version or you can load the default version with

$ module load math/stata

To show environment variables, which will be available after 'module load'

$ module show math/stata


After loading the Stata module with the following start-up commands are possible:

Stata/MP Stata/SE Stata/IC
Command line variant stata-mp stata-se stata
Graphical variant xstata-mp xstata-se xstata

4 Batch Example

Example scripts are available in the directory $STATADIR/bwhpc-examples

#!/bin/sh 

# Number of nodes and cores (processors per node)
#MSUB -l nodes=1:ppn=16
# Runtime limit
#MSUB -l walltime=00:10:00 

module load math/stata/15.1

# Start stata-mp with script analyse.do
# Output is automatically saved in analyse.log 
stata-mp -b do analyse 

# notice for tests
echo "job terminated successfully"

5 Interactive Example

With graphical interface

# use -X for ssh X-forwarding to connect to bwUniCluster or bwForCluster MLS&WISO

ssh -X <UserID>@bwunicluster.scc.kit.edu or
ssh -X <UserID>@bwfor.cluster.uni-mannheim.de or
ssh -X <UserID>@bwforcluster.bwservices.uni-heidelberg.de

# use -X for X-forwarding on the Cluster
# Open an interactive batch session, e.g.:
$ msub -I -X -l nodes=1:ppn=16,walltime=1:30:00
# Load Stata module:
$ module load math/stata
# Start a graphical variant, e.g.:
$ xstata 

Hint: To find right tool for your client(Windows, Mac, etc.) follow here