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 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
Panel | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
To begin, open your prefered SSH shell and log into gadi.
Once you are logged in, you will need to download the program, this can be done by clicking this link, hello_mpi.c You will need to transfer this file into your home drive, for guidance on this, please see our file transfer guide. To build and compile this program into something that can run on Gadi, we will be using the command |
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, |
Panel | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
For this job we will be designing a very simple script. This can be written in whichever editor you wish, e.g. Vim, Nano, etc, and contains simple lines that tell PBS what how you want to run your job. We will use Vim in in this case and you can open it by simply running the command
Once Vim is open, you can start preparing your script, it should look similar to this simple outline below.
These parameters tell the PBS scheduler how you would like to run your job, in this case:
To save your script, enter |
Panel | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||
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. |