HPC Pack 2016 U3 DLL Activation Filter not working

Thomas 21 Reputation points
2021-03-15T17:32:16.067+00:00

Hi,

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
COMSOL = 1
CLUSTERNODE = 1
COMSOLUSER = 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
Thomas

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
    2021-05-31T01:22:36.72+00:00

    Try below steps as sample:

    1. Create the filter project (named "ActivationFilterSample") as class library against .NET Standard
      100829-image.png
      1. Install nuget package HPC Pack SDK (5.3.6437 for HPC Pack 2016 U3) for the project
        100885-image.png
      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
        100886-image.png
      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
    2021-06-08T06:58:23.883+00:00

    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
    Thomas

    0 comments No comments

  3. Thomas 21 Reputation points
    2021-06-09T08:47:42.01+00:00

    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