Cheaha Quick Start Interactive Jobs: Difference between revisions

From Cheaha
Jump to navigation Jump to search
(started page on interactive jobs and it's examples)
 
mNo edit summary
Line 50: Line 50:
</pre>
</pre>
2. Get access to a compute node
2. Get access to a compute node
<pre>
$ qlogin -l h_rt=1:00:00,vf=1G -m b -M $USER@uab.edu -now no
$ qlogin -l h_rt=1:00:00,vf=1G -m b -M $USER@uab.edu -now no
</pre>
</pre>

Revision as of 20:45, 9 April 2013

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

IGV qlogin example.png

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.