Interactive Jobs

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

Interactive jobs are only supported on UNIX in Accelerator. 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 % nc 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 % nc 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 | nc 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

Accelerator does not use a wrapper (such as vw) when running an interactive job; it is more complex to capture a log of all I/O. The recommended method to capture the log is to use the UNIX utility script as shown in the example below:
% nc run -Ir .... script ./my_log_file -c "gdb /bin/ls" 

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:
% nc run -Ix xterm -e vsim -do ...