Pulling it all together - Preparing, submitting and monitoring a job on Prince
In this section we will prepare, submit and monitor a small R job. Our test case comes from the NYU Data Services "Introduction to R" tutorial
Start a terminal session on Mercer and replicate this example in it.
Choose your own example
After - or instead of - following this example through, prepare and submit a run of something genuinely relevant to your research. This way, if you are doing this tutorial in a classroom, the presenter will be available should you have questions or strike difficulties
We're using R, so first we'll look for available modules. On mercer:
There's a few modules starting with r, and a couple of versions of R. We'll use the latest version, 3.1.2.
Take a look at what it did:
... clearly, R uses a lot of other packages. The modulefile has looked after loading the correct ones.
For our example, we'll get some code and data from
Hint: there are usage examples for a few common packages here
Take a look at the job script:
There are a few steps we can try here:
- Start an interactive batch session, and run the example.R script interactively
- Close the interactive session, and submit the batch script as a job:
You'll get a job id returned.
Is it running yet?
You could watch the output in the run directory:
Finally, when the job finishes, you should see a .out file in the directory you submitted from.
Experiment with sbatch options for the job name, output and error file merging and location, resource limits.