Partager via


Understanding Task Types

Updated: May 2011

Applies To: Windows HPC Server 2008 R2

In Windows HPC Server 2008 R2, the Type task property helps define how to run a command. The default value for task Type is Basic. A Basic task runs a command once. The other task types create sub-tasks that each run an instance of the command. A task can include up to 1,000,000 sub-tasks.

Note
In Aufgaben mit Unteraufgaben können Sie das Sternchen (*) als Platzhalter für den parametrischen Löschindex (in Parametrisches Löschen-Aufgaben) oder für die Unteraufgaben-ID (in den Aufgaben Dienst, Knotenvorbereitung und Knotenfreigabe) verwenden. Sie können mehr als ein Sternchen (*) einschließen, um die Mindestanzahl der Positionen anzugeben, die beim Ausdrücken der Nummer des Indexes oder der Unteraufgabe verwendet werden sollen. Dies bedeutet keine Beschränkung auf Nummern, die mehrere Positionen erfordern. This placeholder can be useful when defining the command or the input and output files for the task. For more information and examples, see Tasks with sub-tasks and the asterisk (*).

The following table describes the property values:

Task Type values Description

Basic

Runs a single instance of a serial application or a Message Passing Interface (MPI) application. An MPI application typically runs concurrently on multiple cores and can span multiple nodes.

Parametric Sweep

Runs a command a specified number of times (indicated by start, end, and increment values), generally across indexed input and output files. The steps of the sweep may or may not run in parallel, depending on the resources that are available on the cluster when the task is running.

Node Preparation

Runs a command or script on each compute node as it is allocated to the job, even when nodes are added dynamically (grow policy). The Node Preparation task runs on a node before any other task in the job.

Important
If the Node Preparation task fails to run on a node, then that job will fail.

Node Release

Runs a command or script on compute each node as it is released from the job, even when nodes are removed dynamically (shrink policy).

The maximum run time (in seconds) for Node Release tasks is defined by the cluster administrator with the NodeReleaseTaskTimeout cluster parameter. You cannot override this run time limitation. By default, the timeout is set to 15 seconds. To see the value of this cluster parameter, you can run the following command (the search string is case sensitive): cluscfg listparams|find “NodeReleaseTaskTimeout”

Node Release tasks run when a job is canceled. Node Release tasks do not run when the job is force canceled.

Note
If a job has a maximum run time and a Node Release task, the job scheduler cancels the other tasks in the job before the run time of the job expires (job run time minus Node Release task run time). This allows the Node Release task to run within the allocated time for the job.

Service

Runs a command or service on all resources that are allocated to the job. New instances of the command run when new resources are added to the job, or if a previously running instance exits and the resource that it was running on is still allocated to the job. Service tasks continue to start instances until the job is canceled or stopped, the maximum run time expires, or until the maximum number of instances (sub-tasks) is reached.

Tasks that are submitted through a Service Oriented Architecture (SOA) client run as Service tasks.

You cannot add a Basic task or a Parametric Sweep task to a job that contains a Service task.

The following task properties do not apply to tasks which are started on a per-resource basis, and they cannot be set on Node Preparation, Node Release, or Service tasks:

  • Number of cores, sockets, nodes

  • Required nodes

  • Exclusive

  • Rerunnable

  • Depends (task dependencies)

  • Parameter sweep settings

Tasks with sub-tasks and the asterisk (*)

In Aufgaben mit Unteraufgaben können Sie das Sternchen (*) als Platzhalter für den parametrischen Löschindex (in Parametrisches Löschen-Aufgaben) oder für die Unteraufgaben-ID (in den Aufgaben Dienst, Knotenvorbereitung und Knotenfreigabe) verwenden. For example, in the first sub-task, \\datashare\userName\file*.txt is interpreted as \\datashare\userName\file1.txt (or in a Parametric Sweep task, as the first index value).

Sie können mehr als ein Sternchen (*) einschließen, um die Mindestanzahl der Positionen anzugeben, die beim Ausdrücken der Nummer des Indexes oder der Unteraufgabe verwendet werden sollen. Dies bedeutet keine Beschränkung auf Nummern, die mehrere Positionen erfordern. For example, \\datashare\userName\file****.txt is interpreted as \\datashare\userName\file0001.txt on the first sub-task. 

The job scheduler interprets commands before sending them to the compute nodes. To run a command that uses an asterisk (*), include the caret (^) as an escape character. For example, to create a Node Release task that deletes all files from a folder, you can type the command like this:

delete c:\temp\^*

Note
Commands that are submitted from a command prompt window are interpreted before they are passed to the job scheduler. At a command prompt window, to submit a task that runs the same command you need to add an extra escape character. For example: delete c:\temp\^^^* The job scheduler receives the command as delete c:\temp\^*, and the compute node receives the command as delete c:\temp\*

Additional references