The submission of interactive jobs instead of batch jobs is useful in situations where a job requires your direct input to influence the job results. Such situations are typical for X Windows applications or for tasks in which your interpretation of immediate results is required to steer further processing.
You can create interactive jobs in three ways:
qrsh – The equivalent of the standard UNIX rsh facility. A command is run remotely on a host selected by the grid engine system. If no command is specified, a remote rlogin session is started on a remote host.
qsh – An xterm that is displayed from the machine that is running the job. The display is set corresponding to your specification or to the setting of the DISPLAY environment variable. If the DISPLAY variable is not set, and if no display destination is defined, the grid engine system directs the xterm to the 0.0 screen of the X server on the host from which the job was submitted.
To function correctly, all the facilities need proper configuration of cluster parameters of the grid engine system. The correct xterm execution paths must be defined for qsh. Interactive queues must be available for this type of job. Contact your system administrator to find out if your cluster is prepared for interactive job execution.
The default handling of interactive jobs differs from the handling of batch jobs. Interactive jobs are not queued if the jobs cannot be executed when they are submitted. A job's not being queued indicates immediately that not enough appropriate resources are available to dispatch an interactive job at the time the job is submitted. The user is notified in such cases that the cluster is currently too busy.
You can change this default behavior with the -now no option to qsh, qlogin, and qrsh. If you use this option, interactive jobs are queued like batch jobs. When you use the -now yes option, batch jobs that are submitted with qsub can also be handled like interactive jobs. Such batch jobs are either dispatched for running immediately, or they are rejected.
Interactive jobs can be run only in queues of the type INTERACTIVE. See Configuring Queues in N1 Grid Engine 6 Administration Guide for details.
The following sections describe how to use the qlogin and qsh facilities. The qrsh command is explained in a broader context in Transparent Remote Execution.
The only type of interactive jobs that you can submit from QMON are jobs that bring up an xterm on a host selected by the grid engine system.
At the right side of the Submit Job dialog box, click the button above the Submit button until the Interactive icon is displayed. Doing so prepares the Submit Job dialog box to submit interactive jobs. See Figure 3–8 and Figure 3–9.
The meaning and the use of the selection options in the dialog box is the same as that described for batch jobs in Submitting Batch Jobs. The difference is that several input fields are grayed out because those fields do not apply to interactive jobs
qsh is very similar to qsub. qsh supports several of the qsub options, as well as the additional option -display to direct the display of the xterm to be invoked. See the qsub(1) man page for details.
To submit an interactive job with qsh, type a command like the following:
% qsh -l arch=solaris64
This command starts an xterm on any available Sun Solaris 64–bit operating system host.
Use the qlogin command from any terminal or terminal emulation to start an interactive session under the control of the grid engine system.
To submit an interactive job with qlogin, type a command like the following:
% qlogin -l star-cd=1,h_cpu=6:0:0
This command locates a low-loaded host. The host has a Star-CD license available. The host also has at least one queue that can provide a minimum of six hours hard CPU time limit.
Depending on the remote login facility that is configured to be used by the grid engine system, you might have to enter your user name, your password, or both, at a login prompt.