Pascal's Weblog
The Grid...



Archives
« November 2009
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     
       
Today
Click me to subscribe
Search

Links
 

Today's Page Hits: 27

« Distributed Mersenne... | Main | Learning the hard... »
Wednesday Aug 16, 2006
Grid Engine crash course
The three commands to get started with the Grid Engine are:
- qsub
- qdel
- qstat


qsub is used to submit a job on a grid. qstat is used to see what are the jobs running on a grid, and qdel is used to delete a job from the grid. Here is a quick example:

cat startServer.ksh
#!/bin/ksh

SGETOOLS=/home/sgeadmin/N1GE/bin/sol-amd64
export SGETOOLS

numClients=10


$SGETOOLS/qsub -N client -t 1-$numClients startClient.ksh


This program starts 10 copies of the client program on the grid. The client has access to some environment variables such as: SGE_TASK_ID
> cat startClient.ksh
#!/bin/ksh
host=$( hostname )
echo "Starting client on" $host with ID  $SGE_TASK_ID >> /home/pascal/test1/file$host
proc=0
while [ "$proc" == 0 ]
do
  echo $proc
done
the output of qstat looks like:

> qstat
job-ID  prior   name       user         state submit/start at     queue                          slots ja-task-ID
-----------------------------------------------------------------------------------------------------------------
   1221 0.55500 client     pascal       r     08/16/2006 17:39:50 all.q@node01a                      1 1
   1221 0.55500 client     pascal       r     08/16/2006 17:39:50 all.q@node01b                      1 2
   1221 0.55500 client     pascal       r     08/16/2006 17:39:50 all.q@node02a                      1 3
   1221 0.55500 client     pascal       r     08/16/2006 17:39:50 all.q@node02b                      1 10
   1221 0.55500 client     pascal       r     08/16/2006 17:39:50 all.q@node03a                      1 9
   1221 0.55500 client     pascal       r     08/16/2006 17:39:50 all.q@node04a                      1 7
   1221 0.55500 client     pascal       r     08/16/2006 17:39:50 all.q@node04b                      1 5
   1221 0.55500 client     pascal       r     08/16/2006 17:39:50 all.q@node05a                      1 8
   1221 0.55500 client     pascal       r     08/16/2006 17:39:50 all.q@node05b                      1 6
   1221 0.55500 client     pascal       r     08/16/2006 17:39:50 all.q@node06b                      1 4

Posted at 02:48PM Aug 16, 2006 by Pascal Ledru in Grid Computing  |  Comments[0]

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed