共用方式為


How to Add or Remove Cluster-Wide Submission and Activation Filters

 

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

This topic describes how a cluster administrator can add cluster-wide submission filter and activation filter to a cluster that is running Microsoft® HPC Pack. This type of filter runs on every job in the cluster. If your custom scheduling policies require the use of multiple filters of each type, or you want to run specific filters on specific job types, you can add job-template level filters to the cluster. For more information about custom filters, see Understanding Activation and Submission Filters.

In this topic:

  • Step 1: Copy the filter applications to the head node

  • Step 2: Add the filter to the job scheduler configuration

  • How to remove a cluster-wide filter

  • Additional references

Step 1: Copy the filter applications to the head node

The HPC Job Scheduler Service, which is running on the head node, must be able to access your filter application. The filter application can be implemented as an executable (.exe) or as a script. When you copy the custom filter to the head node, you must ensure that the access permissions for the filter are properly set so that the Local System account on the head node is able to run the filter.

The following procedure describes how to copy the filter application to a new folder named “JobFilters” on the head node and verify access permissions.

To make the filter accessible to the HPC Job Scheduler Service

  1. Log on to the head node as an administrator.

  2. Create a new folder named C:\JobFilters.

  3. Copy your filter application file, for example JobSubmissionFilter.exe, to the new folder.

  4. Right-click JobSubmissionFilter.exe and then click Properties.

  5. In the properties dialog box, click the Security tab.

  6. In Group or user names, verify that SYSTEM appears in the list.

    If SYSTEM does not appear in the list, you can click Edit to add users.

  7. In the list, select SYSTEM, and then verify in the permissions section that SYSTEM has at least Read & execute permission.

  8. In Group or user names, verify that there are no permissions granted for users that are not administrators. If so, remove them from the list.

Step 2: Add the filter to the job scheduler configuration

To add a custom filter application to the HPC Job Scheduler, you must specify the location of the application file.

Optionally, you can configure the time out value for each filter. The filter time out specifies the number of seconds that the filter application can run before the HPC Job Scheduler service cancels the program. The default for each is 15 seconds. The jobs that are being checked when the filter is canceled are handled as follows:

  • Submission Filter Time Out: The job is marked as Failed with an error message that the filter timed out.

  • Activation Filter Time Out: The job is not started, but available resources are reserved for it. The filter reevaluates the job periodically until the job passes.

You can also configure the Default Hold Duration setting for activation filters. Depending on the exit code they return, activation filters can cause a job to be put on hold. The amount of time to hold a specific job can be set with the Hold Until job property. If a job is put on hold and no Hold Until value is specified for that job, the job is held for the amount of minutes specified by the Default Hold Duration cluster setting. The valid values for Default Hold Duration are from 60 seconds (1 minute) to 86,400 seconds (one day). The default is 900 seconds (15 minutes).

To add the filters to the job scheduler configuration

  1. In HPC Cluster Manager, in the Options menu, click Job Scheduler Configuration.

  2. In the Job Scheduler Configuration dialog box, click the Filter tab.

  3. In Activation Filter, in Location, browse to or type the path to the filter program that should run before a job is started. For example, type c:\JobFilters\JobActivationFilter.exe.

    Note

    The browse window only browses for executable files (.exe). If you type the path, you can specify other types of files such as scripts (.bat or .ps1).

  4. Optionally, modify the job hold settings for the activation filter.

  5. In Submission Filter, in Location, browse to or type the path to the filter program that should run when a job is submitted. For example, type c:\JobFilters\JobSubmissionFilter.exe.

  6. Optionally, modify the time out period for each of the filters. The range of valid values is from 1 to 120 seconds.

  7. Click OK to apply the changes and close the dialog box.

The following screenshot illustrates how to add cluster-wide filters in the job scheduler configuration dialog box:

Add job filters to HPC job scheduler configuration

How to remove a cluster-wide filter

You can remove cluster-wide filters by deleting the paths to the filters from the Job Scheduler configuration settings.

To remove a cluster-wide filter

  1. In HPC Cluster Manager, in the Options menu, click Job Scheduler Configuration.

  2. In the Job Scheduler Configuration dialog box, click the Filter tab.

  3. In Activation Filter, in Location, delete the path to the filter application.

  4. In Submission Filter, in Location, delete the path to the filter application.

  5. Click OK to apply the changes and close the dialog box.

Additional references