Jaa


Set the Progress and Progress Message Job Properties

Microsoft HPC Pack includes two job properties to help communicate the progress of jobs that are running on the cluster: Progress, and Progress Message. By default, the HPC Job Scheduler service sets and maintains the Progress property as the percentage of tasks or service calls that have completed for that job. The default progress calculation works best for large parameter sweeps. If you want to provide a customized progress percentage or detailed status information about the progress of your jobs, you can include commands in your applications or scripts to set the Progress and Progress Message job properties. For example, if your application or script files include a loop that performs some work, you can update the progress properties at each iteration.

To set the Progress and Progress Message properties in a batch (.bat) file, an HPC PowerShell script (.ps1), or in an application, you can use the %CCP_JOBID% environment variable to get the job ID of the current job.

In a .bat file, use the job modify command, for example:

Job modify %CCP_JOBID% /progress:50 /progressmsg:”Hello”

In a .ps1 file, use the Set-HpcJob cmdlet, for example:

set-HpcJob –id %CCP_JOBID% -progress 50 –progressmessage ”Hello”

For information about using the APIs to set custom progress in an application, see Setting Custom Job Progress Information Step-by-Step Guide.

Values for the Progress and Progress Message properties can be set for jobs that are in the following states:

  • Configuring

  • Queued

  • Running

  • Canceled

  • Failed

Additional considerations

  • The Job Scheduler service does not continue to update Progress for a job if you provide a value for the Progress property through the command line interface, HPC PowerShell, or the APIs.

  • For SOA jobs, the Progress property is set and maintained by the broker nodes based on the number of service calls for that job.

  • Progress Message is not displayed by default in the job list. You can customize which job and task properties appear in the job list and Detail Pane. In the menu bar, click View, then click Column Chooser.

Additional references