Submit a Job to CSE Clusters
How to submit a job on a CSE cluster using Sun Grid Engine
Single CPU Jobs
To submit a single cpu job, write a script including the commands you would use from the command line, for instance, put this in a file called q.sh:
#!/bin/bash
date
sleep 30
echo "I slept for 30 seconds";
date
To submit the job type:
$ qsub q.sh
Your job 48 ("q.sh") has been submitted.
Then to check on the job type:
$ qstat
job-ID prior name user state submit/start at queue slots ja-task-ID
-------------------------------------------------------------------------
48 0.55500 q.sh bill r 07/31/2006 14:50:37 all.q
Then when it's done you should have two files in the format <scriptname>.(e|o)<jobid> where e is stderr and o is stdout:
$ cat q.sh.o48
Mon Jul 31 14:50:37 PDT 2006
I slept for 30 seconds
Mon Jul 31 14:51:07 PDT 2006
Multiple CPU Jobs
To run a parallel job called "relay" create a submit script called q.sh with the following:
#!/bin/bash
#
#$ -cwd
#$ -j y
#$ -S /bin/bash
# relay is the name of the binary
/usr/bin/mpirun -np $NSLOTS -m $TMPDIR/machines ./relay 1
Now, to run on 64 processors type:
$ qsub -pe mpi 64 q.sh
Your job 49 ("q.sh") has been submitted.
Then once the job is complete view the output:
$ cat q.sh.o49
size= 1, 131072 hops, 64 nodes in 0.16 sec ( 1.2 us/hop) 3139 KB/sec