Error "lvanlys.dll: Resource Not Found" When Running LabVIEW Executable

Updated Apr 12, 2022

Reported In

Software

  • LabVIEW
  • LabVIEW Run-Time Engine

Issue Details

I get the following error when starting my stand-alone application:
LabVIEW: Resource not found. lvanlys.dll
 

Solution

Note: If you are using an installer, verify the correct Run-Time Engine version is selected in the Additional Installer section of your Installer Properties.
  • Make sure you have installed the full version of LabVIEW Run-Time Engine, not the Web Browser Plug-in (formerly known as Minimum LabVIEW Run-Time Engine). 
  • Check if your computer has an 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:
  1. Go to Control Panel >> System >> Advanced System Settings >> Advanced >> Environment Variables >> System variables
  2. In the bottom part of the dialog, click New.
  3. Put MKL_DEBUG_CPU_TYPE as Variable name.
  4. For 64-bit AMD processors, use 4 as Variable value (see the Additional Information section below for more information).
  5. 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.
  • If the correct Run-Time Engine is already installed, force reinstall it.
  • Try performing a mass compile on your code, as it will ensure that the DLL exists and relinks it to the VI.
  • If you have access to the application source code, try rebuilding the application or copying the executable files from a known working source. 
  • Reinstall LabVIEW on the development machine to assure there are no corrupted files, and mass compile the project.

Additional Information

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.