Difference between revisions of "Applications/Stata"
From HPC
(→Application Details) |
|||
(19 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
* Description : Stata is a commercial statistical package, which provides a complete solution for data analysis, data management, and graphics. | * Description : Stata is a commercial statistical package, which provides a complete solution for data analysis, data management, and graphics. | ||
− | * Versions : Stata/SE 14.1.0 | + | * Versions : Stata/SE/14.1.0, Stata/SE/15.0, Stata/SE/17.0 |
− | * Module names : stata/SE/14.1.0 | + | * Module names : stata/SE/14.1.0, stata/SE/15.0, stata/SE/17.0 |
− | * License: University of Hull, Viper usage is restricted to two concurrent seats. When using Stata/SE on Viper you '''must''' request the appropriate license | + | * License: University of Hull, Viper usage is restricted to two concurrent seats. When using Stata/SE on Viper you '''must''' request the appropriate license either from the command line (''interactive session'') or as part of your batch script (''batch mode''), [[#Interactive|see below]]: |
+ | == License == | ||
+ | There are two licenses for Stata/SE that have been made available on Viper. In order to ensure correct license usage, it is important to request a license as detailed in the usage examples below. If no licenses are available, a job will be held pending until a license becomes available, with squeue showing a pend reason of ''(Licenses)'': | ||
+ | |||
+ | <pre style="background-color: #000000; color: white; border: 2px solid black; font-family: monospace, sans-serif;"> | ||
+ | JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) | ||
+ | 2521112 compute Statajob4 username PD 0:00 1 (Licenses) | ||
+ | 2531111 compute Statajob3 username PD 0:00 1 (Licenses) | ||
+ | 2531110 compute Statajob2 username R 2:48 1 c171 | ||
+ | 2531109 compute Statajob1 username R 4:48 1 c171 | ||
+ | </pre> | ||
+ | |||
+ | You can check on current license usage by running the following command: | ||
+ | |||
+ | <pre style="background-color: #000000; color: white; border: 2px solid black; font-family: monospace, sans-serif;"> | ||
+ | [username@login01 ~]$ scontrol show lic | ||
+ | LicenseName=statase | ||
+ | Total=2 Used=1 Free=1 Remote=no | ||
+ | </pre> | ||
+ | |||
+ | == Usage Examples == | ||
=== Executables === | === Executables === | ||
{| class="wikitable" style="background-color:#f5f5dc;" | {| class="wikitable" style="background-color:#f5f5dc;" | ||
Line 22: | Line 42: | ||
|- | |- | ||
| xstata | | xstata | ||
− | | Graphical version of Stata/IC which is the standard version of Stata. '''Note:''' For better performance and support for larger databases, | + | | Graphical version of Stata/IC which is the standard version of Stata. '''Note:''' For better performance and support for larger databases, xstata-se should be used. |
|} | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Interactive === | === Interactive === | ||
When running Stata/SE interactively, it is important to request the appropriate license by starting an interactive session in the following way: | When running Stata/SE interactively, it is important to request the appropriate license by starting an interactive session in the following way: | ||
Line 104: | Line 111: | ||
Submitted batch job 289529 | Submitted batch job 289529 | ||
</pre> | </pre> | ||
− | |||
=== Test Program === | === Test Program === | ||
Line 131: | Line 137: | ||
* [http://www.stata.com/ http://www.stata.com/] | * [http://www.stata.com/ http://www.stata.com/] | ||
− | + | {{Licensepagenav}} | |
− |
Latest revision as of 19:56, 1 June 2023
Contents
Application Details
- Description : Stata is a commercial statistical package, which provides a complete solution for data analysis, data management, and graphics.
- Versions : Stata/SE/14.1.0, Stata/SE/15.0, Stata/SE/17.0
- Module names : stata/SE/14.1.0, stata/SE/15.0, stata/SE/17.0
- License: University of Hull, Viper usage is restricted to two concurrent seats. When using Stata/SE on Viper you must request the appropriate license either from the command line (interactive session) or as part of your batch script (batch mode), see below:
License
There are two licenses for Stata/SE that have been made available on Viper. In order to ensure correct license usage, it is important to request a license as detailed in the usage examples below. If no licenses are available, a job will be held pending until a license becomes available, with squeue showing a pend reason of (Licenses):
JOBID PARTITION NAME USER ST TIME NODES NODELIST(REASON) 2521112 compute Statajob4 username PD 0:00 1 (Licenses) 2531111 compute Statajob3 username PD 0:00 1 (Licenses) 2531110 compute Statajob2 username R 2:48 1 c171 2531109 compute Statajob1 username R 4:48 1 c171
You can check on current license usage by running the following command:
[username@login01 ~]$ scontrol show lic LicenseName=statase Total=2 Used=1 Free=1 Remote=no
Usage Examples
Executables
Executable | Description |
---|---|
stata-se | Non-graphical Stata/SE designed for large databases, which can be used interactively through the terminal, or be used to run tasks automatically with the batch flag -b and a Stata do file. |
stata | Non-graphical Stata/IC which is the standard version of Stata. Note: For better performance and support for larger databases, stata-se should be used. |
xstata-se | Graphical version of Stata/SE, which can be used interactively in a similar working environment to Windows and Mac versions. |
xstata | Graphical version of Stata/IC which is the standard version of Stata. Note: For better performance and support for larger databases, xstata-se should be used. |
Interactive
When running Stata/SE interactively, it is important to request the appropriate license by starting an interactive session in the following way:
[username@login01 ~]$ interactive -L statase:1
Interactive with full graphical interface:
[username@login01 ~]$ interactive -L statase:1 salloc: Granted job allocation 289661 Job ID 289661 connecting to c174, please wait... Last login: Thu Jan 26 12:59:11 2017 from 10.254.5.246 [username@c174 ~]$ module add stata/SE/14.1.0 [username@c174 ~]$ xstata-se
Interactive with command line only:
[username@login01 ~]$ interactive -L statase:1 salloc: Granted job allocation 289663 Job ID 289663 connecting to c170, please wait... Last login: Thu Jan 26 12:59:11 2017 from 10.254.5.246 [username@c170 ~]$ stata-se ___ ____ ____ ____ ____ (R) /__ / ____/ / ____/ ___/ / /___/ / /___/ 14.1 Copyright 1985-2015 StataCorp LP Statistics/Data Analysis StataCorp 4905 Lakeway Drive Special Edition College Station, Texas 77845 USA 800-STATA-PC http://www.stata.com 979-696-4600 [mailto:stata@stata.com stata@stata.com] 979-696-4601 (fax) 50-user Stata network license expires 14 Nov 2017: Serial number: ############# Licensed to: HULL IT University of Hull Notes: 1. Unicode is supported; see help unicode_advice. 2. Maximum number of variables is set to 5000; see help set_maxvar. .
Batch Submission
#!/bin/bash #SBATCH -J Stata # Job name, you can change it to whatever you want #SBATCH -N 1 # Number of nodes (for Stata/SE should be always one) #SBATCH -o %N.%j.out # Standard output will be written here #SBATCH -e %N.%j.err # Standard error will be written here #SBATCH -p compute # Slurm partition, where you want the job to be queued #SBATCH -L statase:1 # Use 1 Stata/SE license (this MUST be included in State/SE job scripts module purge module add stata/SE/14.1.0 stata-se -b do testid.do
[username@login01 ~]$ sbatch STATAtest.job Submitted batch job 289529
Test Program
Below is a test example Stata batch file for submission to VIPER called testit.do
clear* set rmsg on set obs 1000000 forval n = 1/10 { g i`n' = runiform() } g dv = rbinomial(1,.3) memory qui logit dv i* qui xtmixed dv i* *with bootstrap: qui bs, reps(1000): logit dv i*