Interactive Jobs

During the process of creating jobs, a great deal of research may go into narrowing down the specifics of the final script. The interactive mode provides a convenient platform for this experimentation phase. It is used to test the components of a job for compatibility through piecemeal scripting and/or entering code directly into the command line. Thus, a variety of strategies may be quickly explored so that the code can be honed to precision before it is introduced into the final script.  

How to Initiate the Interactive Mode:

To enter the interactive mode, you must first be logged into the secure shell (username@login00:~:).  Then enter the following command:

$ interactive

You will be prompted by a helper script to set processor, memory, and walltime requirements necessary to perform your job. 

Processors:   [1] #
Memory (GB):  [1] #
Time (hours): [2] #

Note: In each of these prompts, the number within the brackets is the default, and the # represents your own selection (which overrides the default).  If you opt to use the default, pressing the Return (Enter) key will forward you to the next prompt.  

Upon completing the interactive helper script, you are now ready to begin building your script.  To double-check that the interactive mode has been successfully initiated, make sure that your login node


... has changed to a compute node:

username@compute##:  (where ## represents any number between 00 and 99).


Exiting Interactive Mode:

Please remember to exit your interactive session when finished. Otherwise it will tie up resources until it times out. Simply closing the window will not stop it. To terminate an interactive session, enter the following:

$ exit

Note: The interactive mode limits jobs to one compute node and 36 hours.



Interactive jobs have a very restrictive umask by default. The default umask prevents other users from accessing files or directories created during the interactive job. You may choose for other people in your lab to be able to read files you create during your job. If so, adjust your default umask to 0022.

$ umask 0022

Interactive jobs do not do a very good job of detecting if your terminal window is resized. This can cause many commands to fail in interesting ways. For this reason, it is recommended to run resize when you first start your interactive job and any time you modify the window size.

$ eval $(resize)

The interactive helper script will configure X11 if your secure shell session enables X11 tunneling. It will also safeguard your job against network disruptions by wrapping it in GNU screen.