Export (0) Print
Expand All

Code Samples: Custom Filters in Windows HPC Server 2008

Updated: December 10, 2008

Applies To: Windows HPC Server 2008

This section of the Creating and Installing Job Submission and Activation Filters in Windows HPC Server 2008 Step-by-Step Guide contains C# code samples for a job submission filter and a job activation filter. You can write a custom filter by using any programming language. The topics in this section provide C# code samples as an example of how to implement a submission filter and an activation filter.

In this section:

 

C# Example: A Job Submission Filter that Checks for Job Size

In this example, the submission filter checks the maximum number of units (cores, sockets, or nodes) that are requested by the job. If the maximum number of units is greater than one, the filter assigns a job template called “LargeJobTemplate” to the job, and adds an extended job term to the job description file.

C# Example: An Activation Filter that Checks for License Availability

In this example, the activation filter uses the output of FlexLM lmutil.exe to get license information. The application then uses this information to verify that licenses are available for the submitted job. The filter returns a non-zero value if licenses are not available. This blocks the job queue so that no other job will run until licenses become available. If invalid features are specified, or more licenses than the maximum allowed for a feature are requested, then the job will be canceled and a value of 0 is returned so that the queue will not be blocked.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft