Running R interactively on Stampede2 — or Frontera — is a good intermediate step before running R in batch mode. It is much easier to test script modifications and debug code in an interactive environment. For quick data analysis tasks that can be done in under 2 hours, you can run R interactively in the development queue; or if you prefer working with the Rstudio GUI, you can start up a session at the TACC Visualization Portal, although that is limited to the resources available on one node. For longer-running jobs it's probably safest to submit a batch script to the scheduler. Additionally, while you can specify other queues, TACC asks that you only use the development queue for interactive jobs; do remember that you can only have one job running in the development queue at any one time.

It is easy to request an interactive node on TACC systems (Stampede2 or Frontera) using either idev or srun, although the syntax for idev is simpler. The minimal command for idev is

You will be asked to specify the number of tasks per node (the default is 68). This will generate a 30-minute one-node interactive job in the development queue using your default account. You can specify a different account and time up to two hours, but without specifying requested resources on the command line, you are restricted to one node.

You can see idev options using ; for example, this command will give you 32 tasks split over two nodes, on your default allocation (note that you should use to specify a specific allocation that isn't your default):

The alternative to using , which is TACC-specific, is to use from the standard Slurm suite. Here we again request 32 tasks split over two nodes:

Regardless of which way you request an interactive job, when a node becomes available, it will be assigned to you, and then you can begin to issue commands. You will inherit the environment you had on the login node when you submitted your job. If you haven't already done so, you will need to load the modules necessary to run R (but if you already loaded them on the login node, they will remain loaded); this will set up the environment variables necessary for running R and make the R executable available in your path.

Your $HOME, $WORK and $SCRATCH directories are all available, and you can test R commands or write an R script and run it on the node(s) you have been assigned.

 
©  |   Cornell University    |   Center for Advanced Computing    |   Copyright Statement    |   Access Statement