Step 6: Run a Test Job on the Cluster
Applies To: Windows HPC Server 2008
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 |
---|---|
6.1. Create a Job Template |
Create a job template by running the Generate Job Template Wizard in HPC Cluster Manager. |
6.2. Create and Submit a Job |
Create and submit a basic job in HPC Cluster Manager. |
6.3. Create and Submit a Job Using the Command-Line Interface (Optional) |
Create and submit a basic job by using the HPC command-line tools. |
6.4. Create and Submit a Job Using HPC PowerShell (Optional) |
Create and submit a basic job by using the cmdlets in HPC PowerShell. |
6.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
If HPC Cluster Manager is not already open on the head node, open it. Click Start, point to All Programs, click Microsoft HPC Pack, and then click HPC Cluster Manager.
In Configuration, in the Navigation Pane, click Job Templates.
In the Actions pane, click New. The Generate Node Template Wizard appears.
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.
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.
On the Set Priorities page, click Next without changing any settings. This will run jobs that are submitted using this template with Normal priority.
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.
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.
On the Finish page, click Finish.
6.2. Create and submit a job
This section describes how to submit a job in HPC Cluster Manager that:
Displays a directory list of the files in the
C:\Program Files
folder of a compute node in your cluster.Uses the job template that you created in the previous section, which limits to 1 minute the maximum duration of time that a job can run.
Runs at low priority.
To create and submit a job
In Job Management, in the Actions pane, click New Job.
In Job Details, specify the following job parameters:
In the Job template list, click Test Template (the template that you created in section “6.1. Create a job template”).
When you are prompted if you want to change the job template for the job, click Yes.
In the Job name box, type Folder Contents.
In the Priority list, click Lowest.
To add a task, click Task List, and then specify the following task parameters:
To add a new basic task to the job, click Add.
In the Task name box, type a name for the new task.
In the Command line box, type dir.
In the Work directory box, type c:\Program Files.
To add this task, click Save.
To limit the job so that it only runs on a specific compute node in your HPC cluster, click Resource Selection, and then specify the following resource parameters:
Select the Run this job only on nodes in the following list check box.
Select the check box for one of the nodes in your HPC cluster.
To submit the job, click Submit.
If you are prompted to enter your credentials, type your user name and password, and then click OK.
To view the progress and the results of the job that you submitted:
In Job Management, in the Navigation Pane, click All Jobs.
In the views pane, click the job that you submitted.
When the state of the job is Finished, in the Details Pane, double-click the task that you created in step 3.
In the Task Properties window, in the Results tab, the Output box will display the directory list of c:\Program Files for the compute node that you selected in step 4.
If you want to copy the results to the clipboard, click Copy output to clipboard.
6.3. Create and submit a job using the command-line interface (optional)
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 Windows HPC Server 2008.
To create and submit a job using the command-line interface
Open a Command Prompt window. Click Start, point to All Programs, click Accessories, and then click Command Prompt.
To create a new job, type the following command:
job new /jobname:"Folder Contents" /priority:"Lowest" /RunTime:0:0:1 /requestednodes:”<ComputeNodeName>”
Where <ComputeNodeName> is the name of a compute node in your HPC cluster.
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.
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.
If you are prompted to enter your credentials, type your password, and then type ENTER.
6.4. Create and submit a job using HPC PowerShell (optional)
You can also create and submit the same job that you created and submitted in the previous section, using HPC PowerShell.
Note
For more information about HPC PowerShell, see Appendix 6: Using HPC PowerShell.
To create and submit a job using HPC PowerShell
On the head node, click Start, point to All Programs, and then click Microsoft HPC Pack.
Right-click HPC PowerShell, and then click Run as administrator.
If you are prompted by Windows PowerShell if you want to run the
ccppsh.format.ps1xml
script, type A, and then press ENTER.To create a new job, type the following cmdlet:
$j = New-HpcJob -Name "Folder Contents" -Priority Lowest -RunTime "0:0:1" -RequestedNodes “<ComputeNodeName>”
Where <ComputeNodeName> is the name of a compute node in your HPC cluster.
To add a task to the job, type the following cmdlet:
$j | Add-HpcTask -WorkDir "C:\Program Files" -CommandLine "dir"
To submit the job, type the following cmdlet:
$j | Submit-HpcJob
If you are prompted to enter your credentials, type your password, and then type ENTER.
Note
You can also type all three cmdlets in one line:
New-HpcJob -Name "Folder Contents" -Priority Lowest -RunTime "0:0:1" -RequestedNodes “<ComputeNodeName>” | Add-HpcTask -WorkDir "C:\Program Files" -CommandLine "dir" | Submit-HpcJob
Where <ComputeNodeName> is the name of a compute node in your HPC cluster.
Related documents
For more information about creating and submitting jobs, see the Submitting Jobs in Windows HPC Server 2008 Step-by-Step Guide (https://go.microsoft.com/fwlink/?LinkId=121887).
For more information about configuring job submission and scheduling policies, see the Configuring Job Submission and Scheduling Policies in Windows HPC Server 2008 Step-by-Step Guide (https://go.microsoft.com/fwlink/?LinkId=121888).