Using and Administering

Job Command File Variables

LoadLeveler has several variables you can use in a job command file. These variables are useful for distinguishing between output and error files.

You can refer to variables in mixed case, but you must specify them using the following syntax:

$(variable_name)

The following variables are available to you:

$(host)
The hostname of the machine from which the job was submitted. In a job command file, the $(host) variable and the $(hostname) variable are equivalent.

$(domain)
The domain of the host from which the job was submitted.

$(jobid)
The sequential number assigned to this job by the submitting machine. The $(jobid) variable and the $(cluster) variable are equivalent.

$(stepid)
The sequential number assigned to this job step when multiple queue statements are used with the job command file. The $(stepid) variable and the $(process) variable are equivalent.

In addition, the following keywords are also available as variables. However, you must define them in the job command file. These keywords are described in detail in Job Command File Keywords.

$(executable)
$(class)
$(comment)
$(job_name)
$(step_name)

Note that for the $(comment) variable, the keyword definition must be a single string with no blanks. Also, the executable statement automatically sets the $(base_executable) variable, which is the file name of the executable without the directory component. See Figure 15 for an example of using the $(base_executable) variable.

Example 1

The following job command file creates an output file called stance.78.out, where stance is the host and 78 is the jobid.

# @ executable = my_job
# @ arguments  = 5
# @ output     = $(host).$(jobid).out
# @ queue

Example 2

The following job command file creates an output file called computel.step1.March05.

# @ comment    = March05
# @ job_name   = computel
# @ step_name  = step1
# @ executable = my_job
# @ output     = $(job_name).$(step_name).$(comment)
# @ queue


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]