Step 7: Run a Test Job on the Cluster

 

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

After you have finished deploying your cluster, you can run a simple test job to verify that your cluster is fully functional. The following checklist describes the steps involved in running a simple test job on your cluster.

Checklist: Run a test job on the HPC cluster

Task

Description

7.1. Create a job template

Create a job template by running the Generate Job Template Wizard in HPC Cluster Manager.

7.2. Bring a node online

Bring a node online to run a test job.

7.3. Create and submit a job

Create and submit a basic job in HPC Cluster Manager.

7.4. Create and submit a job by using the command-line interface

You can create and submit a basic job by using the HPC command-line tools.

7.5. Create and submit a job by using Windows HPC PowerShell

You can create and submit a basic job by using the cmdlets in Windows HPC PowerShell.

7.1. Create a job template

Job templates simplify the job management of your HPC cluster by helping you to limit the kinds of jobs that can be submitted to your cluster, what resources are assigned to jobs, and which users can submit jobs. HPC Cluster Manager includes the Generate Node Template Wizard to help you create basic job templates.

To create a simple job template

  1. If HPC Cluster Manager is not already open on the head node, open it.

  2. In Configuration, in the Navigation Pane, click Job Templates.

  3. In the Actions pane, click New. The Generate Job Template Wizard appears.

  4. On the Enter Template Name page, type Test Template for the name of the new job template, and optionally a description. Click Next to continue.

  5. On the Limit Run Time page, select the Run jobs no longer than check box, and then click Next without changing any settings. This will limit all jobs that are submitted using this template to run for no longer than one minute.

  6. On the Set Priorities page, click Next without changing any settings. This will run jobs that are submitted using this template with Normal priority.

  7. On the Set Project Names page, click Next without changing any settings. This will allow jobs from any project to be submitted using this template.

  8. On the Limit Node Groups page, click Next without changing any settings. This will allow jobs that are submitted using this template to run on any node group.

  9. On the Finish page, click Finish.

7.2. Bring a node online

A node must be in the Online state and healthy to run jobs. If a node that you want to run a test job is in the Offline state, bring it Online to run a test job.

Important

  • By default, a compute node or WCF broker node that you added to the cluster is in the Offline state.

  • Workstation nodes or Windows Azure nodes that were configured to be brought online and offline according to a weekly availability policy cannot be brought online or offline manually. They will automatically start according to their weekly availability policy. To change these nodes to be brought online and offline manually, you must assign to them a different node template, or you must modify their current node template.

To bring a node online

  1. In Node Management, in the Navigation Pane, click Nodes.

  2. In List or Heat Map view, select a node that you want to run a test job.

  3. Right-click your selection, and then click Bring Online.

7.3. Create and submit a job

This section describes how to submit a job in HPC Cluster Manager that does the following:

  • Displays a directory list of the files in the C:\Program Files folder of a node in your cluster.

  • Uses the job template that you created in 7.1. Create a job template, which limits the maximum duration of time that a job can run to one minute.

  • Runs at low priority.

Important

To submit a job to the cluster, you must be logged on with a domain user account that has been added at least as an HPC cluster user, or you must provide the appropriate credentials when prompted. For more information, see Managing Cluster Users.

To create and submit a job

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

  2. In Job Details, specify the following job parameters:

    1. In the Job template list, click Test Template (the template that you created in section 7.1. Create a job template).

    2. When you are prompted, if you want to change the job template for the job, click Yes.

    3. In the Job name box, type Folder Contents.

    4. In the Priority list, click Lowest.

  3. To add a task, in the left pane of the New Job dialog box, click Edit Tasks, and then specify the following task parameters:

    1. To add a new basic task to the job, click Add. The Task Details and I/O Redirection dialog box appears.

    2. In the Task name box, type a name for the new task.

    3. In the Command line box, type dir. You should overwrite the default command line that appears in the Command line box.

    4. In the Working directory box, type c:\Program Files.

    5. To add this task, click OK.

  4. To limit the job so that it only runs on a specific node in your HPC cluster, in the left pane of the New Job dialog box, click Resource Selection, and then specify the following resource parameters:

    1. Select the Run this job only on nodes in the following list check box.

    2. Select the check box for a node in your HPC cluster that you brought online in section 7.2. Bring a node online.

  5. To submit the job, click Submit.

  6. If you are prompted to enter your credentials, type the user name and the password of an HPC cluster user or HPC cluster administrator, and then click OK. The job starts running and you can monitor the progress of the job that you submitted.

  7. To view the progress and the results of the job that you submitted:

    1. In Job Management, in the views pane, click the job that you submitted.

    2. When the state of the job is Finished, in the Detail Pane, double-click the task that you created in step 3.

    3. In the View Job window, in the Results tab, the Output box will display the directory list of c:\Program Files for the node that you selected in step 4.

    4. If you want to copy the results to the Clipboard, click Copy Output to Clipboard.

7.4. Create and submit a job by using the command-line interface

If you want, you can create and submit a job similar to the job that you created and submitted in the previous section, using the command-line interface tools that are included with Microsoft® HPC Pack.

To create and submit a job by using the command-line interface

  1. Open a Command Prompt window. Click Start, point to All Programs, click Accessories, and then click Command Prompt.

  2. To create a new job, type the following command:

    job new /jobname:"Folder Contents" /priority:"Lowest" /RunTime:0:0:1 /requestednodes:”<NodeName>”

    Where <NodeName> is the name of a node in your HPC cluster.

  3. To add a task to the job, type the following command:

    job add <JobID> /workdir:"C:\Program Files" dir

    Where <JobID> is the identification number for the job, as displayed on the command-line interface after typing the command in step 2.

  4. To submit the job, type the following command:

    job submit /id:<JobID>

    Where <JobID> is the identification number for the job, as displayed on the command-line interface after typing the command in step 2.

  5. If you are prompted to enter your credentials, type your password, and then press Enter.

7.5. Create and submit a job by using Windows HPC PowerShell

If you want, you can also create and submit the same job that you created and submitted in the previous section by using Windows HPC PowerShell.

Note

For more information about Windows HPC PowerShell, see Appendix 6: Using HPC PowerShell, later in this guide.

To create and submit a job using Windows HPC PowerShell

  1. Start HPC PowerShell as an administrator.

  2. To create a new job, type the following cmdlet:

    $j = New-HpcJob -Name "Folder Contents" -Priority Lowest -RunTime "0:0:1" -RequestedNodes “<NodeName>”

    where <NodeName> is the name of a node in your HPC cluster.

  3. To add a task to the job, type the following cmdlet:

    $j | Add-HpcTask -WorkDir "C:\Program Files" -CommandLine "dir"

  4. To submit the job, type the following cmdlet:

    $j | Submit-HpcJob

  5. If you are prompted to enter your credentials, type your password, and then press Enter.

    Note

    You can also type all three cmdlets in one line:

    New-HpcJob -Name "Folder Contents" -Priority Lowest -RunTime "0:0:1" -RequestedNodes “<NodeName>” | Add-HpcTask -WorkDir "C:\Program Files" -CommandLine "dir" | Submit-HpcJob

    where <NodeName> is the name of a node in your HPC cluster.