Introduction
For Buckeye's with a computationally intensive project, ASC Tech's high-performance computing environment,
the
Unity cluster, may be the tool for you. This page
is intended to help users get up and running with Stata and the
R environment on the Unity cluster. The page is
currently under construction (i.e., more info to come)...
Setup for Windows
- If you are connecting to the Unity cluster from an off-campus location, then you need to connect via the ASC Virtual Private Network (VPN). The instructions and (Cisco) software you need to install to establish the VPN can be found here.
- Email asctech@osu.edu and ask them to enable your account.
- Download and install a SecureSHell (SSH) client along with an X Windows Server. The default installation options will work fine (e.g., install the programs in "C:\Program Files").
- PuTTY is a free and friendly SSH client
- Xming is a free and popular X server for windows
- X-Win32 is an alternative X server that it is freely available to OSU faculty, students, and staff (although not FOSS).
- Open Xming from the start menu
- No configuration is necessary. Note that you should see a little X icon in the taskbar.
- Start up PuTTY and add the following information for the category Session:
- Hostname: unity.asc.ohio-state.edu
- Saved Session: Unity (or whatever name you prefer)
(See red circles below). Be sure to click on Save so that you do not have to re-enter in the configuration information each time.
Then, under Connections :arrow: SSH :arrow: X11, select Enable X11 forwarding
Finally, click on category Session in the sidebar, save the Unity session again, and press open. This will spawn a new window (see screenshot below) prompting you for your username and password (these are the same as your OSU email account, e.g. thomas.3912 and the corresponding password).
If your terminal window looks like the above screenshot, then congratulations are in order:) as you have successfully connected to the Unity cluster!
- Download and install FileZilla, which will allow you to transfer files to and from the Unity cluster. As with PuTTY, we need to configure FileZilla by telling it where to find the Unity cluster and which credentials to log in with. We also need to specify the Port number as well -- think of a computer as a big building with lots of entrances/doors, and the port number just tells FileZilla which door to use. Open FileZilla and fill in the following configuration information:
- Host: unity.asc.ohio-state.edu
- Username: your OSU login (lastname.#)
- Password: your OSU email password
- Port: 22
and click on the "Quickconnect" button to log into the Unity cluster. Your FileZilla session should look like the following screenshot.
Set Up for Mac
Coming soon..
Interactive Sessions with Stata and R
- Start R by simply typing R at the prompt
- Install the Rcmdr library:
> install.packages("Rcmdr", dependencies=TRUE)
accept all of the default options and choose a CRAN site near your location
- Load the R Commander library which should start an R session.
> library(Rcmdr)
- qsub system: useful commands: qstat (qstat -u thomas.3912); showq; qdel jobID will delete a job; less useful: showstart jobID (get jobID from the qstat command; for more see OSC's page
- Notes: the email sent to users includes info on the node that is executing the job (not sure of the qsub command that tells this); to change to a node: try ssh u005
Submit a Stata Batch Job
- Stata is currently unavailable on the cluster, but the wheels are in motion to renew the license.
- When Stata is running again, we can use the following command to load the module (note that the actual command appears after the $ prompt)
[thomas.3912@unity-1 ~]$ module load stata
- To install new programs (e.g., ssc install ice), we need to edit the shell configuration file. To find out which shell you are using, run the following command
[thomas.3912@unity-1 ~]$ ECHO $SHELL
/bin/bash
which tells us that we are using the Bash shell (probably the default). We need to tell the shell where to install the files Stata needs, so let's create a new directory called "ado" with the command mkdir ~/ado
and have Stata store the files there. For the Bash shell, edit the file ~/.bashrc
(in your home directory) and add the following lines:
STATATMP="/home/YOUR_USER_NAME_HERE/ado"
export STATATMP
Next, run the following command from the terminal:
[thomas.3912@unity-1 ~]$ source .bashrc
- If you typed the command
ECHO $SHELL
and Unity returned /bin/csh
or /bin/tcsh
(versions of the C Shell) or, then edit the following file ~/.cshrc
(for csh) or ~/.tcshrc
(for tcsh) and add the following line
setenv STATATMP "/path/to/directory"
make sure to replace /path/to/directory
with the path to the folder where you want Stata to store all the installation files (you need to create this folder if it does not exist).
Here is a script taken from
ASC's Intro Page:
#!/usr/bin/bash
#
# PBS file to run Stata batch job
# Invoke like (-v variable)
# qsub -d "$PWD" -v DOFILE=stataJob.do runStata.pbs
#
#PBS -l walltime=120:00:00
#PBS -l nodes=34:ppn=16,mem=8GB
#PBS -j oe
#PBS -m abe
#PBS -M thomas.3912@osu.edu
# Above commands:
## -N -- name of job
## -j -- write errors to a log file
## -m -- send email when/if job (b) begins, (e) ends, or (a) aborts
## -M -- email address where message is sent
module load stata
stata -b do ${DOFILE}
Submit an R Batch Job
Here is a PBS script for running an R batch job.
#!/bin/bash
#PBS -l walltime=00:10:00
#PBS -l nodes=1:ppn=3,mem=3GB
#PBS -N example_R_job
#PBS -j oe
#PBS -m bea
#PBS -M thomas.3912@osu.edu
# Above commands:
## -N -- name of job
## -j -- write errors to a log file
## -m -- send email when/if job (b) begins, (e) ends, or (a) aborts
## -M -- email address where message is sent
#COMMANDS TO RUN
module load intel/16.0.3
module load R/3.5.0
R CMD BATCH example_R_script.R
Information about your Unity Account
Coming soon..
Useful links
- Unity Cluster Nodes
- Help with the Portable Batch System (PBS)