共用方式為


Define a Node Preparation Task

 

Applies To: Microsoft HPC Pack 2008 R2, Microsoft HPC Pack 2012, Microsoft HPC Pack 2012 R2

A Node Preparation task runs a command or script on each compute node as it is allocated to the job. The Node Preparation task runs on a node before any other task in the job. You can use a Node Preparation task to perform basic provisioning of the nodes that are allocated to your job. For example, you can specify commands to perform the following tasks:

  • Copy files.

  • Create a directory structure.

  • Verify the running environment.

  • Start or stop services.

If the Node Preparation task fails to run on a node, then that node will not be added to the job. The node will be added to the list of nodes excluded from the job.

You can use the following procedure to create a Node Preparation task using HPC Job Manager.

Note

To complete this procedure, you must have been added as a user on the cluster, or you must be a member of a domain group that has been added as a user on the cluster. For more information, contact your cluster administrator.

Add a Node Preparation Task

In HPC Cluster Manager, the option to add a task is available in the New Job, Modify Job, and Copy Job dialog boxes. As an example, the following procedure describes how to add a task in the New Job dialog box.

To add a Node Preparation task

  1. In Job Management, in the Actions pane, click New Job.

  2. In the left pane of the New Job dialog box, click Edit Tasks.

  3. Point to the Add button, click the down arrow, and then click Node Preparation Task.

  4. In the task dialog box, type a name for your task.

  5. Specify a command for the task. For example, to copy an application from a shared directory to each compute node that is allocated to your job, you can type a command like this:

    copy /Y \\server_name\Program Files\myapp.exe c:\users\userName\bin

  6. Click OK to add the task to your job. The new task now appears in the list of tasks for your job.

  7. You can define additional Task properties, such as the Execution Settings and Required Resources by selecting the task in the list and modifying the property values in the Task Properties pane.

Additional considerations

  • 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

  • You can clean up or collect data from nodes as they are released from your job by adding a Node Release task. For more information, see Define a Node ReleaseTask.

  • If a Node Preparation task fails on enough nodes to exceed the ExcludedNodeLimit cluster parameter, the job will fail. To prevent that from happening, a high ExcludedNodeLimit value can be defined, or a low maximum resource requirement for the job can be set.

  • For information about basic terminology, opening HPC Cluster Manager, and connecting to a cluster, see Overview of HPC Cluster Manager.

Additional references