01-02-2011 04:20 PM
Dear all,
I have >70MB data size file, but it always reported "out of memory" when I use "read spread sheet.vi" to read this data.
do you know how to solve this problem?
thank you
jack
01-02-2011 05:32 PM
How big is ">70MB"?
What do you intend to do with the data in your program once the file is read? Is your code optimized to operate in-place as much as possible? Are you avoiding all uneceessary datacopies in memory?
Arrays need to be contiguous in memory, so it is poissible that your memory is too fragmented and you don't have enough contiguous memory to complete the operation.
What datatype are you trying to read? String, DBL, 1D, 2D, etc.
Have you tried reading using low-level functions?
Can you attach your program so we get a better idea what you are trying to do?
01-02-2011
05:47 PM
- last edited on
01-04-2011
03:10 PM
by
Laura F.
here is my situation
>70 MB means any size large than 70MB ,e.g., 77MB,
my data type is 2D array, DBL,
part of my code is attached, it is just simple reading array by "read spreadsheet vi".
do you have any way to deal with fragmented menmory? what kind of low-level functions can be used to solve this problem?
thanks
Jack
01-02-2011 06:22 PM
Well, that does not really show much. Why are you using "array subset" followed by "index array"? A simple index array on the 2D array would do the same.
You can open "read from spreadsheet file" and inspect the code. You might be able to avoid a data copy by eliminating the subVI and placing a simplified version of the code flat on the diagram.
What is the structure of the file? How big is the resulting 2D array?
01-02-2011 06:31 PM
Well, not the problem in array subste, the error is in the "read spread sheet.vi" in debug mode.
the structure of the file is 2D array, 8 columns, and many many rows.
01-02-2011 06:51 PM - edited 01-02-2011 06:52 PM
Have you tried low-level functions as suggested?
IgG_Kylin wrote:the structure of the file is 2D array, 8 columns, and many many rows.
Why can't you give an actual number?? How many characters are typically in a row? I am just trying to figure out how to translate file size into array size. Since the file is formatted, that ratio depends on the format.
It is typically not recommended to use formatted files for such large datasets. A binary file would be much more efficient for both reading and writing. Where does the file come from? Did you write it yourself with another LabVIEW program, for example?
Also, what is your OS (version, 32 vs 64 bit, etc.). How much RAM do you have? How many other programs are open?
01-02-2011 07:20 PM
Hi, altenbach,
Thank you so much for you reply.
I haven't tried low level functions yet.
Regarding the actual number, since each file size varies, I guess it has at least 2x10^6 rows. Each row has DBL 8 elements.
and my OS system is win7 32bit, 4GB RAM.
I also traced into the read spred sheet.vi, and the error is in the VI pointed by the red arrow.
01-02-2011 08:04 PM - edited 01-02-2011 08:09 PM
What version of LabVIEW are you using?
01-02-2011 08:05 PM
I'm using labview 2009
01-02-2011 11:56 PM
IgG_Kylin wrote:I also traced into the read spred sheet.vi, and the error is in the VI pointed by the red arrow.
That does not look right. I assume you read the entire file, so the case shown does not even execute. You would execute case "0", which has basically no code. Please check once more.