Additional Information
For LabVIEW 2019 SP1 or older using AMD Ryzen processor:
If you are running an executable created with LabVIEW 2019 SP1 or older, there is a bug that will cause this error.
This issue is often related to Intel's Math Kernel Library (MKL), it is called by LabVIEW when using math functions. Parts of MKL, namely the "Basic Linear Algebra Subprograms" (BLAS) and the "Linear Algebra Package" (LAPACK) contain multiple versions of code that are heavily optimized to the varying SSE/AVX functions available on different processor types. This enables MKL to accelerate math operations optimally on each processor. When called, MKL picks the optimal code version for the CPU used in the system.
The bug was fixed in LabVIEW 2020 and newer versions, if you do not want to upgrade to a newer LabVIEW version, follow these steps as a workaround to manually tell MKL which code version to pick:
- Go to Control Panel >> System >> Advanced System Settings >> Advanced >> Environment Variables >> System variables
- In the bottom part of the dialog, click New.
- Put MKL_DEBUG_CPU_TYPE as Variable name.
- For 64-bit AMD processors, use 4 as Variable value (see the Additional Information section below for more information).
- Confirm OK multiple times to close all dialog windows.
Warning: This is a general MKL setting. Manually picking an SSE/AVX version for MKL affects all applications using MKL, not only NI Software.
The MKL environmental variable MKL_DEBUG_CPU_TYPE allows overriding MKL's Processor Dispatch to manually pick a specific SSE instruction set. The available values are:
- For 64-bit processors:
- 4 for AVX (in use by Intel and AMD since 2011)
- 3 for SSE 4.2
- 2 for Supplemental SSE 3 (SSSE 3)
- 1 for SSE 2
- 0 for SSE
- For 32-bit processors:
- 5 for AVX
- 4 for SSE 4.2
- 3 for Supplemental SSE 3
- 2 for SSE 3
- 1 for SSE2
- 0 the SSE
Warning: Picking an SSE/AVX instruction set that the system's CPU does not support will make MKL non-functional. If so, pick a different instruction set.
Note: This setting has a huge performance impact on math-intensive functions that use the BLAS package. Use the maximum available SSE/AVX version.