- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Environment: Windows 10/11 Visual Studio 2017 C++ Intel MKL Library (version 2018.3.210)
Problem Description: We have a dynamic library (esp.dll) that performs Fourier transforms (FFT) and other matrix operations using Intel MKL.
Initially, we observed crashes during FFT computations when frequently hot-plugging USB drives while calling esp.dll.
The error pointed to mkl_avx2_unload_dll.
My colleague suggested explicitly releasing MKL-related DLLs via the following code:
vector libs = { "mkl_core", "libiomp5md", "mkl_def", "mkl_intel_thread", "mkl_avx2.dll", "mkl_vml_avx2.dll" };
for (int index = 0; index < libs.size(); index++)
{
auto libHandle = GetModuleHandle(libs[index].c_str());
if (libHandle)
{ BOOL rev = FreeLibrary(libHandle); libHandle = NULL; }
} This resolved the USB-related crashes.
New Issue: 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.
Link Copied
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page