python – PySimpleGUI : Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.1.1.dll

After compiling my python program into .exe file using PySimpleGUI, I got error “Cannot load mkl_intel_thread.1.dll”

enter image description here

Figure below are all the packages in my virtual environtment
enter image description here
enter image description here

I’ve tried many possible answer that I could find, but the issue still persist.

Any help would be appreciated.
Thank you for your assistance.

Performance Optimization – Does the Following Change in MKL Environment Variables Increase Mathematica Speed ​​on AMD CPUs?

I personally do not have an AMD CPU, but since they are literally getting pretty hot these days, I considered whether the following update (as suggested here: https://www.reddit.com/r/matlab/comments/dxn38s/howto_force_matlab_to_use_a_fast_codepath_on_amd /)) would bypass the Intel CPU check. This may allow the AVX2 instruction set to be used for AMD CPUs. Anyone with an AMD CPU can check whether the update works!

Create and save a batch file (.bat) as shown below (this only applies to Windows, check the link above for Linux). Make sure that the Mathematica folder is in your environment variables.

@echo off
set MKL_DEBUG_CPU_TYPE = 5
Mathematica.exe

Run the batch file to start Mathematica and run code based on MKL (many Mathematica functions for numerics are based on it). Now compare the execution speed of the code by starting Mathematica normally (i.e. without a batch file).

Do you notice any differences?

Multicore – MKL performance is lost when many independent instances are running

I want to use 40 physical cores in my 2 * Xeon gold 6230 system with 64GB (2 * 32GB) installed memory. Operating system is Ubuntu 18.04.

The task is to solve as many eigenvalues ​​of random matrices. For small matrices, in my test at 300×300, the performance has not suffered any significant loss due to the increase of independent instances of selfsolver workers. For example, ten workers who solve 1000 matrices (a total of 1E + 4 matrices) need twenty workers, each solving 1000 matrices (2E + 4 total), and forty workers, each solving 1000 matrices (4E + 4 matrices in total), about the same real-time finish.

However, when the matrix is ​​large (2000 x 2000), MKL performance drops significantly as more employees are employed. MKL_NUM_THREADS = 1 in all tests.

  • 1 worker, 10 matrices each: 1m15s to finish (CPU 100%)
  • 10 workers, 10 matrices each: 2m23s to finish (CPU 1000%)
  • 20 workers, 10 matrices each: 5m34s to finish (CPU 2000%)

Twenty workers achieve more than twice the performance of ten workers.

The tests are performed in Mathematica 10, Matlab 2019b, Python 3.7 and eigen3 (Link to Intel Mkl). The memory usage is below 12%.
Test code is simple, for example, the Mathematica code is:

mat=Table(RandomReal(),{2000},{2000});
ParallelDo(Do(Eigenvalues(mat),{10}),{i,1,1})//AbsoluteTiming
ParallelDo(Do(Eigenvalues(mat),{10}),{i,1,10})//AbsoluteTiming
ParallelDo(Do(Eigenvalues(mat),{10}),{i,1,20})//AbsoluteTiming

Any idea to improve mkl's performance or determine hardware bottleneck is welcome.

python – Sympy library: I have the Intel MKL FATAL ERROR error: The file mkl_intel_thread.dll can not be loaded

I'm really frustrated and can not find a solution, see, I'm trying to use the Python sympy library, but trying to write code so that the graph of a function returns the following error: Intel MKL FATAL ERROR: Unable to load You mkl_intel_thread.dll.

What I do is the following:

from sympy import *
x,y,z = symbols("x y z")
print(plot(cos(x)))

After making this code so easy that the graph of cos (x) is displayed
I get the following error in the output:

INTEL MKL ERROR: %1 no es una aplicaci¾n Win32 vßlida. mkl_intel_thread.dll.
Intel MKL FATAL ERROR: Cannot load mkl_intel_thread.dll.

Also attached that this error occurs only at the time of the graphical representation, everything else works flawlessly. The only thing I can think of is that the error is due to the processor, because my processor is AMD and the DLL my code editor is trying to do is refer to the cores of an Intel processor.