Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

New-HpcJob

Creates a new job, or creates a new copy of an existing job.

Syntax

New-HpcJob [-Exclusive <Boolean>] [-FailOnTaskFailure <Boolean>] [-Job <HpcJob>] [-JobFile <string>] [-License <string[]>] [-MaxCoresPerNode <int>] [-MaxMemoryPerNode <int>] [-MinCoresPerNode <int>] [-MinMemoryPerNode <int>] [-Name <string>] [-NodeGroups <string[]>] [-NumCores <string>] [-NumNodes <string>] [-NumSockets <string>] [-Orderby <string[]>] [-Priority <JobPriority>] [-Project <string>] [-RequestedNodes <string[]>] [-RunTime <string>] [-RunUntilCanceled <Boolean>] [-Scheduler <string>] [-TemplateName <string>] [<CommonParameters>]

Detailed Description

Creates a new job on the specified cluster using the settings that the parameters or job XML files specify, or creates a new copy of an existing job.

Parameters

-Exclusive <Boolean>

Specifies whether the job scheduler should ensure that no other job runs on the same node as this job while this job runs.

A non-zero value or $true indicates that the job scheduler should ensure that no other job runs on the same node as this job while this job runs.

A value of 0 or $false indicates that this job can share compute nodes with other jobs.

 

Required?

false

Position?

named

Default Value

$false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-FailOnTaskFailure <Boolean>

Specifies whether the job scheduler should stop the job and fail the entire job immediately when a task in the job fails.

A non-zero value or $true indicates that the job scheduler should stop the job and fail the entire job immediately when a task in the job fails.

A value of 0 or $false indicates that the job scheduler should continue running the rest of the tasks in the job after any task in the job fails.

 

Required?

false

Position?

named

Default Value

$false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Job <HpcJob>

Specifies an HpcJob object that represents an existing job that you want to copy when creating the new job. Use the Get-HpcJob cmdlet to get an HpcJob object for an existing job. You can use the Job parameter or the JobFile parameter, but not both parameters at the same time.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-JobFile <string>

Specifies the file name and path for a job XML file that contains settings to use for the job that you want to create. You can use the JobFile parameter or the Job parameter, but not both at the same time.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-License <string[]>

Specifies a list of features for which the job requires licenses, and the number of licenses required for each. Use a format of license_name1:number1,license_name2:number2,license_name3:number3,... for this list. For example, License1:10,License2:20,License3:12. The list has a maximum length of 160 characters.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MaxCoresPerNode <int>

Specifies the maximum number of cores that a node can have for the job scheduler to consider the node as a candidate node on which to run the job. The job will not run on a node that has more cores than the value that this parameter specifies. If all of the nodes in the cluster have more cores than the value you specify for this parameter, an error occurs when you submit the job.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MaxMemoryPerNode <int>

Specifies the maximum amount of memory in megabytes (MB) that a node can have for the job scheduler to consider the node as a candidate node on which to run the job. The job will not run on a node that has more memory than the value that this parameter specifies. If all of the nodes in the cluster have more memory than the amount you specify for this parameter, an error occurs when you submit the job.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MinCoresPerNode <int>

Specifies the minimum number of cores that a node can have for the job scheduler to consider the node as a candidate node on which to run the job. The job will not run on a node that has fewer cores than the value that this parameter specifies. If all of the nodes in the cluster have fewer cores than the value you specify for this parameter, an error occurs when you submit the job.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MinMemoryPerNode <int>

Specifies the minimum amount of memory in megabytes (MB) that a node can have for the job scheduler to consider the node as a candidate node on which to run the job. The job will not run on a node that has less memory than the value that this parameter specifies. If all of the nodes in the cluster have less memory than the amount you specify for this parameter, an error occurs when you submit the job.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name <string>

Specifies a name to use for this job in command output and in the user interface. The maximum length for the name is 80 characters.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NodeGroups <string[]>

Specifies the list of node groups on which this job can run. The job scheduler only allocates resources to the job from nodes that belong to all of the node groups in the list.

If you specify values for the both NodeGroups and RequestedNodes parameters, the job runs only on the nodes in the list of nodes for the RequestedNodes parameter that also belong to all of the node groups in the list of node groups for the NodeGroups parameter.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NumCores <string>

Specifies the overall number of cores across the HPC cluster that the job requires, in the format [minimum-]maximum. The job runs on at least the minimum number of cores and on no more than the maximum. If you specify only one value, this cmdlet sets both the maximum and minimum number of cores to that value. If you specify a minimum value that exceeds the total number of cores available across the cluster, an error occurs when you submit the job.

The minimum and maximum values can only be positive integers or an asterisk (*). If you specify the minimum or maximum value as an asterisk, the scheduler automatically calculates the minimum or maximum number of cores at run time based on the minimum and maximum number of cores for the tasks in the job.

You cannot specify the NumCores parameter if you also specify the NumNodes or NumSockets parameter.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NumNodes <string>

Specifies the overall number of nodes across the HPC cluster that the job requires, in the format [minimum-]maximum. The job runs on at least the minimum number of nodes and on no more than the maximum. If you specify only one value, this cmdlet sets both the maximum and minimum number of nodes to that value. If you specify a minimum value that exceeds the total number of nodes available across the cluster, an error occurs when you submit the job.

The minimum and maximum values can only be positive integers or an asterisk (*). If you specify the minimum or maximum value as an asterisk, the scheduler automatically calculates the minimum or maximum number of nodes at run time based on the minimum and maximum number of nodes for the tasks in the job.

You cannot specify the NumNodes parameter if you also specify the NumCores or NumSockets parameter.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NumSockets <string>

Specifies the overall number of sockets across the HPC cluster that the job requires, in the format [minimum-]maximum. The job runs on at least the minimum number of sockets and on no more than the maximum. If you specify only one value, this cmdlet sets both the maximum and minimum number of sockets to that value. If you specify a minimum value that exceeds the total number of sockets available across the cluster, an error occurs when you submit the job.

The minimum and maximum values can only be positive integers or an asterisk (*). If you specify the minimum or maximum value as an asterisk, the scheduler automatically calculates the minimum or maximum number of socket at run time based on the minimum and maximum number of sockets for the tasks in the job.

You cannot specify the NumSockets parameter if you also specify the NumCores or NumNodes parameter.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Orderby <string[]>

Specifies the order that the job scheduler should use to allocate nodes to the job, in the format primary_order[,secondary_order]. The primary_order and secondary_order portions of the value can each be one of the following values:

Memory

The job scheduler sorts the nodes by the amount of memory they have available and allocates the job to nodes with more memory first.

-Memory

The job scheduler sorts the nodes by the amount of memory they have available and allocates the job to nodes with less memory first.

Cores

The job scheduler sorts the nodes by the number of cores they have available and allocates the job to nodes with more cores first.

-Cores

The job scheduler sorts the nodes by the number of cores they have available and allocates the job to nodes with fewer processors first.

When you specify a secondary order, the job scheduler sorts the nodes according to the primary order first. For subsets of nodes that have the same amount of the resource that the primary order specifies, the job scheduler then sorts the nodes within the subset using the secondary sort order. For example, if you specify memory,-cores, the job scheduler sorts the nodes from the highest amount of memory to the lowest. Then, for subsets of nodes that have the same amount of memory, the job scheduler uses the number of cores to break the tie, and sorts the nodes that have the same amount of memory from the fewest number of cores to the most.

The primary order and secondary order must refer to different types of resources. For example, memory,-cores is a valid combination of primary and secondary sort orders. Combinations such as memory,-memory and -cores,-cores are not valid.

 

Required?

false

Position?

named

Default Value

cores,memory

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Priority <JobPriority>

Specifies the priority for scheduling the job. The priority can be one of the following values:

Highest

Above Normal

Normal

Below Normal

Lowest

The job template that the job uses specifies permissions that affect who can specify elevated priorities.

The job scheduler places jobs with the same priority into the job queue in the order that users submit the jobs, unless a user requeues a job. If a user requeues a job, the job scheduler places that job first among the jobs with the same priority.

 

Required?

false

Position?

named

Default Value

Normal

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Project <string>

Specifies a project name for the job that you can use for tracking jobs. The maximum length for the project name is 80 characters.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RequestedNodes <string[]>

Specifies an array of names for the nodes on which the job can run. These nodes are candidates for the job, but not all of the nodes will necessarily run the job if the available resources on these nodes exceed the resources that the job requires. The job scheduler allocates the top nodes according to the value of the Orderby parameter until the allocated nodes meet the value that you specified with the NumCores, NumSockets, or NumNodes parameter.

If you do not specify the RequestedNodes parameter, the job scheduler considers all nodes as candidates that the job scheduler can allocate to the job.

If you specify values for both the RequestedNodes and NodeGroups parameters, the job runs only on the nodes in the list of nodes for the RequestedNodes parameter that also belong to all of the node groups in the list of node groups for the NodeGroups parameter.

 

Required?

false

Position?

named

Default Value

no default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunTime <string>

Specifies the maximum amount of time the job should run. After the job runs for this amount of time, the job scheduler cancels the job.

You specify the amount of time in a format of [[days:]hours:]minutes. You can also specify "infinite" to indicate that the job can run for an unlimited amount of time.

If you specify only one part of the days:hours:minutes format, the cmdlet interprets the specified value as the number of minutes. For example, 12 indicates 12 minutes. If you specify two parts of the format, the command interprets the left part as hours and the right part as minutes. For example, 10:30 indicates 10 hours and 30 minutes.

You can use one or more digits for each part of the format. The maximum value for each part is 2,147,483,647.

 

Required?

false

Position?

named

Default Value

infinite

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunUntilCanceled <Boolean>

Specifies whether the job continues to run and hold resources until either the run-time limit expires or someone cancels the job.

A non-zero or $true value indicates that the job continues to run and hold resources until either the run-time limit expires or someone cancels the job. If you specify a non-zero or $true value, you must specify minimum and maximum values for the NumCores, NumNodes, or NumSockets parameter, or an error occurs when you submit the job.

A value of 0 or false indicates that the job should stop and release its resources when all of the tasks in the job are complete.

 

Required?

false

Position?

named

Default Value

$false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Scheduler <string>

Specifies the host name or IP address of the head node for the cluster on which you want to create the job. The value must be a valid computer name or IP address. If you do not specify the Scheduler parameter, this cmdlet uses the scheduler on the head node that the CCP_SCHEDULER environment variable specifies. To set this environment variable, run the following cmdlet:

Set-Content Env:CCP_SCHEDULER <head_node_name>

 

Required?

false

Position?

named

Default Value

%CCP_SCHEDULER%

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TemplateName <string>

Specifies the name of the default template to use for the job. The maximum length for the name of a job template is 80 characters.

 

Required?

false

Position?

named

Default Value

Default

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Input and Return Types

The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.

 

Input Type

An HpcJob object.

Return Type

An HpcJob object.

Notes

Before the job scheduler can run the new job, you need to add tasks to the job by using the Add-HpcTask cmdlet and submit the job by using the Submit-HpcJob cmdlet.

Example 1

C:\PS>New-HpcJob -JobFile "C:\JobFiles\SampleJob1.xml"

Creates a new job using the settings in the job file at C:\JobFiles\SampleJob1.xml.

Example 2

C:\PS>New-HpcJob -Name "Sample Job" -Template "Default" -Project "Cluster Testing" -RunTime 0:0:30

Creates a new job named Sample Job using the default job template. This job has a run-time limit of 30 minutes.

Example 3

C:\PS>Get-HpcJob -id 47 | New-HpcJob -Priority "Above Normal"

Creates a new job that is a copy of the job with an identifier of 47, with an above normal priority.

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.