Variables

Variables provide values for EnFuzion options and job parameters. By changing the values, default EnFuzion behavior can be modified and customized. Each variable is defined within a which determines its visibility and how it is used. A scope can be a cluster, node, run, job, or context.

Variable Types

Variables come in two types, options and parameters.

Options

As options, variables control EnFuzion behavior. Options are predefined by EnFuzion, like values, for example. You can read an option to obtain its value or you can set it to change its value and thereby modify EnFuzion behavior. Some options are read only and cannot be set by the user. See the Section called Options.

Parameters

As parameters, variables may be predefined by EnFuzion or defined by the user. Parameters provide input values to user jobs, either in tasks or through the process environment. See the Section called Parameters below.

Scope

Variables are defined within a scope, which can be a cluster, node, run, job or context. Each scope has predefined options and system provided parameters. User defined parameters can be specified for any defined cluster, node, run, job or context.

Parameters for a particular job are a combination of parameters from different scopes. If the same parameter is specified in different scopes, then the value from the latest scope will override any previous value. Parameters for different tasks are combined from several scopes as follows:

Table 8-1. Available Parameters

Task TypeParameters
rootstart, rootfinish

cluster parameters, run parameters, job parameters: single values, ENFOS, ENFOS_RELEASE, ENFMACHINE, ENFJOBNAME, ENFNODE

nodestart cluster parameters, node parameters, run parameters, context parameters, job parameters: single values
main cluster parameters, node parameters, run parameters, context parameters, job parameters

Only single value job parameters as described in the Section called The Parameter Statement are available for system tasks rootstart, rootfinish and nodestart. No other job parameters are available for the system tasks.

System parameters for rootstart and rootfinish provide values from the root machine.

Retrieving and Setting Values

EnFuzion provides several methods to retrieve and set variable values. All variables can be retrieved through the API. All parameter values can be retrieved by executing jobs, provided that they exist in the scope. All variables can be set through the API and by executing jobs. In addition, node variables can be set through node configuration file enfuzion.options, root variables can be set through root configuration file root.options and run variables can be set through run files.

Options

This section lists system defined options and provides their description. Options are grouped by: cluster, node, run, job and context.

Cluster Options

ENFMAIN_DIRECTORY: provides the cluster's main directory, used as a working directory by the Dispatcher. This option is read only.

ENFCLEANUP_LIMIT: sets the number of seconds the run directory is still available after the run completed. After the ENFCLEANUP_LIMIT expires, the run directory is deleted, if not deleted before by the user. By default, ENFCLEANUP_LIMIT is 7 days.

ENFJOB_DAEMON_PORT: provides the port number of the job daemon. Job daemon is used by jobs on nodes to execute operations on the root. This option is read only.

Options in root.options

Root options that can be specified in the root.options file are accessible as variables through the cluster object. Variable names are specified as option names in uppercase letters with the ENF prefix. For example, the completelogs option can be accessed through the ENFCOMPLETELOGS variable. Exceptions are off and on periods, which cannot be accessed as variables. See the Section called Specifying Root Configuration Options in Chapter 6 for a description of available options.

Node Options

ENFPROPERTIES: provides a list of node properties. By default, the list is empty.

Run Options

ENFPRIORITY_LEVEL: specifies a priority level for the run, which determines how nodes are allocated to runs. The default value is 50.

ENFPRIORITY_WEIGHT: specifies allocation weights for runs at the same level. The default value is 1.

ENFALLOCATION: provides current node allocation for the run. This option is read only.

ENFPERSISTENT: determines if the run is persistent or transient. If it is true, the run is persistent. If it is false, the run is transient. A persistent run must be terminated explicitly by the user. Jobs belonging to a persistent run are automatically deleted from the run after they are done. The default value is false.

ENFPREEMPTIVE: determines if the run is preemptive or non-preemptive. If it is true, the run is preemptive. If it is false, the run is non-preemptive. A preemptive run obtains required resources immediately after it is started. A non preemptive run waits until resources become available. The default value is false.

ENFEXECUTION_LIMIT: determines the time in seconds that the run is allowed to execute. If the limit is exceeded, the run is aborted. The default value is 0, which means no limit.

ENFJOB_EXECUTION_LIMIT: determines the time in seconds that each job in the run is allowed to execute. If the limit is exceeded, the job is aborted. The default value is 0, which means no limit.

ENFDATASTREAM_EXECUTION_LIMIT: determines the time in seconds that a result is expected from a datajob. If the limit is exceeded, the datajob is restarted on another machine. The default value is 0, which means no limit.

ENFMAX_JOB_COPIES: determines the maximum number of concurrent executions of the same job. It can be used to start multiple concurrent job executions, if nodes differ significantly in computer power. The default value is 1.

ENFPERMANENT: determines whether or not a permanent connection is maintained between jobs on nodes and the job daemon. If it is true, jobs maintain a permanent connection. If it is false, the connection is established on demand. The default value is false.

ENFDATAIN: contains the file name for datajob input. It has no default value.

ENFDATAOUT: contains the file name for datajob output. It has no default value.

ENFREQUIREMENTS: contains a list of run requirements. By default, the list is empty.

ENFLICENSES: contains a list of licenses, required by the run. By default, the list is empty.

ENFDATASTREAM_EVENTS: turns on and off datastream events. If false, no datastream events are generated. The default value is true.

ENFNODE_LIMIT: determines the maximum number of concurrently executing jobs. It is used to limit the number of nodes that the run uses. The default value is 1024, which means that all available nodes are used.

ENFDIRECTORY: provides the run subdirectory within the main cluster directory. This option is read only.

ENFNODE_USER: defines the account that the run owner wants to use on nodes to execute jobs. The actual account is determined with the user.accounts file. The account on each host is specified as "<user_name>[@<host_name>]". Accounts for several hosts can be specified in which case they are separated by a " ". If only an account is specified without a host, this is the default account for all hosts not explicitly mentioned.

ENFNODE_DIRECTORY: defines the job working directory on nodes. The directory on each host is specified as "<directory>[@<host_name>]". Directories for several hosts can be specified in which case they are separated by a space. If a directory name contains a space, it must be included in quotes. If only a directory is specified without a host, this is the default directory for all hosts not explicitly mentioned.

ENFNODE_NICE_PRIORITY: defines if the user jobs are executed at a background priority which utilizes idle cycles on the nodes. The priority on each host is specified as "on[@<host_name>]". Priorities for several hosts can be specified in which case they are separated by a space. If only a priority is specified without a host, this is the default priority for all hosts not explicitly mentioned.

ENFNOTIFY_ADDRESS: defines electronic address for notifications. An address is specified as "<user_name>[@<domain>]". Several addresses can be specified in which case they are separated by a space. By default, ENFNOTIFY_ADDRESS is empty.

ENFNOTIFY_CONDITION: defines conditions for an electronic notification. Whenever a condition is true, an e-mail is sent to all addresses in ENFNOTIFY_ADDRESS. A condition can be one of "abort", which denotes that a run was aborted, "start", which denotes a run start, and "done", which denotes that the run completed. By default, ENFNOTIFY_CONDITION has the value of "done".

Job Options

ENFJOB_REQUIREMENTS: contains a list of job requirements. By default, the list is empty.

Context Options

ENFCONTEXT_PROPERTIES: contains a list of context properties. By default, the list is empty.

Parameters

The following are system defined parameters. Parameters are grouped by: cluster, node, run, and job.

Cluster Parameters

ENFHOST: host that runs job daemon. Normally, the same as the root host.

ENFPORT: port for job daemon. Normally, the same as the variable ENFJOB_DAEMON_PORT.

Node Parameters

ENFNODE: unique node id.

ENFBIN: node directory with EnFuzion binaries.

ENFOS: node operating system.

ENFOS_RELEASE: node operating system release.

ENFMACHINE: node hardware platform.

ENFHOSTNAME: node host name.

Run Parameters

ENFRUN: run name.

ENFRUNID: run identifier.

ENFDIRECTORY: run directory on root.

ENFUSER: the run owner user ID.

ENFACCOUNT: user defined string for accounting purposes.

Job Parameters

ENFJOBNAME: unique job name.

ENFCWD: current job working directory on node.