06-11-2013 07:56 AM
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
06-11-2013 08:01 AM
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.
06-11-2013 08:27 AM
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:
hope this helps,
Norbert
06-11-2013 08:52 AM - edited 06-11-2013 08:52 AM
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
06-11-2013 09:00 AM
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
06-11-2013 09:26 AM
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.
06-12-2013 12:50 AM
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
06-12-2013 02:10 AM
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