<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Crash in Multi-Process Environment When Using MKL-Linked Dynamic Library  with Frequent USB in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Crash-in-Multi-Process-Environment-When-Using-MKL-Linked-Dynamic/m-p/1731087#M37487</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Environment:&lt;/STRONG&gt; Windows 10/11 Visual Studio 2017 C++ Intel MKL Library (version 2018.3.210)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem Description:&lt;/STRONG&gt; We have a dynamic library (esp.dll) that performs Fourier transforms (FFT) and other matrix operations using Intel MKL.&lt;/P&gt;&lt;P&gt;Initially, we observed crashes during FFT computations when frequently hot-plugging USB drives while calling esp.dll.&lt;/P&gt;&lt;P&gt;The error pointed to mkl_avx2_unload_dll.&lt;/P&gt;&lt;P&gt;My colleague suggested explicitly releasing MKL-related DLLs via the following code:&lt;/P&gt;&lt;P&gt;vector libs = { "mkl_core", "libiomp5md", "mkl_def", "mkl_intel_thread", "mkl_avx2.dll", "mkl_vml_avx2.dll" };&lt;/P&gt;&lt;P&gt;for (int index = 0; index &amp;lt; libs.size(); index++)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;auto libHandle = GetModuleHandle(libs[index].c_str());&lt;/P&gt;&lt;P&gt;if (libHandle)&lt;/P&gt;&lt;P&gt;{ BOOL rev = FreeLibrary(libHandle); libHandle = NULL; }&lt;/P&gt;&lt;P&gt;} This resolved the USB-related crashes.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;New Issue:&lt;/STRONG&gt; However, after implementing this fix, crashes now occur when two processes simultaneously call esp.dll. The error manifests during FFT operations, similar to the previous case.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Dec 2025 12:43:13 GMT</pubDate>
    <dc:creator>Se5</dc:creator>
    <dc:date>2025-12-22T12:43:13Z</dc:date>
    <item>
      <title>Crash in Multi-Process Environment When Using MKL-Linked Dynamic Library  with Frequent USB</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Crash-in-Multi-Process-Environment-When-Using-MKL-Linked-Dynamic/m-p/1731087#M37487</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Environment:&lt;/STRONG&gt; Windows 10/11 Visual Studio 2017 C++ Intel MKL Library (version 2018.3.210)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem Description:&lt;/STRONG&gt; We have a dynamic library (esp.dll) that performs Fourier transforms (FFT) and other matrix operations using Intel MKL.&lt;/P&gt;&lt;P&gt;Initially, we observed crashes during FFT computations when frequently hot-plugging USB drives while calling esp.dll.&lt;/P&gt;&lt;P&gt;The error pointed to mkl_avx2_unload_dll.&lt;/P&gt;&lt;P&gt;My colleague suggested explicitly releasing MKL-related DLLs via the following code:&lt;/P&gt;&lt;P&gt;vector libs = { "mkl_core", "libiomp5md", "mkl_def", "mkl_intel_thread", "mkl_avx2.dll", "mkl_vml_avx2.dll" };&lt;/P&gt;&lt;P&gt;for (int index = 0; index &amp;lt; libs.size(); index++)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;auto libHandle = GetModuleHandle(libs[index].c_str());&lt;/P&gt;&lt;P&gt;if (libHandle)&lt;/P&gt;&lt;P&gt;{ BOOL rev = FreeLibrary(libHandle); libHandle = NULL; }&lt;/P&gt;&lt;P&gt;} This resolved the USB-related crashes.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;New Issue:&lt;/STRONG&gt; However, after implementing this fix, crashes now occur when two processes simultaneously call esp.dll. The error manifests during FFT operations, similar to the previous case.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Dec 2025 12:43:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Crash-in-Multi-Process-Environment-When-Using-MKL-Linked-Dynamic/m-p/1731087#M37487</guid>
      <dc:creator>Se5</dc:creator>
      <dc:date>2025-12-22T12:43:13Z</dc:date>
    </item>
  </channel>
</rss>

