Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Trust Region Random Results

Gianluca_G_1
Beginner
499 Views

We Implemented TR MKL Method for our purpose.


It doesn't converge every time, and also produce different (random) solutions from the same initial condition and constraints.

About Trust Region Size parameter we use 4 size aproach: 
this is, 1st time value is 100, 2nd time 10, 3rd time 1 and 0.1 value last time.
Every time we use solver, we use previous results as input, if improved.
 
Is there anyone tha knows the problem?
Is there any suggestion about Trust Region Size usage? best values to use and when?

 

Thank you very much

Gianluca

0 Kudos
5 Replies
Ying_H_Intel
Employee
499 Views

Hi Gianluca,

​Could you please provide us one small test code or input so we can investigate the exact problem.

Best Regards,

Ying

 

 

 

0 Kudos
Gianluca_G_1
Beginner
499 Views

Dear Ying,

I've submited an help request on your helpdesk area, here the ticket number 02752313.

There you can find the test code .

With same input we obtain differents results, some times little sometimes not.

 

Thank you

Gianluca

0 Kudos
Ying_H_Intel
Employee
499 Views

Hi Gianluca,

It is good way to submit the test code by help desk. Thank you.  I read them.  Currently the barrier is the performance issue or result inconsistent issue, or both?  You may reply here or by the ticket.

Jing had mentioned, your code is by C# and had escalated to our develop team.  But as we don't test or validate function by C#.  Could be some thing with the environment?

Considering the OpenMP multi-thread first, could you build one sequential custom dll by

C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\mkl\tools\builder

instead of mkl_rt.dll and see if it happened again? 

Best Regards,

Ying

0 Kudos
Gianluca_G_1
Beginner
499 Views

Hi Ying,

The question is: result inconsistent issue!

The procedure works quite good, since we have changed it using a different integration algs.

By the way,  with same inputs we don't have always the same results.

If you go on test code (RciTestClass.cs line 88) and change in this:4

SetMeasures(EnumSetMeasure.China_4_Layer, oType);

As console input you use 4 you can see this.

I think there are also  some problem with MKL because some time dtrnlspbc_solve crashes or doesn't return!

May be it mantains something in memory?

Considering the OpenMP multi-thread first, could you build one sequential custom dll by C:\Program Files  x86)\IntelSWTools\compilers_and_libraries_2017.2.187\windows\mkl\tools\builder instead of mkl_rt.dll and see if it happened again

Is there any tutorial, I'm not an expert of C++, and if possible I don't want to invest time in this.

Thank you

Gianluca

0 Kudos
Jing_Xu
Employee
499 Views

Please follow this article to build a custom dll.

https://software.intel.com/en-us/mkl-windows-developer-guide-building-custom-dynamic-link-libraries

nmake used in the tutorial is part of Visual Studio, please run vcvars32.bat or vcvars64.bat to setup environment variables before using nmake. The bat files locate under <Visual Studio Path>\VC\bin.

0 Kudos
Reply