NERSCPowering Scientific Discovery Since 1974

Running Interactive Batch Jobs

You cannot login to the PDSF batch nodes directly but you can run an interactive session on a batch node using either qlogin or qsh. This can be useful if you are doing something that is potentially disruptive or if the interactive nodes are overloaded.

qlogin will give you an interactive session in the same window as your original session on PDSF, however, you must have your ssh keys in place. You can do this locally on PDSF by following these steps:

  1. Run the command ssh-keygen -t rsa or ssh-keygen -t dsa. By default, this will create files in $HOME/.ssh named id_rsa or id_dsa and or The file id_rsa or id_dsa contains your private key; or is the corresponding public key. You will be prompted to enter a passphrase. This is a text string, similar to a password, that you will use for passphrase authentication. Do not make it the same as your password.
  2. Copy the contents of the file on your local machine named $HOME/.ssh/ or into a file on the remote machine named $HOME/.ssh/authorized_keys. Make sure that you have not introduced any spurious line breaks into the file when you copy it. This single file can hold multiple public keys on separate lines.

Once this is done, you can test whether it worked by sshing to another PDSF login node. It should prompt you for your key's passphrase instead of your password.

Due to system limitations there is a small (but important) difference in the user environment you get when you use qlogin.  When you receive a shell prompt with qlogin, your CHOS environment is not set up for you. In order to set up the CHOS environment of your choice you will need to manually chos into the chos environment of your choice:

setenv CHOS sl64; chos (or /usr/bin/chos if not in path)

qsh will open a new xterm on the batch node assigned to your job (this requires you have X enabled).  To use qsh, you MUST login to the system with X-forwarding enabled. You can do this by specifying the "-Y" option to ssh on your remote computer as follows:

ssh -Y
ActionHow to do itComment
Start an interactive session on a batch node qsh or qlogin Note that batch system commands like qstat are not available on the batch nodes.
Start an interactive session on a specific batch node

qsh -l h=pc<#> -now no

qlogin -l h=pc<#> -now no

replace <#> with a node of your choice,
"-now no" means that you are willing to wait if the node of choice is not immediately available
Start an interactive session in the debug queue

qsh -l debug=1 -now no

qlogin -l debug=1 -now no

This is useful when the cluster is full. There are 16 slots available and the number could be increased if there is demand. Limit of 1 session per user in this mode please.