Updated: May 5, 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.
In tasks that include sub-tasks, you can use the asterisk (*) character as a placeholder for the parametric sweep index (in Parametric Sweep tasks) or for the sub-task ID (in Service, Node Preparation, and Node Release tasks). You can include more than one asterisk (*) to indicate the minimum number of positions to use when expressing the number of the index or sub-task. This does not limit numbers that require more positions. 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
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.
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.
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.
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.
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
Depends (task dependencies)
Parameter sweep settings
In tasks that include sub-tasks, you can use the asterisk (*) character as a placeholder for the parametric sweep index (in Parametric Sweep tasks) or for the sub-task ID (in Service, Node Preparation, and Node Release tasks). 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).
You can include more than one asterisk (*) to indicate the minimum number of positions to use when expressing the number of the index or sub-task. This does not limit numbers that require more positions. 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:
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\*