LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building exe file fails (not enough memory) in LV 2011

Hello,

 

I have a project with about 900 VIs. I'm using Win7 32 Bit with 4 GB RAM (a 32 Bit OS can address about 3,3 GB) with LabVIEW 2011 SP1.

When trying to build an executable, I allways get the error "Not enough memory to complete the operation" (or something like that).

 

My RAM is full at this time.

 

Without building the exe file I can start the project without any problems and with only half RAM usage.

 

What can I do to generate the exe file with my system?

Are there any options I can set, that the application builder will not use so much memory?

 

Regards

Matthias

0 Kudos
Message 1 of 8
(4,154 Views)

One thing: I tried this tip here: http://zone.ni.com/reference/en-XX/help/371361G-01/lvhowto/enable_lrg_ad_aware/ (Extending Virtual Memory Usage for 32-bit Windows)

But it still won't work.

0 Kudos
Message 2 of 8
(4,152 Views)

Matthias,

 

first off, 32bit OSes can manage 2GB per process by default, 3GB if the boot option for "large-address-awareness" is set. I would Win7 expect to have this option set right from installation, so i am not surprised that you haven't seen any difference when trying to play around this option.

 

What you can do to improve memory usage:

  • Force compile all sources for the EXE before starting the build process. Use the "Mass Compile" tool for this.
  • Create a source distribution of all VIs you created to a new folder. Select the option to remove all block diagrams for this. Build the EXE from the new files.
  • Clear the compiled object cache before starting the build process.

 

hope this helps,

Norbert

 

 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 8
(4,139 Views)

Hello Nobert,

 

thank you for your reply.

 

"Force compile all sources for the EXE before starting the build process. Use the "Mass Compile" tool for this."

I tried it (Ctrl + Shift + Run), but the memory still gets full

 

"Create a source distribution of all VIs you created to a new folder. Select the option to remove all block diagrams for this. Build the EXE from the new files."

When trying to build the source distribution the memory gets full and the old error message is shown.

 

"Clear the compiled object cache before starting the build process."

That doesn't change anything, too.

 

Regards

Matthias

0 Kudos
Message 4 of 8
(4,128 Views)

Matthias,

 

how much memory do those 900+VIs take on disk????

 

Ctrl+Run Button is a force compile for a single VI. With advanced architectures, not all VIs are called statically by the toplevel VI so they wont get re-compiled. Please try using the Mass Compile tool for the whole project. If there are errors during this, you cannot expect the EXE build process to be successfull.

 

If the source distribution also plows the memory, you want to split the distribution into several packages. You have to re-create a new project and build script for the collection of packages to build the EXE.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 8
(4,122 Views)

I had that problem several times in a large project. I did a mass compile, saved all the VIs, then closed out of the project and LabVIEW. I opened up LabVIEW again and loaded only the main VI. I performed a build and it worked successfully.

 

When you do a CTRL+SHIFT+RUN, it forces a mass compile and actually uses up more RAM. So if your project is huge, I wouldn't do a mass compile right before building an executable. Also, make sure that you don't have any broken subVIs.

0 Kudos
Message 6 of 8
(4,113 Views)

Hello

 

"how much memory do those 900+VIs take on disk????"

53 MB

 

"Ctrl+Run Button is a force compile for a single VI"

I used Ctrl + Shift + Run

I also tried the mass compilation tool itself and it doesn't change anything.

 

"If the source distribution also plows the memory, you want to split the distribution into several packages"

That sounds very coimplicated ...

Did I understand it correctly? I have to create several source distributions (option "directory" and not "llb"). And in my build specification for my exe file, I can chose these source distributions?

Do I need to prepare my VIs or can I directly create the source distribution with the option "remove block diagram"?

 

"I had that problem several times in a large project. I did a mass compile, saved all the VIs, then closed out of the project and LabVIEW. I opened up LabVIEW again and loaded only the main VI. I performed a build and it worked successfully."

I tried it and a still get the same error.

 

My customer need to get the update because it a critical one. And I can't build it.

 

An update to Win7 64 bit on my machine is also not a solution because all our customers use Win7 32 bit and the 64 bit executable won't run on a 32 bit operating system.

 

Regards

Matthias

0 Kudos
Message 7 of 8
(4,089 Views)

Matthias,

 

regarding the source distributions:

Yes, you understood correctly, that you have to create several distributions with the option "directory". When performing the distribution, you have to select the option to remove the block diagram for all VIs (in each distribution).

Once finished, you should have a new folder with all components for your EXE with less than 53MB. Create a new project for this and add all files from the new folder. I recommend this as a copied project might result in "cross-linking" to the original sources.

 

No, if you done everything fine in the past, there is nothing you have to prepare for the distributions (except setting them up and running them).

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 8 of 8
(4,081 Views)