Step 4: Running R
Run R using the batch scheduler (LSF).Running from the scratch directory
You should keep source code and scripts in your home directory, but you should run your jobs from the scratch directory. Code and scripts need to be in permanent storage. Output files can be large, and they should be generated in the scratch directory. Since the scratch directory is purged every 30 days, you must move the outputs that you want to keep to a local computer or to mass storage. You will ask for mass storage in Step 7.
Exercise 4.0: Always run from the scratch directory
The directory name, /share, is an alias to another directory, and it is not the same for every user. Usually you would not need to know this, but printing the working directory from /share may be confusing. Here is what the full path may look like for a typical user:
[unityID@login ~]$ cd /share/groupname/unityID/ [unityID@login unityID]$ pwd /gpfs_common/share01/groupname/unityID
Hint: Add the argument '-r' (for recursive) to the usual copy command to copy an entire directory.
Finding software specific information
Click to open a new tab to the HPC home page. Look for Software Packages under Resources. In this list, find the current version of R and the Load Environment. Look at the column How to use... for examples.
Using the software documentation
Use the R documentation to complete the following exercises.Exercise 4.1: Submit a R job to a compute node using LSF
All of the required instructions are in the documentation on using R.bjobs. When you first submit a job to LSF, the job will be listed with a PEND (pending) status. Hit the [up] arrow key to repeat bjobs to check the status. After the job begins, the status will be changed to RUN.file weather.pdf to check that it is a valid PDF file. If not, check the LSF output files generated from your run. Modify and resubmit the job if necessary.