LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

memory is full

I want to have a 16*463360 array with SGL, but it always says the memory is full, what should I do?

0 Kudos
Message 1 of 8
(1,897 Views)

@ericluo wrote:

I want to have a 16*463360 array with SGL, but it always says the memory is full, what should I do?


The number of bytes needed to fit that array is 29,655,040. You would need 64 bit LabVIEW at the minimum and a decent amount of RAM.

 

The other way to deal with an array of that size is to process in chunks of smaller size.

 

Don't have LabVIEW at the moment so can't look at your VI.

 

mcuff

0 Kudos
Message 2 of 8
(1,891 Views)

Your test VI runs fine for me.  What else do you have open and/or running?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 8
(1,888 Views)

@mcduff wrote:

@ericluo wrote:

I want to have a 16*463360 array with SGL, but it always says the memory is full, what should I do?


The number of bytes needed to fit that array is 29,655,040. You would need 64 bit LabVIEW at the minimum and a decent amount of RAM.


That is only 28.3MB (divide by 1024^2).  No need to go to 64-bit for that.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 8
(1,884 Views)

@crossrulz wrote:

@mcduff wrote:

@ericluo wrote:

I want to have a 16*463360 array with SGL, but it always says the memory is full, what should I do?


The number of bytes needed to fit that array is 29,655,040. You would need 64 bit LabVIEW at the minimum and a decent amount of RAM.


That is only 28.3MB (divide by 1024^2).  No need to go to 64-bit for that.


Thanks. That's what happens when I reply before my morning coffee.

 

mcduff

 

............................................________........................
....................................,.-‘”...................``~.,..................
.............................,.-”...................................“-.,............
.........................,/...............................................”:,........
.....................,?......................................................\,.....
.................../...........................................................,}....
................./......................................................,:`^`..}....
.............../...................................................,:”........./.....
..............?.....__.........................................:`.........../.....
............./__.(.....“~-,_..............................,:`........../........
.........../(_....”~,_........“~,_....................,:`........_/...........
..........{.._$;_......”=,_.......“-,_.......,.-~-,},.~”;/....}...........
...........((.....*~_.......”=-._......“;,,./`..../”............../............
...,,,___.\`~,......“~.,....................`.....}............../.............
............(....`=-,,.......`........................(......;_,,-”...............
............/.`~,......`-...............................\....../\...................
.............\`~.*-,.....................................|,./.....\,__...........
,,_..........}.>-._\...................................|..............`=~-,....
.....`=~-,_\_......`\,.................................\........................
...................`=~-,,.\,...............................\.......................
................................`:,,...........................`\..............__..
.....................................`=-,...................,%`>--==``.......
........................................_\..........._,-%.......`\...............
...................................,<`.._|_,-&``................`\..............

0 Kudos
Message 5 of 8
(1,880 Views)

Works fine for me. While that's a big array, it should be peanuts for a modern computer. The random number function will output a double, one thing you can do is convert it to a single in the innermost for loop. That should cut the memory usage in half since you are not storing the values in an array of doubles before converting to single.

0 Kudos
Message 6 of 8
(1,845 Views)

Some has been already mentioned:

 

The memory is not that much, but arrays need to be contiguous in memory so if your computer has been running for a long time with many things and you have e.g. tons of browser windows and other applications open, you might not have sufficient contiguous memory. How much RAM do you have and is your windows 32 or 64 bit? What does the task manager say?

Note that you'll have multiple copies in memory. While the array data alone is is only 29MB, the memory use for "data" is actually almost 10x that. (~300MB, see image), some used by various other structures (indicator, transfer buffer, etc.)

 

altenbach_0-1595455272792.png

 

 

You definitely want to convert to SGL in the innermost loop, but my guess is that the compiler probably knows how to avoid the extra allocations, especially if debugging is off. (with debugging enabled, there will be extra code so you can e.g. probe the various wires).

 


@ericluo wrote:

... , what should I do?


The first suggestion would be to ask in the forum, but you already did that. 😉 Good!

 

The question now is what do you actually need? If this is a subVI and the data is needed for local processing, keep the front panel closed and disable debugging. Are you just playing around to see where the limits are or do you actually need that kind of data? What is it used for?

 

 

0 Kudos
Message 7 of 8
(1,809 Views)

RAM is 16GB, my window is 64bit, but the Labview is 32bit because I want to use Chinese language. I read data from SQL, which is 16*4633600, and i will call the array in the same VI. 

0 Kudos
Message 8 of 8
(1,788 Views)