LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

memory full

Hello,

 

I am trying to simulate a CDMA system, transmittting one message, which is of length 10000 bits, and then multiplying each bit in the message with 256 bit array. The gives a huge array of length 2560000, and this is broken up into 1000 segments for processing in the transmitter_28M_mod_for_ber.VI.

 

I am trying to get a BER graph, and to get a proper graph, my message length has to be at least 1 million bits long. However, if I increase the number of message bits, I get a memory full error.

 

The actual BER calculation is in the CDMA_system_28May VI, and other supporting VIs have been attached as well. The message length is set in the message_gen VI.

 

Can anyone please give any suggestions as to what I should do to achieve a BER for message length of 1 million iwthout any memory full errors?

 

Thanks a lot.

0 Kudos
Message 1 of 13
(3,967 Views)
sorry, forgot to attach the VIs. Here.
0 Kudos
Message 2 of 13
(3,966 Views)
some more VIs required to run.
Download All
0 Kudos
Message 3 of 13
(3,965 Views)

Are you sure the algorithm is correct?

 

I don't claim to understand what you are doing, but looking at the code a lot seems a bit odd.

 

message_gen.vi: Why are you setting the polynomial order to 10000?? (It gets coerced down to a reasonable number anyway).

 

CDMA system....vi: To calculate the mean of a 2D array, just use "add array elements" and divide by the product of dimension. No need to take the mean in stacked loops. Why is the 2D array complex? You never use the imaginary part (see also below).

 

Receiver-modified_ber_gah.vi: You never use the imaginary part, so why are you even wiring the complex array to this VI if all you ever use is the real part? To get the first dimension, you don't need to index out a row and the use array size. Use array size on the 2D array and index from there.

 

transmitter_28M_mod_for_ber.vi: A random number multiplied by zero, converted to I32 and use to size an initialized array and prepended to a complex array is just the complex array. All this makes no sense. The last FOR loop is a simple "reshape array". You have a lot of wires going to autoindexing tunnels at the loop boundary, ending in thin air. All these seem to allocate bufffers for no purpose. Why is the array complex at all. You never seem to use the imaginary part later.

 

In general, watch out for coercions (red little dots). Your VI is full of them.

 

You also have a lot of indicators containing huge data structures. Make sure that all subVIs have the FP closed when you run the toplevel VI.

 

Have you done some profiling?

 

0 Kudos
Message 4 of 13
(3,949 Views)

Hi Altenbach,

 

Yes the algorithm is correct.

 

I am trying to create a CDMA system, adn so far this algorithm seems about right.

 

message_gen.vi: yes, sorry, that was a mistake. thanks for pointing it out. Have changed it now.

 

CDMA_system...vi: I used a complex 2D array because I will be using the imaginary part later on.

 

Receiver_mod_ber_gah: Again, need imaginary part later on. Yeah, I know what you mean about using the array size and indexing from there, but does that really matter?

 

Transmitter_28M....vi: yes, I have changed it, it was left over from something done previously, my apologies. I have also removed all the unnecessay autoindexing tunnels. Again, need the complex part for later on.

 

Does coercions cause any major problems?

 

The only indicators I have now are the ones which I use for outputs of the VI and I need them.

 

Yeah, I tried to do some profiling, went tools > Profile > Perfromance and Memory, but that just gave me the time spent in each VI. How does this help me?

 

I have also attached the modified VI's.

Thanks a lot.

 

 

Download All
0 Kudos
Message 5 of 13
(3,942 Views)

Hi

Also in the CDMA_system..vi: Like u have suggested ..the mean doesnt need to be calculated in such an inefficient way as I have done. thanks for pointing that out. I have changed it as u have suggested and attachd it.

 

Thanks

0 Kudos
Message 6 of 13
(3,933 Views)

LSASS wrote:

Does coercions cause any major problems?


Coercions normally require a data copy and thus a new buffer allocation in memory, so they are definitely not recommended if you suspect memory issues. You should make sure not to switch datatypes.

 

What is typical input data? I was able to run your VI without any memory issues.

0 Kudos
Message 7 of 13
(3,929 Views)

LSASS wrote:

Hi

Also in the CDMA_system..vi: Like u have suggested ..the mean doesnt need to be calculated in such an inefficient way as I have done. thanks for pointing that out. I have changed it as u have suggested and attachd it.


There are still a few issues with your new version:

  • There is still a blue wire to the edge going nowhere. (below Mean on the right).
  • The to_I16 belongs before the loop, it needs to be done only once and not repeated with every iteration of the FOR loop (well, things are folded, so it probably does not make a difference).
  • "Index array" is resizeable, so you only need one instance getting both sizes.
  • The output of the new averaging is now complex. You might want to get the the real or absolute value as appropriate.
  • You don't need to wire a -1 to the noise generator. It's the default anyway.
  • You could reshape the noise to a 2D array and then add the two 2D arrays, eliminating the inner FOR loop.

 

Message 8 of 13
(3,925 Views)

LSASS wrote:

Transmitter_28M....vi: yes, I have changed it, it was left over from something done previously, my apologies. I have also removed all the unnecessay autoindexing tunnels. Again, need the complex part for later on.


The right side of the code is still too complicated. Instead of the FOR loop, all you need is "reshape array", e.g. as follows:

 

Message Edited by altenbach on 06-28-2009 11:44 PM
Message 9 of 13
(3,922 Views)

Hi Altenbach,

 

So to get rid of coercions, do I have to use data conversion evrywhere ther is a red dot?

 

Yes, with this length of the message, ie 10000 bits in the message_gen.vi, there is no memory issue. However, I need to have this length much larger like over a million bits long in order to get a proper i.e an accurate BER result. But I am unable to do this as I get the "memory is full" problem. Is there a way through this?

 

Thanks a lot, 🙂 

0 Kudos
Message 10 of 13
(3,914 Views)