Open OnDemand

Open OnDemand (OOD) is a service that enables interactive applications to run as "batch" jobs on a normal HPC facility; these applications are then accessed via a web browser. The OOD service at Imperial is primarily focused on R and Rstudio. The URL for the OOD service hosted by the Imperial College RCS team is:

https://openondemand.rcs.ic.ac.uk/

You must be registered with the HPC service in order to use the OOD service.

We recommend you setup a Conda environment when using RStudio; these instructions demonstrate how to do this.

Creating a Conda Environment

We recommend you familiarise yourself with the use of Conda and R by going to the R application page. You will then need to prepare your Conda environment by first connecting to the login node using SSH (see the Getting started guide for advice on doing this).

Info

If you have not setup Conda yet, please do so first by following both sections - Using Conda and Anaconda Licensing

Once you've done that, you can now create a Conda environment to use within OOD.

[user@login ~]$ module load miniforge/3
[user@login ~]$ eval "$(~/miniforge3/bin/conda shell.bash hook)"
[user@login ~]$ conda create -n Renv r-base=4.1.2 -c conda-forge

The name after "-n" is a unique name for this environment, you can set this to whatever you see fit. Once that completes, you can install any other packages you may need. This environment can then be activated with:

[user@login ~]$ source activate Renv

Warning

Users should not install packages using install.packages or Cran as this may lead to conflicts, instead use Conda to install them.

For example, to install tidyverse, you can do:

[user@login ~]$ (Renv) conda install -c conda-forge r-tidyverse

To find packages, either search on the Anaconda website, or use the following replacing package_name with the name of the R package to be installed:

[user@login ~]$ (Renv) conda search "package_name"

Once all packages have been install OOD can be started.

Starting Open OnDemand

Open a web browser and go to https://openondemand.rcs.ic.ac.uk/. Log in with your university username and password if needed.

To start a new session click on Interactive Apps at the top of the page and select

OOD Interactive Apps

Once the page load it will look something like the following,

OOD RStudio Launch

  1. From the Resources drop down list select the most appropriate instance.
  2. In the text box below labelled "Conda Environment Name (Optional)" input the name of the environment we created above ("Renv" in this case), or any other environment you've previously created.
  3. The option "Conda Software Name (Optional)" supports different Conda distributions such as anaconda3, miniforge3 and a few others. This can be changed so that you select the correct distribution which you've got your Conda environment installed in.
  4. Click launch and the job will join a queue. Please be patient while your job sits in queue. The wait time depends on the number of cores and time requested as well as how busy the queue is.
  5. Once it starts, a button labelled "Connect to RStudio Server" should appear.

Clicking on that will start up Rstudio in a new window using the created Anaconda environment.

OOD RStudio Connect

Installing packages on Open OnDemand

Once the above has been followed, users can install new packages via the Rstudio Terminal.

Warning

As mentioned above, users should not install packages using install.packages or Cran, as this may lead to conflicts, instead use Conda to install them.

At the top left of the screen select the tab called Terminal. This will drop the user in to a bash screen on the compute node the job is running. This can be useful for running monitoring command like top or free but here it will be used to install packages.

OOD RStudio Terminal

First the R environment needs to be loaded, which is done in a similar way to before.

eval "$(~/miniforge3/bin/conda shell.bash hook)"
source activate Renv

Packages can then be installed. For example, to install tidyverse, you can do:

(Renv) conda install -c conda-forge r-tidyverse

To find packages, either search on the Anaconda website or use the following replacing "package_name" with the name of the R package to be installed,

(Renv) conda search "package_name"

The session doesn't need to be reloaded once packages are installed, simply switch back to the Console tab and load them as normal. This process only needs to be done once to install the required packages, they will persist for future sessions.

Clearing browser cache

Open on-Demand uses single sign-on to allow users to connect without having to input their password every time. However, this can sometimes become corrupted, preventing users from even loading the OOD home page. The issue can be identified if you are able to login via an Incognito or private browsing window but not via your normal browser. If closing all browser windows doesn't help then you may have to clear your browser cache. Below is some guidance on how to do this for the major browsers.

Clearing browser cache on Firefox:

  1. Open Firefox and click on the menu button (three horizontal lines) in the top-right corner.
  2. Select "Options" (Windows) or "Preferences" (Mac).
  3. In the left sidebar, click on "Privacy & Security."
  4. Scroll down to the "Cookies and Site Data" section.
  5. Click on the "Clear Data" button.
  6. Ensure that the "Cached Web Content" option is selected.
  7. Click on the "Clear" button.
  8. Restart Firefox to complete the process.

Clearing browser cache on Microsoft Edge:

  1. Open Microsoft Edge and click on the menu button (three horizontal dots) in the top-right corner.
  2. Select "Settings."
  3. Under the "Clear browsing data" section, click on "Choose what to clear."
  4. Check the box next to "Cached data and files."
  5. Optionally, you can select other types of data you want to clear.
  6. Click on the "Clear" button.
  7. Restart Microsoft Edge to complete the process.

Clearing browser cache on Google Chrome:

  1. Open Google Chrome and click on the menu button (three vertical dots) in the top-right corner.
  2. Select "Settings."
  3. If needed, scroll down and click on "Advanced" to expand the advanced settings.
  4. Under the "Privacy and security" section, click on "Clear browsing data."
  5. Select "All time" to clear all cache.
  6. Ensure "Cookies and other site date" is selected
  7. Click on the "Clear data" button.
  8. Restart Google Chrome to complete the process.