Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
6590 Discussions

Interrupt a thread with a MKL function

aurora
Beginner
125 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...), 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
125 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
125 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