Using R on NCSU HPC – OpenonDemand

Intro:

This is a guide on how to request an R Studio session using OpenonDemand on NCSU HPC.

Prerequisites:

HPC Access – gained through PI if you’re a student (cannot request access as a student).

Research Storage – faculty member requests (up to 20TB is free upon request), will need to add student once established/created. Your data is already on Research Storage, and Research Storage is mounted on the HPC Cluster, you shouldn’t have to move data anywhere.

Brush up on HPC/Linux basics and relevant R package:

If you are not already comfortable in a linux environment, please watch HPC Video Tutorial series.

Set up your R environment via conda

# BEFORE USING CONDA, FOLLOW STEPS AT THE LINK BELOW – IMPORTANT

# https://hpc.ncsu.edu/Software/Apps.php?app=Conda

Start up RStudio va OpenOnDemand

Follow instructions here or simply open the Open OnDemand RStudio interface and select the following options:

  • Queue: leave blank
  • Number of Hours: however many hours you need the session to be active. You can pick up wherever you left off as far as coding, but if you are running a long model it will be interrupted if it reaches its walltime before completion.
  • Number of Processors: how many cores you would like to run on – 16 or less may result in faster queue times.
  • Amount of Memory Requested: you may experiment here on how much you may need
  • Version of R Container: 4.5.0
  • Path to User Libraries: path to your conda environment followed by lib/R/library, e.g. /rs1/researchers/b/bnikifo/env/r-demo/lib/R/library

Click Launch, and you should be transferred to a new page which will show you when your session is ready. If you go back to the RStudio launcher interface, it will remember your previous selections so the process should be quicker.