The information in a class stanza defines characteristics for that class. Class stanzas are optional. Class stanzas take the following format. Default values for keywords appear in bold.
Figure 32. Format of a class stanza
label: type = class admin= list ckpt_dir = directory ckpt_time_limit = hardlimit,softlimit class_comment = "string" default_resources = name(count) name(count)...name(count) exclude_groups = list exclude_users = list execution_factor = number include_groups = list include_users = list master_node_requirement = true | false maxjobs = number max_node = number max_processors = number max_total_tasks = number nice = value NQS_class = true | false NQS_submit = name NQS_query = queue names priority = number total_tasks = number core_limit = hardlimit,softlimit cpu_limit = hardlimit,softlimit data_limit = hardlimit,softlimit file_limit = hardlimit,softlimit job_cpu_limit = hardlimit,softlimit rss_limit = hardlimit,softlimit stack_limit = hardlimit,softlimit wall_clock_limit = hardlimit,softlimit |
You can specify the following keywords in a class stanza:
The value specified by the ckpt_dir keyword is only used when the ckpt_file keyword in the job command file does not contain a full path name and the ckpt_dir keyword in the job command file is not specified. For more information on determining the checkpoint directory, see Naming checkpoint files and directories.
Specifies the default amount of resources consumed by a task of a job step, of this class, provided that no resources keyword is coded for the step in the job command file. If a resources keyword is coded for a job step, then it overrides any default resources associated with the associated job class.
The administrator defines the name and count values for default_resources. In addition, name(count) could also be ConsumableCpus(count), ConsumableMemory(count units), or ConsumableVirtualMemory(count units). ConsumableMemory and ConsumableVirtualMemory are the only two consumable resources that can be specified with both a count and units. The count for each specified resource must be an integer greater than or equal to zero, with three exceptions: ConsumableCpus, and ConsumableMemory must be specified with a value which is greater than zero, and ConsumableVirtualMemory must be specified with a value greater than 0, and greater than or equal to the image_size (units for image_size are in kilobytes). If the count is not valid, then LoadLeveler will issue an error message, and will not submit the job. The allowable units are those normally used with LoadLeveler data limits:
b bytes w words kb kilobytes (2**10 bytes) kw kilowords (2**12 bytes) mb megabytes (2**20 bytes) mw megawords (2**22 bytes) gb gigabytes (2**30 bytes) gw gigawords (2**32 bytes) tb terabytes (2**40 bytes) tw terawords (2**42 bytes) pb petabytes (2**50 bytes) pw petawords (2**52 bytes) eb exabytes (2**60 bytes) ew exawords (2**62 bytes)
The ConsumableMemory and ConsumableVirtualMemory values are stored in MB (megabytes) and rounded up. Therefore, the smallest amount of ConsumableMemory or ConsumableVirtualMemory which you can request is one megabyte. If no units are specified, then megabytes are assumed. Resources defined here that are not in the SCHEDULE_BY_RESOURCES list in the global configuration file will not effect the scheduling of the job.
| Note: | This keyword is used by Gang scheduling only. |
| Note: | master_node_requirement is ignored by Gang scheduler. |
| Note: | This keyword is used by Gang scheduling only. |
This value ranges from -20 to 20. Values out of this range are placed at the top (or bottom) of the range. For example, if your current nice value is 15, and you specify nice = 10, the resulting value is 20 (the upper limit) rather than 25. The default is 0.
If the administrator has decided to enforce consumable resources, the nice value will only adjust priorities of processes within the same WLM class. Because LoadLeveler defines a single class for every job step, the nice value as no effect.
For more information, consult the appropriate UNIX documentation.
For more information on routing jobs to machines running NQS, refer to Figure 18
The class stanza includes the following limit
keywords, which allow you to control the amount of resources used by a job
step or a job process.
Table 17. Types of limit keywords
| Limit | How It Is Enforced |
|---|---|
| ckpt_time_limit | Per job step |
| core_limit | Per process |
| cpu_limit | Per process |
| data_limit | Per process |
| file_limit | Per process |
| job_cpu_limit | Per job step |
| rss_limit | Per process |
| stack_limit | Per process |
| wall_clock_limit | Per job step |
Individual keywords are described in Specifying limits in the class stanza. The following section gives you a general overview of limits.
A limit is the amount of a resource that a job step or a process is allowed to use. (A process is a dispatchable unit of work.) A job step may be made up of several processes.
Limits include both a hard limit and a soft limit. When a hard limit is exceeded, the job is usually terminated. When a soft limit is exceeded, the job is usually given a chance to perform some recovery actions. For more information, see Exceeding limits.
Limits are enforced either per process or per job step, depending on the type of limit. For parallel jobs steps, which consist of multiple tasks running on multiple machines, limits are enforced on a per task basis.
For example, a common limit is the cpu_limit, which limits the amount of CPU time a single process can use. If you set cpu_limit to five hours and you have a job step that forks five processes, each process can use up to five hours of CPU time, for a total of 25 CPU hours. Another limit that controls the amount of CPU used is job_cpu_limit. For a serial job step, if you impose a job_cpu_limit of five hours, the entire job step (made up of all five processes) cannot consume more than five CPU hours. For information on using this keyword with parallel jobs, see job_cpu_limit.
You can specify limits in either the class stanza of the administration file or in the job command file. The lower of these two limits will be used to run the job even if the system limit for the user is lower.
Process limits are enforced by the operating system. Job step limits are enforced by LoadLeveler.
When a hard limit is exceeded LoadLeveler sends a
non-trappable signal to the process (except in the case of a
parallel job). When a soft limit is exceeded, LoadLeveler sends a
trappable signal to the process. The following chart
summarizes the actions that occur when a job step limit is exceeded:
Table 18. Exceeding job step limits
| Type of Job | When a Soft Limit is Exceeded | When a Hard Limit is Exceeded |
|---|---|---|
| Serial | SIGXCPU or SIGKILL issued | SIGKILL issued |
| Parallel (non-PVM) | SIGXCPU issued to both the user program and to the parallel daemon | SIGTERM issued |
| PVM | SIGXCPU issued to the user program | pvm_halt invoked to shut down PVM |
On systems that do not support SIGXCPU, LoadLeveler does not distinguish between hard and soft limits. When a soft limit is reached on these platforms, LoadLeveler issues a SIGKILL.
For per process limits, what happens when your job reaches and exceeds either the soft limit or the hard limit depends on the operating system you are using.
Note that when a job forks a process which exceeds a per process limit, such as the CPU limit, the operating system (and not LoadLeveler) terminates the process by issuing a SIGXCPU. As a result, you will not see an entry in the LoadLeveler logs indicating that the process exceeded the limit. The job will complete with a 0 return code. LoadLeveler can only report the status of any processes it has started.
If you need more specific information, refer to your operating system documentation.
The syntax for setting a limit is
limit_type = hardlimit,softlimit
For example:
core_limit = 120kb,100kb
To specify only a hard limit, you can enter, for example:
core_limit = 120kb
To specify only a soft limit, you can enter, for example:
core_limit = ,100kb
In a keyword statement, you cannot have any blanks between the numerical value (100 in the above example) and the units (kb). Also, you cannot have any blanks to the left or right of the comma when you define a limit in a job command file.
For limit keywords that refer to a data limit -- such as data_limit, core_limit, file_limit, stack_limit, and rss_limit -- the hard limit and the soft limit are expressed as:
integer[.fraction][units]
The allowable units for these limits are:
b bytes w words kb kilobytes (2**10 bytes) kw kilowords (2**12 bytes) mb megabytes (2**20 bytes) mw megawords (2**22 bytes) gb gigabytes (2**30 bytes) gw gigawords (2**32 bytes) tb terabytes (2**40 bytes) tw terawords (2**42 bytes) pb petabytes (2**50 bytes) pw petawords (2**52 bytes) eb exabytes (2**60 bytes) ew exawords (2**62 bytes)
If no units are specified for data limits, then bytes are assumed.
For limit keywords that refer to a time limit -- such as ckpt_time_limit, cpu_limit, job_cpu_limit, and wall_clock_limit -- the hard limit and the soft limit are expressed as:
[[hours:]minutes:]seconds[.fraction]
Fractions are rounded to seconds.
You can use the following character strings with all limit keywords except the copy keyword for wall_clock_limit, job_cpu_limit and ckpt_time_limit:
See Table 19 for more information on specifying limits.
| If the hard limit: | Then the: |
|---|---|
| Is set in both the class stanza and the job command file | Smaller of the two limits is taken into consideration. If the smaller limit is the job limit, the job limit is then compared with the user limit set on the machine that runs the job. The smaller of these two values is used. If the limit used is the class limit, the class limit is used without being compared to the machine limit. |
| Is not set in either the class stanza or the job command file | User per process limit set on the machine that runs the job is used. |
| Is set in the job command file and is less than its respective job soft limit | The job is not submitted. |
| Is set in the class stanza and is less than its respective class stanza soft limit | Soft limit is adjusted downward to equal the hard limit. |
| Is specified in the job command file | Hard limit must be greater than or equal to the specified soft limit and
less than or equal to the limit set by the administrator in the class stanza
of the administration file.
Note: If the per process limit is not defined in the administration file and the hard limit defined by the user in the job command file is greater than the limit on the executing machine, then the hard limit is set to the machine limit. |
You can specify the following limit keywords:
Examples:
ckpt_time_limit = 30:45 #hardlimit - 30 minutes 45 seconds
ckpt_time_limit = 30:45,25:00 #hardlimit - 30 minutes 44 seconds
#soflimit - 25 minutes
Examples:
core_limit = unlimited core_limit = 30mb
For more information, see Overview of limits
cpu_limit = 12:56:21 # hardlimit = 12 hours 56 minutes 21 seconds
cpu_limit = 56:00,50:00 # hardlimit = 56 minutes 0 seconds
# softlimit = 50 minutes 0 seconds
cpu_limit = 1:03 # hardlimit = 1 minute 3 seconds
cpu_limit = unlimited # hardlimit = 2,147,483,647 seconds
# (X'7FFFFFFF')
cpu_limit = rlim_infinity # hardlimit = 2,147,483,647 seconds
# (X'7FFFFFFF')
cpu_limit = copy # current CPU hardlimit value on the
# submitting machine.
For more information, see Overview of limits.
Examples:
data_limit = 125621 # hardlimit = 125621 bytes
data_limit = 5621kb # hardlimit = 5621 kilobytes
data_limit = 2mb # hardlimit = 2 megabytes
data_limit = 2.5mw # hardlimit = 2.5 megawords
data_limit = unlimited # hardlimit = 9,223,372,036,854,775,807 bytes
# (X'7FFFFFFFFFFFFFFF')
data_limit = rlim_infinity # hardlimit = 9,223,372,036,854,775,807 bytes
# (X'7FFFFFFFFFFFFFFF')
data_limit = copy # copy data hardlimit value from submitting machine.
For more information, see Overview of limits.
For example:
job_cpu_limit = 10000
For more information on this keyword, see:
If you are running the Backfill or Gang scheduler, you must set a wall clock limit either in the job command file or in a class stanza (for the class associated with the job you submit). LoadLeveler administrators should consider setting a default wall clock limit in a default class stanza. For more information on setting a wall clock limit when using the Backfill or Gang scheduler, see Choosing a scheduler.
For more general information on limits, see Overview of limits.
class_a: type=class # class that excludes users priority=10 # ClassSysprio exclude_users=green judy # Excluded users
small: type=class # class for small jobs
priority=80 # ClassSysprio (max=100)
cpu_limit=00:02:00 # 2 minute limit
data_limit=30mb # max 30 MB data segment
default_resources=ConsumbableVirtualMemory(10mb) # resources consumed by each
ConsumableCpus(1) resA(3) floatinglicenseX(1) # task of a small job step if
# resources are not explicitly
# specified in the job command file
ckpt_time_limit=3:00,2:00 # 3 minute hardlimit, 2 minute softlimit
core_limit=10mb # max 10 MB core file
file_limit=50mb # max file size 50 MB
stack_limit=10mb # max stack size 10 MB
rss_limit=35mb # max resident set size 35 MB
include_users = bob sally # authorized users
medium: type=class # class for medium jobs
priority=70 # ClassSysprio
cpu_limit=00:10:00 # 10 minute run time limit
data_limit=80mb,60mb # max 80 MB data segment
# soft limit 60 MB data segment
ckpt_time_limit=5:00,4:30 # 5 minute hardlimit, 4 minute 30 second softlimit to checkpoint
core_limit=30mb # max 30 MB core file
file_limit=80mb # max file size 80 MB
stack_limit=30mb # max stack size 30 MB
rss_limit=100mb # max resident set size 100 MB
job_cpu_limit=1800,1200 # hard limit is 30 minutes,
# soft limit is 20 minutes
large: type=class # class for large jobs
priority=60 # ClassSysprio
cpu_limit=00:10:00 # 10 minute run time limit
data_limit=120mb # max 120 MB data segment
default_resources=ConsumableVirtualMemory(40mb) # resources consumed by each
ConsumableCpus(2) resA(8) floatinglicenseX(1) resB(1) # task of a large job step if
# resources are not explicitly
# specified in the job command file
ckpt_time_limit=7:00,5:00 # 7 minute hardlimit, 5 minute softlimit to checkpoint
core_limit=30mb # max 30 MB core file
file_limit=120mb # max file size 120 MB
stack_limit=unlimited # unlimited stack size
rss_limit=150mb # max resident set size 150 MB
job_cpu_limit = 3600,2700 # hard limit 60 minutes
# soft limit 45 minutes
wall_clock_limit=12:00:00,11:59:55 # hard limit is 12 hours
nqs: type=class # class for NQS jobs NQS_class=true NQS_submit=pipe_queue # NQS pipe queue name NQS_query=one two three # list of queue names
You can use the class names in control expressions in both the global and local configuration file.
PVM3: type=class # class for PVM jobs priority=60 # ClassSysprio (max=100) max_processors=15 # maximum number of processors
sp-6hr-sp: type=class # class for master node machines priority=50 # ClassSysprio (max=100) ckpt_time_limit=25:00,20:00 # 25 minute hardlimit, 20 minute softlimit to checkpoint cpu_limit = 06:00:00 # 6 hour limit job_cpu_limit = 06:00:00 # hard limit is 6 hours core_limit = lmb # max 1MB core file master_node_requirement = true # master node definition