Community
cancel
Showing results for
Did you mean:
Beginner
34 Views

## TR solver five times slower in windows 10 than in windows 7

I use the latest version of MKL(mkl 2017.0.109), and tested the TR(trust-region) solver (with or without constraints) with the same codes in both windows 7 (sp1) and windows 10 (enterprise). I found the solver is five times slower in windows 10. Anyone has any idea? Thank you.

6 Replies
Moderator
34 Views

that's very unexpected result. what size the problem you solve?

Beginner
34 Views

I just used the MKL example "nonlinear least square problem with boundary constraints" and looped 1000 times.

The running time in windows 10 is 3591ms, and 572ms in windows 7. The code snippet is listed below,

int main()
{
extern int Calc();

int n = 1000;

clock_t t1, t2;

t1 = clock(); // system clock
for (int i = 0; i < n; ++i)
Calc(); // invoke the MKL example

t2 = clock();
float diff = t2 - t1;
cout << "elapsed time " << diff << endl;

cin.get();

return 1;

}

The running time difference is pretty consistent and easy to reproduce. Thanks a lot.

Moderator
34 Views

ok, i see what you did.

1. This example contains different declaration, initialization, output and computation stages. The computation intensive part of this solution is dtrnlspbc_solve() routine.  Could you check this part?

2. And using dsecnd() mkl's routine would give you more consistent results. see into RF for more details how to call this function.

Beginner
34 Views

OK. I inserted desecnd() function to calculate the elapsed time of each loop for the same MKL example. The part of codes is listed here. The lower left picture is from windows 10, and the right from windows 7. The running time difference for the core computation routine is significant, and it is about 6-7 times.

Moderator
34 Views

Could you add mk_get_version routine to understand the mkl branch of the code has been called on these OSs.

Beginner
34 Views

Yes. I used the latest version of MKL. The detailed version info shows in the picture.