question

Thomas-0824 avatar image
0 Votes"
Thomas-0824 asked Thomas-0824 answered

HPC Pack 2016 U3 DLL Activation Filter not working

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-hpc-pack
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

YutongSun-5052 avatar image
0 Votes"
YutongSun-5052 answered

Try below steps as sample:

  1. Create the filter project (named "ActivationFilterSample") as class library against .NET Standard
    100829-image.png

  2. Install nuget package HPC Pack SDK (5.3.6437 for HPC Pack 2016 U3) for the project
    100885-image.png

  3. Download AFHoldUntil.cs from hpcpack-samples to the project as a sample

  4. 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

  5. Add the activation filter in the default job template
    100886-image.png

  6. Submit a job and check the log "%CCP_DATA%Filters\test\ActivationFilter.log" to validate the activation filter works.



image.png (9.6 KiB)
image.png (11.8 KiB)
image.png (117.4 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thomas-0824 avatar image
0 Votes"
Thomas-0824 answered Thomas-0824 edited

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thomas-0824 avatar image
0 Votes"
Thomas-0824 answered

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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.