- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ben, we are analyzing your request and let you know the update and/or ask additional questions. Thanks, Andrey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ben, Could you please give us example of this case to check the problem on our side?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In attempting to isolate the issue, I've learned that this issue does not have to do with mixing BLAS, LAPACK, and VSL as I originally thought. The issue is that certain errors call xerbla and others call the VML callback, if set. A simple modification of the MKL example code found in callback.c illustrates this.
#include <stdio.h> #include "mkl_vml.h" int UserCallBack(DefVmlErrorContext* ); int main() { VMLErrorCallBack errcb; double dbA = 0.0; double dbR; printf("Set/Get/Clear CallBack example program\n\n"); errcb=vmlGetErrorCallBack(); printf("Initial adress of CallBack function: 0x%p\n",errcb); errcb=UserCallBack; vmlSetErrorCallBack(errcb); errcb=vmlGetErrorCallBack(); printf("Adress of CallBack function after using Set CallBack: 0x%p\n",errcb); printf("Test user callback on vdLn function\n"); vdLn(1, &dbA, &dbR); #if 1 // TEST vdLn(1, &dbA, 0); #endif vmlClearErrorCallBack(); errcb=vmlGetErrorCallBack(); printf("Adress of CallBack function after using Clear CallBack: 0x%p\n",errcb); return 0; } int UserCallBack(DefVmlErrorContext* pdefVmlErrorContext) { printf("In function %s argument a[%d]=%f is wrong.\n", pdefVmlErrorContext->cFuncName, pdefVmlErrorContext->iIndex, pdefVmlErrorContext->dbA1); return 0; }
The resulting output is:
Set/Get/Clear CallBack example program Initial adress of CallBack function: 0x00000000 Adress of CallBack function after using Set CallBack: 0x00FD12D0 Test user callback on vdLn function In function vdLn argument a[0]=0.000000 is wrong. Intel MKL ERROR: Parameter 3 was incorrect on entry to vdLn. Adress of CallBack function after using Clear CallBack: 0x00000000
Note that the added code (see // TEST) results in a call to xerbla, not UserCallBack. If I set an error callback, I expect it to be called on all errors. I consider this a bug, not a feature.
Thanks,
Ben
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ben, as I can see - main question addressed to VML error handlers behavior. I will try to give some explanations.
VML errors can be divided for 2 classes: bad arguments and computation errors (like divide by zero).
VML error handlers behave differently in these cases.
1) bad args:
xerbla called
vml error status code set (can be read via vmlGetErrStatus)
vml csall back isn`t called
2) computation error
xerbla isn`t called
vml error status code set (can be read via vmlGetErrStatus)
vml csall back isn`t called if vml mode set to proper value (as in your example)
so, you can see that vml call back can`t be overridden by xerbla - these two functions complete independent
note. xerbla also can be redefined as vml call back function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would argue that any time a VML error status is set, the VML error callback should be called. An error is an error, regardless of the type of error. How do I submit a formal change request? Thanks, Ben
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can submit the formal ticket through Intel® Premier Support. But I am not sure this request would be implemented. Andrey provided the comprehensive answer of VML error handlers behavior.
- 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
Ben, I have escalated your request to the internal database for the future development. I will keep update when the issue would be implemented or rejected be VML team.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page