How to Mass Compile in LabVIEW

Updated Jun 15, 2018

Reported In

Software

  • LabVIEW

Issue Details

What does the mass compile option in LabVIEW do?
How do I perform a mass compile?
How do I update my project, containing multiple VIs, to a new version of LabVIEW. 

Solution

When mass compiling, LabVIEW opens and closes VIs automatically. This does the following:
  • Ensures that all subVIs exist and relinks them to the main VI. It decreases loading time since LabVIEW will not need to search for the VIs.
  • Updates the VIs to the current LabVIEW version.
  • Reports corrupted VIs which can prevent them from loading correctly.

To perform a mass compile:
  • LabVIEW 6.0 and higher: Select Tools>Advanced>Mass Compile.
  • LabVIEW 5.x and earlier: Select File>Mass Compile.
  • Choose the directory of the VIs to compile from Directory to compile.
  • Choose a directory to save the log file from Log Results.
  • Enable the Cache VIs checkbox if you want LabVIEW to keep the VIs in memory so that they do not need to be loaded every time a top-level VI is compiled. (The recommended number of VIs is between 50 and 80.)
  • Click on Mass Compile.

Additional Information

Mass Compile Log
This log is important for the upgrade process because it will report the VIs with problems. Once you have mass compiled the code in both the original and target versions, you can review the logs of the mass compiler in the Status tab and identify load path warnings that resemble the following message: 
the VI expected to be at __ was loaded from __ 
This warning notifies you of a new linkage in the test environment. Review these warnings to ensure that all new linkages are appropriate. You may also receive an error in the following form:
Could not load __ because __ in memory
These are true cross linking errors in which LabVIEW may choose the wrong subVI to link because of subVIs with duplicate names on disk. Click here for more information regarding cross-linking problems. 

Load path warnings are typically included in the log file when the directory structure of the upgrade machine is not identical to that of the development machine. Once the messages regarding moved files have been reviewed and fixed, mass compiling a second time will reveal non-linking problems with VIs. You should look for the following string in the mass compile reports to identify insane objects that exist in your application:
Insane Object

The log also indicates if these insane objects were fixed by the mass-compile routine. Also look for these characters to find bad VIs:
###

Although rare, the mass compile might crash when working with unstable VIs. It is unlikely that you will experience a mass-compile crash unless a particular VI is in a bad state that would also crash LabVIEW when loaded and saved. If the mass compile crashes, the log file will indicate which file caused the crash. Locate and open these files to ensure they are not corrupted, and then mass compile again. It may be necessary to remove this file from the folder if the mass compile will not successfully complete in a directory due to the bad file. 

Mass Compile Log Viewer
This tool allows you to quickly make sense of mass compile logs. It provides a user-friendly interface to provide detailed information on each log entry, and helps address some of the errors. You can download the tool from here.

Force Recompile
If you would like to Force Recompile the binary of the VIs in memory, press <Ctrl-Shift> and the run arrow of the main VI and then save the VI. While it is typical for nothing to happen after binary recompiling the VIs in memory, this can frequently fix/isolate many errors.

WAS THIS ARTICLE HELPFUL?

Not Helpful