SCIAMA
High Performance Compute Cluster
Exercise: Submitting an interactive job
Introduction
In this exercise we will run some simple “R” commands interactively on a compute node. Please read the related article HERE on how to run interactive jobs on SCIAMA-4.
Exercise
First we need to allocate resources (here 1 task/core by default) on a compute node and run a shell on it:
The terminal should respond similar to:
...............
Your terminal is blocked until the resources become available. Use the squeue command in another terminal/ssh login and identify your interactive job and verify the partition it is queued for.
Once the requested resources are available, a new shell opens on one of the requested node. Make sure to use srun to run any process, especially those using multiprocessing like MPI.
Ensure you have the “R” module selected in this shell:
If not select the R package:
In the terminal run the R program. Execute the following commands (a file with these command can be found in the training/scripts directory):
{ return(x^2) }
print(Square(4))
print(Square(x=4)) # same thing
quit()
You should see output similar to:
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type ‘license()’ or ‘licence()’ for distribution details.
R is a collaborative project with many contributors.
Type ‘contributors()’ for more information and
‘citation()’ on how to cite R or R packages in publications.
Type ‘demo()’ for some demos, ‘help()’ for on-line help, or
‘help.start()’ for an HTML browser interface to help.
Type ‘q()’ to quit R.
[Previously saved workspace restored]
+ { return(x^2) }
> print(Square(4))
[1] 16
> print(Square(x=4)) # same thing
[1] 16
> quit()
Save workspace image? [y/n/c]: n
Exit from the interactive shell by typing exit or EOF/EOT interrupt via CTRL-D.