Panel | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
This tutorial is designed to show you how to download, compile, and run a simple job on Gadi, allowing you to practice submission before running your own binary. In this instance you will be running a simple 'Hello world' job, which will teach you the basics of building and submitting a job, while also showing you some tips on monitoring the job as it runs. For the majority of jobs, you can run a similar workflow to this tutorial, that being:
|
Panel | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
Anchor | ||||
---|---|---|---|---|
|
Panel | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
To begin, open your prefered SSH shell and log into gadi. | Downloading and Compiling | Downloading and Compiling
Panel | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||
To do so, we need to load the
OpenMPI is an open-source message passing interface (MPI) that assists with running parallel jobs on a supercomputer. As you can see on the right, the '
You can check what modules you have loaded into the environment by running the command
You should see that Once successfully loaded, we can now begin compiling the job, to do this run the command
This will compile a binary file for you, named
On the right you can see the original file, |
Anchor | ||||
---|---|---|---|---|
|
Panel | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||
Anchor |
| ||||||||||||||||
Creating a Job Script | To run jobs on Gadi, users need to create a PBS submission script. A PBS script is a list of parameters that will tell Gadi what resources you want to use while running the job. You can outline how much walltime your job will take, along with the CPU's required, and how much memory to allocate to it. You can read our job submission guide for an indepth look at how to write submission scripts, along with our PBS environment guide for useful ways to customise your scripts.
Code Block | ||
---|---|---|
| ||
$ vim |
Tip |
---|
For people new to Linux and text editors in general, you can get a great break down of vim and its uses, including short lessons, by running
|
Once vim is open, you can start preparing your script, it should look similar to this simple outline below.
Code Block | ||
---|---|---|
| ||
#!/bin/bash #PBS -P <Project code> #PBS -q normal #PBS -l ncpus=4 #PBS -l mem=16gb #PBS -l walltime=00:10:00 module load openmpi/4.1.5 mpirun hello_mpi |
These parameters tell the PBS scheduler how you would like to run your job, in this case:
To save your script, enter :wq script.sh
to write(w
), quit(q
) and name your file script.sh
. This will save your script and send you back to the your home directory, where you will be ready to submit your job to Gadi.
Anchor | ||||
---|---|---|---|---|
|
Panel | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
Anchor |
| |||||||||||||||||
You've now compiled your job and written your job script, it's time to submit your job to the PBS scheduler. Jobs are submitted using the command
Which will submit the job and give you a jobID, as you can see below You can now begin monitoring and get data on what is happening while it is running on Gadi. There are several methods to monitoring jobs and analyse data, for this tutorial, we will focus on one of the simpler methods. For a more indepth look at ways to monitor jobs, please see our job monitoring page. To monitor your job while it is running, you can enter the command
Which will print information like this As you can see in this screenshot, the job entered the queue and finished, and as it is a very small job, it took only one second to complete This will produce two new files in your home directory, with a filename The output file can be opened by running the command
Giving you this information This shows the job reporting back ' |
Panel | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
You have run your first job on Gadi! Although it might seem small, it is a great stepping stone to learning more about high performance computing. |