Running a batch job#

Interactive jobs are great if you need to do something quick (perhaps visualize some data). If you have code that runs for seven hours, an interactive job is not a great idea. This is because an interactive job is killed if you close the SSH connection. So, for example, if you start an interactive job, but then your laptop falls asleep, the SSH connection will disconnect and your job will be killed.

If you have some truly serious, multi-hour (or multi-day) computation (and that’s what Picotte is really good for), a better idea is to run it in the background using a batch job. Submitting a batch job is conceptually similar to an interactive job (just a different command), but the job will run on its assigned compute node in the background until it’s over. If it needs to take two days, it takes two days. You can quit the SSH client or close your laptop, it won’t affect a batch job.

Let’s walk through an example of running a batch job. This will put together everything we’ve learned, from job submission, to using environment modules to load scientific software on Picotte.