Community
cancel
Showing results for 
Search instead for 
Did you mean: 
aurora
Beginner
52 Views

Interrupt a thread with a MKL function

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...), but how can I do to stop a thread executing MKL code? Any ideas? 

Thanks in advance!

0 Kudos
2 Replies
Chao_Y_Intel
Employee
52 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-B... 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
aurora
Beginner
52 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.

Reply