Interactive Jobs

Interactive jobs require attention as they run, whereas batch jobs are run unattended.

Interactive jobs are only supported on UNIX in Accelerator Plus. There are three types of interactive jobs, which are described in the table below.
Interactive Job Example Option Example
Job that requires a X display. xterm -e vi abc -Ix % wx run -Ix xterm -e vi abc
Job that requires a TTY with remote control of signal dispatching by means of Ctrl–C and Ctrl–Z. bash -Ir % wx run -Ir bash
Job that requires a TTY (stdin, stdout) but keep local control of signal dispatching by means of Ctrl-C and Ctrl-Z. These are jobs where you want redirect stdin to a file. n/a -Il % date | wx run -Il tr '[a-z]' '[A-Z]'
You can limit the number of interactive jobs that can run concurrently, both at the global and user level. This is accomplished by creating a limit resource and setting it as the interactive job limit in the vncrun.config.tcl file. For example:
set VOV_JOB_DESC(interactive,limit) Limit:interactive
Or, for a per-user limit:
set VOV_JOB_DESC(interactive,limit) Limit:interactive_@USER@ 

The resource must exist prior to adding these lines to the file.

Use the -splitsderr Option

Use the -splitsderr option to write the stderr output of the interactive job to stderr. The default is to write the job's stderr output to stdout. Note that using this option will probably result in garbled terminal output due to intermingling of stdout and stderr outputs.

When to Use -Il and -Ir

If you use the option -Ir, then handling Ctrl-C and Ctrl-Z are done remotely on the remote host where the job is running. Use -Ir to interact with the job.

If you use the option -Il, then handling Ctrl-C and Ctrl-Z are done locally with the submission shell. Use -Il to redirect the stdout of the job to a file or a pipe.

Interactive Job Logs

Logging is supported for interactive job. For example, the following command will produce a transcript in mylog.txt:
% wx run -I -l mylog.txt – /bin/bash 
Options to Use with Interactive Job Logging Conditions
-I option Only use for jobs that require attention as they run. -I should not be used in scripted jobs where the intent is to capture output. In general, each user should never have more than one or two interactive jobs running concurrently.
-wl option Intended for when the job is launched at a terminal and real time logging is required. -wl is preferred over -I when only output tailing is required. A pseudo terminal server is not employed (keyboard input is not processed) and the job is more robust over network and window glitches.
-w option Preferred method for blocking a job and capturing its output in a script. The job can be issued with a -w option. This blocks until the job completes. The log can then be accessed via nc info -l.
Note: Neither -wl or -I should be used in scripts where there is no controlling terminal providing supervision.

For further information, please submit a support request at Altair Community.

Jobs That Require a DISPLAY: Option -Ix

To run a graphical tool interactively, use the option -Ix with nc run. This option adds the component +D(DISPLAY=$DISPLAY) to the job environment.
  • To use this option, the DISPLAY environment variable must be set for the display to refer to the host that you want to view.
  • If DISPLAY does not contain a hostname component, such as "unix:0.0" or ":0.0", then nc run command substitutes the hostname of the submission host. You must set a nc run value containing a hostname component to display the windows on a host other than the submission host.

For most graphical tools , all interactions occur through the windows and no terminal is needed. Batch jobs, and those started with only the -Ix option, do not have a pty allocated.

There are tools, such as Cadence NanoRoute and some simulators, which expect to have the regular streams connected to a pty, and will not operate properly (that is, just exit) unless there is a pty. For such jobs, use the -Ir or -Il option to ensure a pty is allocated.

For tools such as simulators that interpret the INT (interrupt) signal, typically ^C, to stop the simulation and return to interactive control, you may need to start in an xterm (x terminal) to gain full functionality. In this case, how to submit the job is similar to the following example:
% wx run -Ix xterm -e vsim -do ...