Submitting a Job

Applies To: Windows HPC Server 2008

In Windows HPC Server 2008, there are three basic steps for submitting a job:

  1. Create a new job.

    1. Specify the appropriate job template for the job.

    2. Provide details about the resource requirements for the job.

  2. Add tasks to the job.

  3. Submit the job.

You can create a job using HPC Job Manager, the Command Prompt window, or HPC PowerShell.

Note

You can submit jobs from other operating systems or other programming languages by creating a client that uses the HPC Basic Profile Web Service.

Example job submission

To demonstrate how to submit a job to Windows HPC Server 2008, this example creates a job named “Data File Processing”. The job includes a parametric task (a single task which will run many times for different sets of data), and has the following properties:

  • It uses the Default job template.

  • It runs for no more than 10 minutes.

  • It runs on no more than four processors.

  • It runs ProcessFile.exe on 200 input files (input1.dat, input2.dat, … input200.dat).

This topic shows how to submit the example job using the three primary user interfaces:

  • Submitting a job using HPC Job Manager

  • Submitting a job using a command prompt window

  • Submitting a job using HPC PowerShell

Important

To submit a job, 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.

Submitting a job using HPC Job Manager

Step 1: Create a new job

To create a new job

  1. Open the HPC Job Manager:

    Click Start, point to All Programs, click Microsoft HPC Pack, then click HPC Job Manager.

  2. In the Actions pane, click New Job.

  3. In the left pane of the New Job dialog box, click Job Details, and then provide the following details for the job:

    1. In the Job name text box, type Data File Processing.

    2. In the Job template drop-down list, select Default.

    3. Under Job run options, select the Do not run this job for more than check box, and then select 0 days, 0 hours, and 10 minutes.

    4. Under Job resources, in the Select the type of resource to request for this job drop-down list, select Core. Under Minimum, leave the default Auto-calculate selected. Under Maximum, set the value to 4.

Step 2: Add a task to the job

To add a task to the job

  1. In the left pane of the Create New Job dialog box, click Task List.

  2. Point to the Add button, click the down arrow, then click Parametric Task

  3. In the Parametric Task dialog box, set the sweep index to run from 1–200, with an increment of 1 (this will create 200 steps, with the indices 1, 2, 3, 4 ... 200) by setting the following values:

    1. Set Start Value to 1.

    2. Set End Value to 200.

    3. Set Increment Value to 1.

    You can verify your index series under Preview your sweep at the bottom of the dialog box.

  4. In Command line, type ProcessFile.exe *. (This command will run 200 times, with the numbers 1 through 200 replacing the * character for each step in the sweep).

  5. In the Standard input text box, type input*.dat. (The wildcard character (*) applies the sweep index to the input file.)

  6. Click Save to add the task to the job and close the Parametric Task dialog box.

Step 3: Submit the job

To submit the job

  1. In the Create New Job dialog box, click Submit.

  2. When prompted, enter your password, then click OK.

Continue to Checking the Status of a Job or Task.

Submitting a job using a command prompt window

Step 1: Create a new job

To create a new job

  1. Open a Command Prompt window:

    Click Start, point to All Programs, click Accessories, then click Command Prompt.

  2. Create a new job and provide details for the job. Note that the parameter /numcores sets the minimum number of cores to Auto-calculate, and the maximum number of cores to 4. Type the following command:

    job new /jobtemplate:"Default" /jobname:"Data File Processing" /runtime:0:0:10 /numcores:*-4

This command produces the following output (where myJobID is the ID that the HPC Job Scheduler Service assigns to the job):

Created job, ID: <myJobID>

Step 2: Add a task to the job

Add a parametric task with a sweep index that runs to 200 (the default increment is 1). The ProcessFile.exe command will run 200 times, with the indices 1, 2, 3, 4 ... 200. Use the wildcard character (*) to apply the sweep index to both the input file and the command line. In the Command Prompt window, type the following command (where myJobID is the ID of the job you created in the previous step):

job add <myJobID> /parametric:200 /stdin:"input*.dat" ProcessFile.exe *

This command produces the following output (where myJobID is the ID of the job you specified in the add task command):

Task <myJobID>.1 added.

Step 3: Submit the job

To submit the job

  1. In the Command Prompt window, type the following command:

    job submit /id:<myJobID>

  2. When prompted, type your password, then press enter (the cursor does not move and no characters appear when you type your password).

This command produces the following output:

Job has been submitted. ID: <myJobID>.

Continue to Checking the Status of a Job or Task.

Submitting a job using HPC PowerShell

Step 1: Create a new job

To create a new job

  1. Open HPC PowerShell:

    Click Start, point to All Programs, click Microsoft HPC Pack, then click HPC PowerShell.

  2. Create a new job and provide details for the job. Note that the parameter -numcores sets the minimum number of cores to Auto-calculate, and the maximum number of cores to 4. Type the following command:

    New-HpcJob -TemplateName "Default" -Name "Data File Processing" -RunTime "0:0:10" -NumCores *-4

This command produces the following output (where myJobID is the ID that the HPC Job Scheduler Service assigns to the job):

ID

Name

State

Owner

Priority

NumberOfTasks

--

----

-----

-----

--------

-------------

<myJobID>

data fi...

Configuring

<myDOMAIN\myUserName>

Normal

0

Important

Your job ID may vary, depending on how many jobs have been submitted to the cluster.

Step 2: Add tasks to the job

Add a parametric task with a sweep index that runs to 200 (the default increment is 1). The command ProcessFile.exe will run 200 times, with the indices 1, 2, 3, 4 ... 200. Use the wildcard character (*) to apply the sweep index to both the input file and the command line. In HPC PowerShell, type the following command (where myJobID is the ID of the job you created in the previous step):

Add-HpcTask -JobId <myJobID> -Parametric -End 200 -Stdin "input*.dat" -CommandLine "ProcessFile.exe *"

This command produces the following output (where myJobID is the ID of the job you specified in the add task command):

ID

Name

State

Owner

Priority

NumberOfTasks

--

----

-----

-----

--------

-------------

<myJobID>

Data Fi...

Configuring

<myDOMAIN\myUserName>

Normal

200

Step 3: Submit the job

To submit the job

  1. In HPC PowerShell, type the following command:

    Submit-HpcJob -Id <myJobID>

  2. When prompted, type your password, then press enter (the cursor does not move and no characters appear when you type your password).

This command produces the following output:

ID

Name

State

Owner

Priority

NumberOfTasks

--

----

-----

-----

--------

-------------

<myJobID>

Data Fi...

Queued

<myDOMAIN\myUserName>

Normal

200

Continue to Checking the Status of a Job or Task.

Additional references