SUBMITTING AN INTERACTIVE JOB
By default, when running anything on the CQ University HPC systems, unless you are preforming simple tasks or doing a “quick test”, all programs must be executed on the “compute” nodes.
As documented in the section “HPC Job Scheduler“, the HPC system is a very “large” shared resource, in which users submit jobs to a “scheduler” to have their programs execute on the HPC compute nodes. When a job or interactive session is submitted, the scheduler checks to see if the requested resources, such as memory and CPU, are available. If a compute node has the available resources, the scheduler executes the job on the selected compute node, otherwise, the job (or interactive session) is queued until compute resources become available.
By default, users will generally submit each job as a “non-interactive batch job”. This has the advantage of not requiring a “Graphical User Interface (GUI)”, as the jobs can be submitted by simple “command line” instructions. Additionally, users can create simple scripts that submit a large number of jobs (10’s, 100’s, 1000’s or more).
There are times when users need the flexibility of an interactive session, such as seeing “live” results, that enables fast development and testing of computer program or simulation. Non HPC users have traditionally executed their programs on a single machine, such as a desktop computer or small computer server, in which they are generally the only user running programs on the system. As the HPC system is a shared resource, if were users were to execute their interactive jobs on a “login” node, the login node would “degrade” and affect the useability of the system to the other users. As an example, imagine 100 users all running their applications on a single machine. Additionally, the “compute” node resources would be wasted as they are not being used.
The CQUni HPC Scheduler has the capability to submit an “interactive” job to the system, in which the scheduler will connect to a computer that has the requested resources available (if available) and will reserve the requested resources from that compute node for the user to use. Within the interactive session, you will be able to use the system like you would on a normal “single machine or server” and run your particular computer program as normal. The interactive session also provides the capability to run graphical applications, such as matlab or ABAQUS. Thus, using an interactive session allows you to conduct longer test sessions or running your favourite graphical applications whilst utilising the compute node resources.
The following instructions demonstrate how to submit an interactive job to the HPC scheduler.
Submitting an Interactive Job on the HPC Scheduler
From within a Strudel or SSH session (for more information on connecting to the HPC click here) you can start a terminal session and issue the following command:
qsub -I -X -l ncpus=[number of CPU's required],mem=[amount of required memory]
real life example
qsub -I -X -l ncpus=1,mem=4g
This will start an interactive session on a compute node (as determined by the HPC scheduler).
Note: interactive sessions consume resources until the session is terminated. Therefore, once you are finished, issue the command:
Ctrl-D
The following provides some simple screen shots on the process:
Step 1 – Start the interactive session within the VNC session on the terminal;
Note: In the above example, the interactive session has been started on the compute node gn001. This may vary depending on currently HPC ultilisation.
Step 2 – Execute your program
Once you have a terminal session on a compute node, you can simply type in the command you wish to execute. Additonally, you can use the command myjobs
to actually see your interative job within the HPC scheduler.
Note: In the above example, matlab is executed. After a few seconds, the application Matlab will start and be displayed. You can use the program like you would on any other computer. Once you have finished with matlab (or any or application you are using) simply exit out of the program.
You will notice that you are still connected to the “compute note” as part of the interactive session.
Step 3 – Once finished, exit the interactive session by issuing ctrl-d
You should get a qsub: job [id].pbsserver completed
message.
Additionally, you can check if your session is running or as been terminated by using the ” qusers
” command.
As you can see (by issuing the command) – your HPC interactive job has finished and no longer using any of the HPC resources.