Running and Debugging codes

Eddie uses Sun Grid Engine 6.0u9 to manage batch queues which enable jobs of multi users to fairly and efficiently run on the cluster. Users must submit their jobs to Grid Engine and wait for suitable resources being allocated. Grid Engine allows users to submit one or more jobs for execution, with job parameters specified in job scripts or command statements.

Job script

A job script is a script file (bash, ksh, csh) which tells the batch system what code is to be executed, how to run it and what resources you require.

The following are job script examples for serial and parallel jobs

Serial job script

#!/bin/sh
#
# set job neme
#
#$ -N hello
#
# set runtime limit
#
#$ -l h_rt=00:05:00
#
# set current dir as work directory
#
#$ -cwd 
#

date
echo "hello"

Parallel job script

#!/bin/sh
#
# set job neme
#
#$ -N hello
#
# set runtime limit
#
#$ -l h_rt=00:05:00
#
# set current dir as work directory
#
#$ -cwd 
#
# set Parallel Environment
#
#$ -pe openmpi 8
#

# init module in gridengine script

. /etc/profile

# set environment

module add openmpi/gcc

# execute parallel code

mpirun -np 8 ./hello

Other useful switches

 -p <project>
 -j y
 -o <output_file>
 -e <error_file>
 -i <input_file>
 -l <resource>=<value>
 -m <b|e|a|s|n>
 -M <email address>
 -R y
 -wd <work_dir>

Running and Debugging codes (last edited 2007-07-03 08:20:13 by JohnBlairFish)