Logging into the HPC, and setting up your environment¶
Within Rstudio you can set up an interactive session on the HPC within the terminal.
If you don't set up a session, you will be running R on the login node, which can be unstable. If you do this by accident, your process may be automatically shut down.
Step 1: Logging into the HPC¶
After opening a terminal in Rstudio, you can login to the HPC.
Use your normal HPC login credentials. Your screen will now look something like this:
Step 2: Starting an interactive session¶
Next, start an interactive session. You can do so by typing the following command:
bsub -q inter -P <YOUR_PROJECT_CODE> -Is -n 1 -R rusage[mem=16000] -M 16000 /bin/bash
<YOUR_PROJECT_CODE with your project code.
This will set an interactive session with 16 GB of RAM. Your regular RE sessions are capped at 8 GB so you should already have more than the RE at this stage. If you require more memory, you can change the options in the above command.
Now you will see:
Step 3: Working with R¶
Now load the R module:
module load lang/R/4.0.2-foss-2019b
Start R with:
It should now look like the screen below.
Now you can send code to the terminal to run on the HPC and use libraries available on the HPC. You may want to change your keyboard shortcuts to make this easier.
Go back to section 1: Steps to enable the Terminal in Rstudio
Go back to section 2: Steps to change keyboard shortcuts (Recommended for Mac users).