Running Long Jobs on Math Dept Computers

If you need to run a computing job that will take a while, please use one of these techniques to avoid having to tie up a computer's console for the whole time:

For batch jobs: use nohup

This is a method for running a program that does not require any interaction with the user. You run the program "in the background," redirecting the output to a file, and then can log out. This can be done with the nohup command, thus:
nohup command &

The command will continue to run after you log out. All output will go to a file called nohup.out. You can choose your own output file with:
nohup command > output-file 2>&1 &

If you do this on any machine in room 103 or 218 use the nice command at the beginning to keep from bogging down the machine:
nohup nice command.....

You do not have to do this with "back room" machines like the MathVaders.

For terminal-based interactive programs: use screen

This is a powerful utility that lets you create a terminal session, start whatever you want and then "detach" it and log out. When you log back in you can re-attach, see what your program has been doing in your absence, and tell it what to do next.

Starting a Session

Log in to the machine of your choice and think of a name for your session. Then enter:
screen -S Session-name
where Session-name is the name you chose for your session.

Disconnecting from a Session

After you have gotten your program going, you can detach from the session by holding down the Ctrl key and pressing a followed by d. You can now log out.

Reconnecting to a Session

When you log back in, reconnect to the session by typing:
screen -r Session-name

If you do not remember the session name, you can see a list of sessions with:
screen -ls

Or, if you have only one detached session, you can reconnect to it with:
screen -R

Other functions

Screen has many other useful features - see the manual page for more information.

For graphics-based programs: use X2GO

This software allows you to start a graphical login session, disconnect from it, and later reconnect from any Department computer. The client software is installed on most of the Linux machines in rooms 103 and 218. The server software is also installed on many of these, as well as on "back room" machines like Squid1.

Starting a Session

Under construction.

Disconnecting from a Session

After you have started your computations, hold down the Ctrl and Alt keys and press the T key. You will be presented with a dialog box with three choices: suspend, terminate, or cancel. To disconnect while leaving your program to run, click suspend. The window will close.

Reconnecting to a Session

To reconnect to a disconnected session, do the same thing you did to make the connection originally. Instead of starting a new session, you will be reconnected to the old one. If it shows you a box saying that you have a disconnected sesssion, but does not allow you to resume it, you are using a computer that is not compatible with the one that created the session. Try connecting from another machine or ask the systems staff for assistance.

Terminating a Session

Normally, when you are completely done, you can end your session by selecting Log Out within the NX window. If this does not work for some reason, you can use Ctrl-Alt-T and then terminate to end the session.

Using NX from non-Department machines

We may be able to install the NX client software on your laptop. Contact the systems staff for more information.