Running R interactively on 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 Analysis 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 like Frontera using either idev or srun, although the syntax for idev is simpler. The minimal command for idev is

If you have never before used , you will be asked to specify the number of tasks per node (the Frontera default is 56). 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 if you don't request more 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):

Note that is TACC-specific; the alternative is to use from the standard Slurm suite. Here we again request 32 tasks split over two nodes:

Of course, it would be wasteful to request 2 nodes if you aren't prepared to launch some form of parallel processing with R. This is a subject we will explore in the Parallel R topic.

For now, a single-node interactive job will be sufficient for running our simple examples. Regardless of which way you make your request, 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 Rstats module necessary to run R (but if you already loaded it on the login node, it 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
CVW material development is supported by NSF OAC awards 1854828, 2321040, 2323116 (UT Austin) and 2005506 (Indiana University)