Stata on Myriad - UCL/ECON-CLUSTER GitHub Wiki
After connecting to myriad:
module load stata # (loads stata module which sets unix environment variables needed to run stata)
stata-mp # (command line version of stata mp)
xstata-mp # (GUI version of stata mp. This will only work if you connect to myriad using X forwarding. "ssh -X [email protected]"
This will run an interactive session on the login node. Use this for short, interactive, development sessions that don't use a lot of memory or system resources
To run an interactive session on one of the compute nodes:
qrsh -l h_rt=24:0:0,mem=8G -pe smp 8 -now no
This connects to a compute node with:
1) maximum 24 hours runnning time
2) 8GB of memory
3) 8 processing cores all on a single server (stata-mp can use up to N cores, I don't know what N is. each myriad server has 36 cores)
4) -now no asks the scheduler NOT to quit if failure to schedule
After connecting with qrsh, then:
module load stata
xstata-mp or stata-mp
To submit a batch job, write an SGE script and submit with qsub. SGE script is a text file. Below is example:
qsub job1.sh
Below is the text of the file: job1.sh
#!/bin/bash -l
#$ -S /bin/bash
#$ -l h_rt=24:0:0
#$ -l mem=2G
#$ -l tmpfs=4G
#$ -pe smp 8
##$ -t 1-5. # use this to submit a task array
#$ -N stata_job1
#$ -wd /home/username/Job1Directory
#$ -o /home/username/Scratch/Job1OutputDirectory/job1.log
module load stata
date
stata-mp -b job1.do
date
# First two lines tell the scheduler and the server to use bash
# h_rt = 24:0:0 max run time of 24 hours
# mem=2G request 2GB of memory
# tmfs=4G requests 4GB of temporary file system space
# -pe smp 8 request to use the smp parallel environment with 8 processing cores
# -t allows one to submit an "array of tasks"
# -N is the job name
# -wd is the working directory
# -o is the output log
#end of script
After submitting: qstat shows the status of the job (including job_id). qdel job_id to delete the job man qstat for documentation on qstat
Hopefully all above is correct.