Previous Up Next

CHAPTER 7: Executing Applications


The Dispatcher

The Dispatcher is the central enFuzion component, responsible for executing the jobs. The Dispatcher accepts a run file with a description of jobs and their parameters. It initiates and manages the execution.

Dispatcher Parameters

The Dispatcher can be started from the main enFuzion menu or from a command line as:

        enfdispatcher [ -v ] [ -a ] [ -b ] [ -e ] [ -i ] [ -p <port number> ]
	[-w <path>] [ <run name> ]
The following parameters are recognized by the Dispatcher:

  • -v
    If this is the first parameter, then the Dispatcher prints out its version and exits.

  • -a
    The parameter specifies that the Dispatcher will be executed without the graphical user interface. Dispatcher will take a run file as input, but will not start the execution.

    The execution can be started by using the start API command.

    Dispatcher will not exit after the run is finished. With this option a client can use the director API after all jobs are finished.

    Dispatcher exits when it receives the exit API command.

  • -b
    This parameter specifies that the Dispatcher is executed in batch mode without any graphical user interface. In batch mode, the Dispatcher takes a run file as input and automatically starts the execution. If all the jobs complete successfully, the Dispatcher returns 0 as its exit value. If some of the jobs fail, the Dispatcher returns 1 as its exit value.

    When Dispatcher is executed in batch mode, all passwords must be specified in file enfuzion.nodes.

  • -e
    The Dispatcher produces a network configuration file with encrypted passwords. Details are described in
    Encrypted Passwords in enfuzion.nodes.

  • -i
    Dispatcher is started with its window iconified.

  • -p <port number>
    Dispatcher's port for application programming interface is opened at <port number>. Otherwise, a system supplied port is being used. The application programming interface is described in Using Application Programming Interface.

  • -w <path>
    Dispatcher will set its working directory to path. The working directory contains enFuzion configuration and log files.

    This option is used to safely set the working directory, for example when Dispatcher is executed using a scripting language or from a Java class.

  • <run name>
    Specifies the name of the input file with a run description for jobs.
  • Dispatcher Window

    The Dispatcher displays a graphical display of the execution status and its progress. An example of the Dispatcher screen is shown in Figure 7.1.


    Figure 7.1. Dispatcher Main Window

    The button in the upper right corner allows you to Start, Stop or Resume the execution. The upper three lines display the progress of the execution, containing a summary of main execution parameters.

    Square icons display the status of individual jobs. Each job can be either waiting for execution, executing, completed successfully or completed with failure. Job icons are explained in detail in Table 1.


    Table 1. Dispatcher Icons

    The job is waiting for execution.

    The job is executing.

    The job has completed successfully.

    The job has failed. A job fails, if a user application returned a non zero status, or if one of the enFuzion commands failed. For example, a Copy task command was unable to find the source file.



    By clicking on a job icon, you can open a job window. The lower left corner of the Dispatcher window shows the job selected. The job window contains details about the job. It is described in the next section.

    Job Window

    The job window contains details about the job. It is opened by clicking on the job icon in the Dispatcher window. An example of a job window is shown in Figure 7.2.


    Figure 7.2. Status of a single job.

    The window allows you to manually change the status of a job. These changes will be carried out regardless of the current job status. If the job is executing, it will be terminated.

    Dispatcher Commands

    The Statistics menu allows you to obtain information on different aspects of execution. Option View Jobs shows the information on the execution of individual jobs. An example is shown in Figure 7.3.


    Figure 7.3. View of Jobs

    The Server display shows the current state of each computational node, as shown in Figure 7.4.



    Figure 7.4. View of Servers

    The Parameter display shows the parameter values for each job, as shown in Figure 7.5.



    Figure 7.5. View of Parameter Values

    Options Save Jobs, Save Servers, Save Parameters and Save Log in menu Statistics allow you to store the corresponding information to a file.

    Dispatcher Log

    During execution, the Dispatcher produces a log, describing major execution events. The log is saved to file enfuzion.log as well as displayed on standard output. If an old enfuzion.log already exists, a unique suffix is added to the file name. This preserves all old Dispatcher logs.

    A log example is shown in Figure 7.6. The log shows details about the execution progress. The log will also show any errors that are encountered. At the end, the log contains a summary of the run.


    Figure 7.6. enFuzion Log


    Execution Environment

    Executables for your applications that are executed on remote computers by enFuzion Nodes must be available on these computers and included in the execution search path. If enFuzion is unable to locate an executable file, it will report an error.

    enFuzion does not assume a shared file system. It will transfer files between the root and the node computer as specified in the plan.

    When enFuzion starts a job on a remote computer, it creates a unique directory in the remote file system. All relative file names start from that directory. This unique directory makes it possible to run multiple concurrent copies of a job on the same computer or in the same shared files system without conflicting file names between jobs. For example, each job can write to a file called "output". Although all jobs use the same file name, the file is unique for each job.

    On the root computer, all file references are relative to the directory in which the Dispatcher has been started. When a file is copied from a node to the local computer, it is usually renamed to include a unique identifier. The renaming can be done by using a system defined parameter, called $jobname, which is unique for each job or by using a combination of parameter values. The Preparator provides an easy way to specify the renaming of output files.

    If files are copied to the node in the nodestart task, then the copying is performed before any of the user jobs starts on that node. These files are common to all jobs. When each job starts executing, the common files are made available to the job. A set of input files, which is common to all jobs, can be thus copied only once to each node. This feature significantly reduces network traffic, if common input files are large.


    enFuzion Lite

    enFuzion Lite has the same features as standard enFuzion. However, jobs are executed only on the local machine. enFuzion Lite does not support distributed execution of jobs. enFuzion Lite is available in the following cases: enFuzion Lite can be upgraded to standard enFuzion by providing a valid license.

    enFuzion Lite is not available on the Windows NT platform.


    Standard Input, Standard Output and Standard Error

    User commands can use standard input, standard output and standard error. These can be either redirected to files with shell redirection constructs or left unspecified. If they are unspecified, enFuzion will automatically redirect standard input to "stdin", standard output to "stdout", and standard error to "stderr". These regular files can be handled with standard commands for file manipulation.


    Handling of Execution Errors

    enFuzion distinguishes two types of errors, system errors and user errors.

    System errors are caused by computer or network failures. If a node fails, jobs executing on that node are automatically restarted elsewhere. No user intervention is required. If the root computer fails, then the Dispatcher must be restarted.

    User errors are caused by missing files or user commands that return a nonzero exit status. The handling of these errors can be specified with the onerror command . Jobs with user errors can either fail, be repeated on a different computer or continue with the execution, depending on the user specified option.

    If a job fails on a node computer, either because the user application fails or one of the enFuzion commands detects an error, then enFuzion automatically copies the entire job directory from the node to the root. The directory is named error.$jobname, where $jobname is replaced with the name of the job. The ability to inspect the contents of the remote directory significantly simplifies error diagnosis.



    Previous Up Next