LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

On second run, memory is full

I try to read a binary integer data from a file into an 2D-array of doubles. I have a windows XP machine with 2GB, data are about 50MB. Running the first time, it works, Labview 8.2.1 reads the data into the array. But running the vi a second time, it tells me that MEMORY IS FULL. Is there a way to free the used memory of a vi before starting?

And why is Labview eating up that much of memory? 142 colums with 184080 rows with a 8 byte double for each gives me about 210 MB of memory, so having 2 GB should be OK, even for a second run.

Switching to my Mac with 5GB and Labview 8.0 it worked fine, but using larger files, 200 MB of binary integers, results in the same effect, got the MEMORY IS FULL message on the second run.


Any help appreciated
Thanks
Berndt Wischnewski
0 Kudos
Message 1 of 14
(4,612 Views)
Berndt,

could you please post the VI which loads the data?
Can you make sure, that no copies from the array are created? Do you work with "build array"? Do you store the array in shift-registers?

just some thoughts,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 14
(4,605 Views)
Do you have any uninitialized shift registers which you are building array on?  Usually, any issues with something not working right on the 2nd and following runs that worked right on the 1st run is related to uninitialized shift registers.  On the following runs, they still have their value from the end of the last time the VI is run.  So you may be doubling the size of that register and quickly running out of memory. 
0 Kudos
Message 3 of 14
(4,601 Views)

Is there a chart invloved?

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 14
(4,595 Views)
What's the prupose of having that much data in memory anyway. Data analysis can also be done on smaller pieces at a time and a user doesn't want to see all data points at once (show a decimated dataset on the GUI).
Regards,
André (CLA, CLED)
0 Kudos
Message 5 of 14
(4,591 Views)
Hi,

no shift register, no charts involved, and here comes, hopefully the vi (its the first time I post to this board):
Download All
0 Kudos
Message 6 of 14
(4,578 Views)
What is the difference between the two files you posted?
 
One possible problem causing a loss of memory is there are a few places with the red coercion dots.  You specifiy an I16 for the datatype to be read, but ultimately put it into an indicator with a double precision representation.  Make the array indicator an I16 as well.
 
There are a few other spots with unnecessary coercions, but the ones involving the array is what would hurt the most.
 
This VI only does one thing, read in the data to an array.  (Is it necessary to reshape the array?)  What do you do with this array once you have it in? 
0 Kudos
Message 7 of 14
(4,561 Views)
Posting the same file two times was my stupidity, sorry for annoying you. The data in my file are binary 16 bit integers, output of a EEG machine. Once the data are read in, I want to start my calculation, so they are ending as doubles, well maybe single float would be also OK. But this gives me no explanation why Labview behaves this way.
0 Kudos
Message 8 of 14
(4,550 Views)

Let me clarify.

  • Running "readBinary.vi" alone by itself causes the memory problem?
  • You are not calling it form somewhere else when testing?
0 Kudos
Message 9 of 14
(4,509 Views)
Yes, just running windows xp and Labview with this simple vi gives me memory problems. And its not a problem of this machine, I tested it on another one and also on a mac. I can post the 50MB datafile to the list, but I think your admin will hate me, when I do this.

There are two strange things, first having 50MB binary data should coerce to 200MB for doubles, which is quite a lot, but should be no problem for a computer with 2GB, running nothing but windows and Labview. And the second strange is, why does it run one time, and on the second start, it tells me that memory is full.

Is there a switch somewhere, where you can tell Labwiew to free memory used by the vi?

Bye
Berndt
0 Kudos
Message 10 of 14
(4,502 Views)