LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange Memory Behavior (leak) - Tranpose 2D Array

Hi Everyone,

Currently I am developing an application using CompactRIO 9035(LabVIEW 2015 SP1) and part of the CompactRIO Waveform Reference Library (Using the Continuous Acquisition Template).

Through FPGA we acquire high speed data from 8 modules NI 9234 at 25,6 kHz during 4s, every 10s.

After implementing the acquisition at all 24 channels we've noticed a increasing memory problem (eventually shutting down the application), monitored in linux by using the command:

watch -n 10 "cat /proc/$(pidof lvrt)/status | grep VmRSS | awk '{print $2}'"

After a lots of digging and researching we've found out that a transpose 2d array function might be the problem at this part of the code, locate in the AcqRead(Wfm). 

 

forums1.png            forums2.png

 

After disabling the "Transpose 2D Array", not only decreased the program memory (~ 50 MB) but also let the program very stable, not going up and down with the memory as before.

After trying to manually transpose the array using other functions (in place structures; initialize array) and also "decimate array" (data from FPGA is interleaved), the program had a more unstable behavior. Am I missing something? Is this a normal behavior for LabVIEW managing a set of data this big (24 x 102400)?

I would like your opinion. 

Thanks in advance for any help.

 

 

 

 

 

Felipe Pinheiro Silva


Follow my blog for LV content!

0 Kudos
Message 1 of 3
(2,770 Views)

Are there buffer allocation dots? Transposing needs to touch most of the elements, but you would think it could be done "in place" by initializing a 2D array of the transposed size, then autoindexing on the 1D array, replacing each element. (not sure what you tried).

 

Of course the question is if it really needs to be transposed. I assume the 2D array is a subVI connector.

0 Kudos
Message 2 of 3
(2,743 Views)

altenbach escreveu:

Are there buffer allocation dots? Transposing needs to touch most of the elements, but you would think it could be done "in place" by initializing a 2D array of the transposed size, then autoindexing on the 1D array, replacing each element. (not sure what you tried)

 


Yes, I've already tried this way, unfortunately the behavior was very similar.

 


Of course the question is if it really needs to be transposed. I assume the 2D array is a subVI connector.


As a matter of fact, this is a interesting question. First answering your statement, it is not a subVI connector. But after reading this, I might look again how this array is used and if I can change this.

Thanks for your reply.

Felipe Pinheiro Silva


Follow my blog for LV content!

0 Kudos
Message 3 of 3
(2,725 Views)