Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Interrupt a thread with a MKL function

aurora
Beginner
254 Views

Hi,

How can I interrupt a thread that is performing a MKL subroutine? My threads are created with boost::thread, and normally I use interruptions to stop my threads (nhttp://www.boost.org/doc/libs/1_41_0/doc/html/thread/thread_management.html#thread.thread_management.interruption), but how can I do to stop a thread executing MKL code? Any ideas? 

Thanks in advance!

0 Kudos
2 Replies
Chao_Y_Intel
Moderator
254 Views
Hello, Just check that boost document, it seems that the boost threading can interrupt at some interruption points. Which functions are you using the now? A few of MKL LAPACK functions support the progress callback functions: http://software.intel.com/sites/products/documentation/hpc/mkl/mklman/GUID-E982C8B0-E96D-414B-B263-BABF455963F7.htm#GUID-E982C8B0-E96D-414B-B263-BABF455963F7 For these functions, you may define your callback function, and some interruption points there. so it could be interrupted. But gerneranly for other MKL functions, it may not work. Thanks, Chao
0 Kudos
aurora
Beginner
254 Views

Which are these functions? I cant find a using example of mkl_progress with LAPACK. Anyway I would need this for BLAS subroutines also like dgemm...

Another question is: Can be a mkl function in a thread forced to terminate without messing the internal state of the mkl? I mean leaks or critical zones with semaphores that could block another mkl thread.

0 Kudos
Reply