24.0 Job templates > Job template references > Job template examples

Conventions

24.8 Job template examples

Job templates can be used for a wide range of purposes including enabling automated learning, setting up custom application environments, imposing special account constraints, and applying group default settings. The following examples highlight some of these uses:

Example 24-1: Setting up application-specific environments

JOBCFG[xxx] EXEC=*app* JOBPROLOG=/usr/local/appprolog.x

Example 24-2: Applying job preferences and defaults

JOBCFG[xxx] CLASS=appq EXEC=*app* PREF=clearspeed

NODEALLOCATIONPOLICY PRIORITY

NODECFG[DEFAULT] PRIORITYF=5.0*PREF

Example 24-3: Applying resource constraints to fuzzy collections

In the following example, a job template match is set up. Using the JOBMATCHCFG parameter, Moab is configured to apply all attributes of the inter.set job template to all jobs that match the constraints of the inter.min job template. In this example, all interactive jobs are assigned the ignpolicies flag that allows them to ignore active, idle, system, and partition level policies. Interactive jobs are also locked into the test standing reservation and thus only allowed to run on the associated nodes.

# limit all users to a total of two non-interactive jobs

USERCFG[DEFAULT] MAXJOB=2

SRCFG[test] DESCRIPTION="compute pool for interactive and short duration jobs"

SRCFG[test] JOBATTRLIST=INTERACTIVE

SRCFG[test] MAXTIME=1:00:00

SRCFG[test] HOSTLIST=R:atl[16-63]

JOBCFG[inter.min] FLAGS=interactive

JOBCFG[inter.set] FLAGS=ignpolicies

JOBMATCHCFG[interactive] JMIN=inter.min JSET=inter.set

Example 24-4: Resource manager templates

In the following example, interactive jobs are not allowed to enter through this resource manager and any job that does route in from this resource manager interface has the preemptee flag set.

JOBCFG[no_inter] FLAGS=interactive

JOBCFG[preempt_job] FLAGS=preemptee

RMCFG[gridA.in] MAX.JOB=no_inter SET.JOB=preempt_job

Related topics