- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to test my custom handler of fatal errors, but I can't figure out to generate a fatal error :(
I use mkl_set_exit_handler(...) to register my custom handler, but I don't know how to test this. I 'm using the C interface, see https://software.intel.com/en-us/node/522125. Any suggestions are welcome. Generating segmentation faults by out-of-memory-bounds memory accesses (not allocating enough memory) does not seem to trigger the custom handler.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Gert-Jan,
MKL Reference Manual describes what a fatal error may be. "For example, a fatal error occurs when Intel MKL cannot load a dynamic library...". If you link your application dynamically with MKL and run it with dynamic libraries inaccessible you will get a call to exit handler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dmitry, thanks for your reply. I can create fatal errors when the dynamic libraries are not available.
However, I'm using a custom shared library (https://software.intel.com/en-us/node/528533) which groups all the dynamic libraries in a single file. I'm also using one specific processor, so the library will always match the processor. Does this mean that I can never get this kind of fatal error, which are handled by the function registered with mkl_set_exit_handler(...)? Or are there other ways to trigger the function set by mkl_set_exit_handler(...)?
Second question, is there a way to catch the printed error message like "Intel MKL FATAL ERROR: Cannot load libmkl_avx2.so or libmkl_def.so."?

Reply
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