- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am encountering a problem with the Akima spline that causes my code to seg. fault.
Debugging the code with optimisations and debug symbols, I can repeat the problem. It occurs when dfdInterpolate1D is called with a value that is ~7e-18 within the upper boundary of the spline.
I realise that this value at double precision is near as dammit on the upper boundary, and it is a relatively rare occurrence in my code but it sadly it occasionally occurs.
Is there some underlying floating-point tolerance within the interpolation routine that might be causing this issue?
At the moment I can put in some boundary checking to catch values within tolerance to work around the problem, but ideally I would like to avoid this as it will slow down the code!
Thanks,
Ewan
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ewan,
Thank you for your question.
Difference as 7e-18 is lower than epsilon of the double precision floating point format. Wrong code execution (e.g. segmentation fault in your case) is highly depended on the input data here.
Could you provide a code sample to reproduce this issue?
Or could you provide arrays of function values, breakpoints, spline’s coefficients and interpolation sites? This information would be useful in terms of problem investigation.
Best regards,
Pavel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pavel,
Let me see what I can do, will need to undo the boundary checking code to get the case to repeat.
Ewan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ewan, do you use MKL 2017, right? Could you check the problem with 2019u5 which we released the last week!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ewan,
Thank you for the provided data.
After the quick analysis I have found that the first spline’s coefficient looks strange:
i,"value"
0,34.183189094319935
1
2,-272819.29691743013
…
Looks like it’s not provided. Could you please check it in your data?
Also could you clarify the next question to align our assumptions: which operation system and compiler do you use?
Best regards,
Pavel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ewan,
thank you for the additional information.
I have created a code sample with the provided data. But I couldn’t reproduce a segmentation fault. Interpolation works correctly.
The last questions that I have (to completely align our assumptions):
- Which Intel MKL version do you use? You can check it with mkl_get_version function (https://software.intel.com/en-us/mkl-developer-reference-c-mkl-get-version).
- Which partition structure (xhint) have you set (is it DF_NON_UNIFORM_PARTITION)?
- What is the maximal derivative order to be computed at the interpolation site (ndorder)?
Hope it helps to reproduce your problem.
Best regards,
Pavel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dyakov, Pavel (Intel) wrote:1. Yikes, it's actually an older version than I expected - v 11.0.5 2. Yes, I use DF_NON_UNIFORM_PARTITION. 3. ndorder = 3 when I'm using Akima, with dorder = {1,0,1}. I believe that means the 2nd-derivative is the highest order computed.. Thanks, Ewan
- Which Intel MKL version do you use? You can check it with mkl_get_version function (https://software.intel.com/en-us/mkl-developer-reference-c-mkl-get-version).
- Which partition structure (xhint) have you set (is it DF_NON_UNIFORM_PARTITION)?
- What is the maximal derivative order to be computed at the interpolation site (ndorder)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ewan,
Case ndorder = 3 means that the 2nd is the highest order of derivative to be compute – you are right here.
Well, I have aligned all our assumptions and found that interpolation works incorrectly at the provided site (I haven’t received segmentation fault in my code sample, but interpolation results have been filled with 0).
But this problem is not reproduced with the latest available Intel MKL 2019 U5 – interpolation works correctly with the provided data.
Actually several impotent updates and fixes have been made in Data Fitting functionality between Intel MKL 11.0.5 and Intel MKL 2019 U5 releases.
So that I suggest you to update your Intel MKL to the Intel MKL 2019 U5 version.
Feel free to ask more.
Best regards,
Pavel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I independently checked the case with 2018 u4 and the latest 2019 u5 and don't see the problem on my side also. You may quickly test this case by installing MKL 2019 u5 on your local system. Here you may take the latest version for free.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
forget to add the link to the downloading page: https://software.intel.com/en-us/performance-libraries
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page