Namespaces

Variants
Actions
Personal tools

Cheaha Quick Start Interactive Jobs

From UABgrid Documentation

Jump to: navigation, search

NOTE: This page is still under development. Please refer to Cheaha_GettingStarted page for detailed documentation.

Contents

Interactive Resources

After you login to Cheaha the command-line interface that you see is running on the head node. Most of your light interactive prep-work to submit a compute job to the scheduler can be carried out on this head node. If you have a heavier workload to prepare for a batch job (eg. compiling code or other manipulations of data) or your compute application requires interactive control, you should request a dedicated interactive node for this work.

Interactive resources are requested by submitting an "interactive" job to the scheduler. Interactive jobs will provide you a command line on a compute resource that you can use just like you would the command line on the head node. The difference is that the scheduler has dedicated the requested resources to your job and you can run your interactive commands without having to worry about impacting other users on the head node.

Interactive jobs are requested with the qrsh or qlogin command (please use your correct email address in place of the $USER@uab.edu string if you do not have an @uab.edu email address):

qlogin -l h_rt=1:00:00,vf=1G -m b -M $USER@uab.edu -now no

This command requests 1 compute core with 1Gb of RAM for 1 hour. The command will wait until the resource is reserved by the scheduler and send you an email when the resource is available. The email alert can be useful during periods of heavy cluster demand when interactive resources reservations may have significant wait times.

Examples

Below are some examples on launching interactive jobs on Cheaha.

Code compilation or command line work using single core

Following example uses default SSH options to login to Cheaha, launch interactive job to get a compute node and compile Python. This approach can be used to run any code compilation or perform any command line activity. If your actions are going to involve more than 1 processor then you should request multiple cores using qlogin. This example won't work for launching graphical applications.

1. Login to Cheaha head node

$ ssh cheaha.uabgrid.uab.edu

2. Get access to a compute node

 
$ qlogin -l h_rt=1:00:00,vf=1G -m b -M $USER@uab.edu -now no

3. Following code snippet downloads and installs Python 3.3.1 in '$HOME/mypy'. It is provided as an example for type of work that can be done using a compute node. Any command line activity or code compilation can be done using a compute node.

$ wget http://www.python.org/ftp/python/3.3.1/Python-3.3.1.tgz -P ~/tmp
$ tar xvzf ~/tmp/Python-3.3.1.tgz -C ~/src
$ pushd ~/src/Python-3.3.1
$ mkdir -p ~/mypy
$ ./configure --prefix ~/mypy
$ make
$ make install
$ ~/mypy/bin/python3 -V
Python 3.3.1


Code compilation or command line work using multiple cores

Launching Graphical application

1. Login to Cheaha head node with X11 forwarding enabled

$ ssh -X cheaha.uabgrid.uab.edu

2. Get access to a compute node

$ qlogin -l h_rt=1:00:00,vf=1G -m b -M $USER@uab.edu -now no

3. Launching IGV application (make sure you have it installed!).

$ ~/apps/igv/igv.sh 
1G
INFO [2013-04-09 14:59:40,392]  [DirectoryManager.java:149] [main]  IGV Directory: /home/pavgi/igv
INFO [2013-04-09 14:59:40,407]  [Main.java:77] [main]  Startup  IGV Version 2.1.23 (2558)08/31/2012 11:27 PM
Fetching user directory... INFO [2013-04-09 14:59:40,898]  [Main.java:78] [main]  Default User Directory: /home/pavgi
INFO [2013-04-09 14:59:55,405]  [GenomeManager.java:101] [main]  
Loading genome: http://igvdata.broadinstitute.org/genomes/hg18.genome
INFO [2013-04-09 14:59:56,311]  [GenomeManager.java:125] [main]  Genome loaded.  id= hg18
INFO [2013-04-09 14:59:59,224]  [CommandListener.java:78] [Thread-7]  Listening on port 60151
Error creating thumbnail: convert: unable to open image `/research/apps/rnb/docs/htdocs/tgw/images/d/df/IGV_qlogin_example.png': No such file or directory @ error/blob.c/OpenBlob/2589.
convert: unable to open file `/research/apps/rnb/docs/htdocs/tgw/images/d/df/IGV_qlogin_example.png' @ error/png.c/ReadPNGImage/3639.
convert: missing an image filename `/tmp/transform_2fea46f-1.png' @ error/convert.c/ConvertImageCommand/3015.

Using VNC session

When an SSH session is closed it's corresponding qlogin job will also get terminated. This can be frustrating when you need to keep your command line activity running, but need to close your main SSH session or turn-off your personal computer. It can solved by using a combination of SSH, VNC and qlogin. Please refer to our VNC setup guide to start a VNC session with Cheaha head node. After getting your VNC desktop, you can get a compute node resource using the qlogin command. A qlogin session launched through VNC won't get terminated even if your SSH or VNC window is closed. Of course, it will get terminated after specified run-time is reached.