- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

The code will run fine for a few timesteps, but eventually, the outputs become
unstable and the code stops running.
Everything works fine when I run it with the IMSL library.

Everything I have read on the MKL vs IMSL threads state that the MKL has higher
performance. Is there a reason they are less stable? Are there any
steps I can try to get the code to run stably with the MKL routines?

Link Copied

7 Replies

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

I don't think so. It seems to me like "user error". This is an unknown problem for current version of MKL. Can you give us the example which we can check and investigate?

an also -

MKL Version you are using.

Linking line, CPU type ...

--Gennady
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

In a time-dependent calculation, an error in one step is fed into the next and can, therefore, grow. Such growth can be caused by instability, but it can also be caused by errors in forming the banded matrix or mistakes in the calling sequence.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

In regards to the first question, I am using an Intel 32 bit CPU, MKL version 10.2 update 3, and the linking line is "mkl_solver_sequential.lib mkl_intel_c.lib mkl_sequential.lib mkl_core.lib"

I will start by comparing the differences between the IMSL and MKL after the first time step.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

What does time step stands for? Do you mean that is the size of task you are are solving?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

*If the time step is slightly larger, then there are large differences*-- that's not as it should be. If possible, make up a test case with coarse spatial discretization (to make the matrix size small) and a reasonably large time step, print out the banded matrix, post the matrix here and check the solution by hand (or using a tool such as Matlab).

In addition, it would be beneficial to compare the change in the dependent variable. In other words, instead of starting with the initial condition u_0 at t = 0, and solving for u_1 at t = dt, and comparing u_1,IMSL and u_1,MKL, solve for du = u_1 - u_0 and compare du_IMSL with du_MKL. That way, you will not mask out large

*relative*errors by adding the vector d_u with small magnitudes to the vector u_0 with large magnitudes.

Until this problem is resolved, there is no point in letting the calculations go beyond the first time step.

Gennady: Samzmse is probably solving a time-dependent physical problem, such as diffusion or evolution. After discretizing time and space, the differential equations are reduced to a system of algebraic equations. These equations are solved for t = dt, 2 dt, 3 dt, ...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Thank you so much for all of your helpful comments. Gennady was correct in his first post- it was a user error (mine).

Mecej4 was correct- I was solving a time dependent heat transfer problem. The code had a modified Newton Raphson scheme where the matrix on the left hand side was only updated a certain number of times. For some reason, which I do still not quite fully understand, when I changed the corresponding lines of code from the IMSL routines to the MKL routines, it was not calling factorization routine, and this was what was causing the errors. Using mecej4's suggestion, I was able to track it down to the program not factorizing the matrix in certain cases, and have modified the code to make sure that it is factorized.

So thank you both for your help. I wouldn't have been able to find this error without your help! And you were both right, it was not an "MKL vs IMSL" issue.

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page