Documents

Getting Started with GXP

Install

Download gxp and have gxpc command in your PATH.

A single small cluster

Say you are on host xyz000, have 5 hosts xyz001 to xyz005, and you can ssh from xyz000 to each of them without your passphrase being asked (use passphrase or ssh-agent/ssh-add to esbalish this). Then do the following on xyz000.

 $ gxpc use ssh xyz000 xyz
 $ gxpc explore xyz[[001-005]]
 reached xyz001 (xyz001)
 reached xyz004 (xyz004)
 reached xyz005 (xyz005)
 reached xyz003 (xyz003)
 reached xyz002 (xyz002)
 $

Now gxp daemons have brought up on xyz000 to xyz005 and are connected. You can now issue command to all of them.

 $ gxpc e hostname
 xyz000
 xyz002
 xyz001
 xyz005
 xyz003
 xyz004
 $ gxpc e whatever ...

Making your shell prompt nicer

Try 'gxpc prompt' command. An example:

 $ gxpc prompt
 [6/6/6]

This indicates there are six daemons brought up and connected. It is good idea to setup your shell prompt so it always includes this. Here is how to do this for

bash
 export PS1='`gxpc prompt 2> /dev/null`\$ '

and for other shells.

tcsh
 alias precmd 'set prompt="%m:%c`which gxpc >& /dev/null && gxpc prompt`$ "'
zsh
 precmd () {
   export PS1="%m:%c$(gxpc prompt 2> /dev/null)$ "
 }

Exiting

 [1/1/1]$ gxpc quit
 $

Be careful. Daemons are running until you explicitly type 'gxpc quit'.

A single large cluster

Say you have now xyz000 to xyz099. Though the above sequence should work in theory, it is advisable to setup things so that ssh is possible between any pair of hosts. And then

 $ gxpc use ssh xyz
 [1/1/1]$ gxpc explore xyz[[001-099]]
 reached xyz001 (xyz001)
 reached xyz004 (xyz004)
   ...
 reached xyz099 (xyz099)
 reached xyz087 (xyz087)
 [100/100/100]$

To explain,

 $ gxpc use ssh xyz000 xyz

reads "(you can) use ssh (from any host matching) xyz000 (to any host matching xyz)". Similarly,

 $ gxpc use ssh xyz

is actually equivalent to

 $ gxpc use ssh xyz xyz

and this reads "(you can) use ssh (from any host matching) xyz (to any host matching xyz)".

In the former case gxp will try all ssh logins from xyz000. In the latter, on the other hand, gxp will try ssh logins hierarchically.

 gxpc quit 

from this state will terminate all daemons.

Multiple clusters

Say you have another cluster and its hosts abc000 to abc049 and try to use both. As long as hosts are reachable via SSH, nothing special is necessary. You don't need to install gxp on the remote cluster.

 $ gxpc use ssh xyz000 abc000
 [1/1/1]$ gxpc use ssh abc
 [1/1/1]$ gxpc use ssh xyz
 [1/1/1]$ gxpc explore abc[[000-049]] xyz[[000-099]]
 reached xyz002 (xyz002)
  ...
 reached abc048 (abc048)
 [150/150/150]$   

The first two lines together tell gxp that to reach abc000 to abc049, you can first login to abc000 and then to other nodes (from abc000).

Working with batch scheduler

Let's say your cluster prohibits ssh login and you must use qsub command or alike of your batch scheduler instead. GXP can use these command in place of ssh. Here is an example. Let's say you can use qsub of the torque batch scheduler on xyz000. Then,

 $ gxpc use torque xyz000 xyz
 [1/1/1]$ gxpc explore xyz 10
 reached xyz (xyz001)
 reached xyz (xyz002)
  ...
 reached xyz (xyz009)
 [11/11/11]$ 

The rest is exactly the same as before.

Since there are many variants of batch schedulers (torque, sge, etc.), and you may need to pass particular options (such as group name or queue name) specific to your site, you may have to customize the command line gxp will use. Consult the manual or try 'gxpc rsh help' for more help.


トップ   編集 バックアップ 添付 複製 名前変更 リロード   新規 一覧 最終更新   最終更新のRSS
© 2007 Taura lab. All Rights Reserved.
Powered by Pukiwiki, styled by Kei_ / Last-modified: 2016-07-12 (火) 15:12:44 (856d)