Personal tools

Cheaha Quick Start Interactive Jobs

From UABgrid Documentation

(Difference between revisions)
Jump to: navigation, search
(started page on interactive jobs and it's examples)
(One intermediate revision by one user not shown)
Line 1: Line 1:
'''NOTE: This page is still under development. Please refer to [[Cheaha_GettingStarted]] page for detailed documentation.'''
= Interactive Resources =
= Interactive Resources =
Line 50: Line 52:
2. Get access to a compute node
2. Get access to a compute node
$ qlogin -l h_rt=1:00:00,vf=1G -m b -M $ -now no
$ qlogin -l h_rt=1:00:00,vf=1G -m b -M $ -now no

Latest revision as of 15:47, 9 April 2013

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


[edit] 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 $ string if you do not have an email address):

qlogin -l h_rt=1:00:00,vf=1G -m b -M $ -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.

[edit] Examples

Below are some examples on launching interactive jobs on Cheaha.

[edit] 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

2. Get access to a compute node

$ qlogin -l h_rt=1:00:00,vf=1G -m b -M $ -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 -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

[edit] Code compilation or command line work using multiple cores

[edit] Launching Graphical application

1. Login to Cheaha head node with X11 forwarding enabled

$ ssh -X

2. Get access to a compute node

$ qlogin -l h_rt=1:00:00,vf=1G -m b -M $ -now no

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

$ ~/apps/igv/ 
INFO [2013-04-09 14:59:40,392]  [] [main]  IGV Directory: /home/pavgi/igv
INFO [2013-04-09 14:59:40,407]  [] [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]  Default User Directory: /home/pavgi
INFO [2013-04-09 14:59:55,405]  [] [main]  
Loading genome:
INFO [2013-04-09 14:59:56,311]  [] [main]  Genome loaded.  id= hg18
INFO [2013-04-09 14:59:59,224]  [] [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_2f9b4f5-1.png' @ error/convert.c/ConvertImageCommand/3015.

[edit] 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.