HPC Pack 2016 U3 DLL Activation Filter not working

Thomas 21 Reputation points


I'm running HPC Pack 2016 Update 3 on premise and want to use the Activation FlexLM from hpcpack-samples as Job Template Level Activation Filter for our COMSOL Multiphysics license server. In VS 2019 the sample compiles without any problem. I configured the filter in the way it is described here. The lmutil.exe is in "C:\Program Files\Microsoft HPC Pack 2016\Bin\". The "Activation FlexLM.dll" is in "C:\Program Files\Microsoft HPC Pack 2016\Data\FlexLM_COMSOL". At least I configured a job template with activation filter and point the activation filter to "FlexLM_COMSOL\Activation FlexLM.dll".
In a new job I defined under licenses the values for a COMSOL Multiphysics job with the values:
ACDC = 1
After submitting the job it is in queued state with the Pending Reason: The job is beeing held by the activation filter until <date> <time>
After 30 seconds the the job changes its Peding Reason to: The job is beeing held by the user <date> <time>
I also tried a app.config file like the FlexLM.exe.config from the exe example with customized values. I named it "Activation FlexLM.dll.config" and put it in the same directory as the dll. Also the same result. I don't know what to do so that the activation filter will work like expected.
Please help.

Kind regards

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,513 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Yutong Sun 261 Reputation points Microsoft Employee

    Try below steps as sample:

    1. Create the filter project (named "ActivationFilterSample") as class library against .NET Standard
      1. Install nuget package HPC Pack SDK (5.3.6437 for HPC Pack 2016 U3) for the project
      2. Download AFHoldUntil.cs from hpcpack-samples to the project as a sample
      3. Build the project and copy the assembly "...\ActivationFilterSample\bin\Debug\netstandard2.0\ActivationFilterSample.dll" to folder "%CCP_DATA%Filters\test" on HPC Pack 2016 U3 cluster headnode
      4. Add the activation filter in the default job template
      5. Submit a job and check the log "%CCP_DATA%Filters\test\ActivationFilter.log" to validate the activation filter works.
    0 comments No comments

  2. Thomas 21 Reputation points

    Have I to use both activation filters? The AFHoldUntil sample isn't what I want. I want to test against our license server.

    The Activation FlexLM sample should run the lmutil.exe with the arguments lmstat -c <licenserver:port> -a and write the output to a cache file. But it doesn't.

    The output of the ActivationFilterSample log is:
    System.NullReferenceException: Object reference not set to an instance of an object.
    at ActivationFilterSample.MoveJobsToOffHours.FilterActivation(Stream jobXml, Int32 schedulerPass, Int32 jobIndex, Boolean backfill, Int32 resourceCount) in ...\dll\ActivationFilterSample\AFHoldUntil.cs:line 97

    Kind regards

    0 comments No comments

  3. Thomas 21 Reputation points

    I found the error in the AFHoldUntil.cs
    In Line 92 it must be XmlAttribute userAttr = attrCol["UserName"];
    instead of XmlAttribute userAttr = attrCol["User"];
    Now the ActivationFilterSample works.

    0 comments No comments