Interactive Jobs
Legacy documentation
This page describes a service provided by a retired ACENET system. Most ACENET services are currently provided by national systems, for which please visit https://docs.computecanada.ca. |
- Main page: Job Control
Some tasks are not easily carried out by submitting a script and waiting for results to come back sometime later. For example:
- debugging (e.g. with TotalView)
- applications with graphical user interfaces (e.g. ANSYS Workbench)
- online data analysis (e.g. with R or Octave)
So, if your application is liable to consume memory in excess of 500MB, CPU time in excess of 15 minutes, or do I/O measured in gigabytes, but you need interactivity, then you need to use Grid Engine to get an interactive session.
There are many applications that involve graphics, but often graphics are only a method to visualize results after the intensive computing is done. If your result files are small enough to be moved off ACENET you may find it more productive to run your visualization program on your personal computer (workstation, laptop). If you prefer to visualize on the cluster then you can still use the instructions below, but remember to connect to the cluster with X11 forwarding.
When you request an interactive session, Grid Engine will only be able to schedule it either on the test queue nodes or on the production short.q
nodes (48 hours and less).
Serial job
This is how you can run a serial job job interactively in the test queue and in a production queue:
$ qrsh -cwd -l h_rt=00:30:00,test=true ./myapplication $ qrsh -cwd -l h_rt=00:30:00 ./myapplication
Parallel job
This is how you can can run a four-process MPI job interactively in the test queue and in a production queue:
$ qrsh -cwd -pe "ompi*" 4 -l h_rt=00:30:00,test=true mpirun myapplication $ qrsh -cwd -pe "ompi*" 4 -l h_rt=00:30:00 mpirun myapplication
Getting interactive shell
If you prefer to get an interactive login shell first and then run the application manually, you just need to specify the name of the shell as an application to run. Here is a few examples:
$ qrsh -cwd -l h_rt=00:30:00 bash $ qrsh -cwd -pe "ompi*" 4 -l h_rt=00:30:00,test=true bash $ qrsh -cwd -pe "ompi*" 8 -l h_rt=00:30:00 bash
If Grid Engine could satisfy your request, you will get a prompt on the shepherd host where you can launch your application under control of Grid Engine.
A serial code can be run in the usual way:
$ ./my_serial_code
An MPI application can be run like so:
$ mpirun myapplication
Please note that the number of processes started and the list of nodes where they run is passed to the job through Grid Engine. You do not need to specify any options for the mpirun
command.