next up previous

11.1 LoadLeveler Overview     continued...

llsubmit Sample1.cmd

Lines in a .cmd file that begin with a # not followed by a @ are considered comment lines, which the LoadLeveler ignores. Lines that begin with a # followed by a @ (even if these two symbols are separated by several spaces) are considered to be command lines for the LoadLeveler.

Listed below are three sample .cmd files.

Sample1.cmd is a simple job command file which submits the serial job pi in the ~jsmith/labs/poe/C subdirectory once. Sample2.cmd submits that same serial job (in the same directory) four different times, most likely on four diffferent SP2 nodes. Sample3.cmd is a script .cmd file which submits a parallel job.

Sample1.cmd:

#The executable is ~/labs/poe/C/pi in user jsmith's home directory
#
#The serial job is submitted just one time
#
# @ executable = /user/user14/jsmith/labs/poe/C/pi
# @ input = /dev/null
# @ output = sample1.out
# @ error = sample1.err
# @ notification = complete
# @ checkpoint = no
# @ restart = no
# @ requirements = (Arch == "R6000") && (OpSys == "AIX32")
# @ queue

Sample2.cmd:

#The executable is ~/labs/poe/C/pi in user jsmith's home directory
#
#This submits the serial pi job four times by listing "queue" four times.
#  Starting on August 18, 1995 at 4:35 PM  
#
#@ executable = /user/user14/jsmith/labs/poe/C/pi
#@ input = /dev/null
#@ output = sample2.out
#@ error = sample2.err
#@ startdate = 16:35 08/18/95 
#@queue
#@queue
#@queue
#@queue

Sample3.cmd:

#!/bin/csh
#The executable is ~/labs/poe/C/pi_reduce in jsmith's home directory
#
#This time, a script command file is used to submit a parallel job
#
#@ job_name        = pi_reduce
#@ output          = sample3.out
#@ error           = sample3.err
#@ job_type        = parallel
#@ requirements    = (Adapter == "hps_user")
#@ min_processors  = 4
#@ max_processors  = 4
#@ environment     = MP_INFOLEVEL=1;MP_LABELIO=yes
#@ notification    = complete
#@ notify_user     = jsmith@cs.utk.edu
# This sends e-mail to jsmith@cs.utk.edu once the job has been submitted
#@ queue
echo $LOADL_PROCESSOR_LIST >! sample3.hosts
/usr/lpp/poe/bin/poe /user/user14/jsmith/labs/poe/C/pi_reduce

Script .cmd files similar to the Sample3.cmd file shown here are necessary for parallel jobs. After the LoadLeveler processes its command lines, the rest of the script file is run as the executable.

For more information on LoadLeveler and XLoadLeveler commands and .cmd file command lines, try browsing through the information available on the InfoExplorer. (The InfoExplorer is discussed in the Additional Information section of this SP2 guide.)