UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer droid77
Observer
5,819 Views
Registered: ‎07-22-2010

Memory allocation error when simulating long data

Jump to solution

When I simulate long data sets (250,000 points), I get an error in Simulink saying it ran out of memory.  What can I do so that I can complete my simulation?

 

Thanks

simulink_error_06-02-11.jpg
0 Kudos
1 Solution

Accepted Solutions
Observer droid77
Observer
6,834 Views
Registered: ‎07-22-2010

Re: Memory allocation error when simulating long data

Jump to solution

Hello eilert,

 

I updated my system to the following specs:

Desktop PC with: Windows 7 Pro 64-bit, Intel i5 5.3GHz Processor, 8GB physical RAM, 1GB video specific RAM, and increased my virtual memory (VM) minimum paging size to 32GB.  I also updated Matlab to R2010bSP1 64-bit edition, and installed System Generator version 13.1.

 

It seemed this upgrade was inevitable considering the dataset size and length of simulation.  The biggest help however was getting rid of most of the scopes (sinks) I had buried within each subsystem, probably totaled around 20 scopes.  Each one of these scopes was collecting data during simulation eating up the computer's resources. By reducing the number of scopes in the design along with these other upgrades, the simulation is now able to complete successfully in around 20 minutes for the 2 seconds of data.  It does this while using about 60% of available memory and about 70% of the dual CPU processing power.  This information was gathered using the Resource Monitor provided by WIndows 7.

 

In any case, thank you for your help in understanding my limitations.

 

View solution in original post

0 Kudos
4 Replies
Teacher eilert
Teacher
5,815 Views
Registered: ‎08-14-2007

Re: Memory allocation error when simulating long data

Jump to solution

Hi,

do your simulation on a machine with more memory or shorten the simulation time.

 

You may also check wether your system is wasting memory for other applications and services that are not needed during the simulation and wether the OS settings are set in a way that assigns maximum memory to the application (-e.g. using \3G switch on Win$ )

 

I can see the EDK symbol on the screenshot. This may be a hint that your design is a really large one, meaning that there is a lot to store, which would explain some huge memory requirement.

 

Have a nice simulation

   Eilert

 

 

0 Kudos
Observer droid77
Observer
5,814 Views
Registered: ‎07-22-2010

Re: Memory allocation error when simulating long data

Jump to solution

Hello Eilert,

 

Thanks for the prompt response.  You are correct, the design is a rather large one.  Nevertheless I need to have the long simulation times.

 

1) How do I check that my system is not wasting memory on other applications and services that are not needed during simulation?  Using Windows task manager, there is no other applications running.  I'm sure there are several processes running but I wouldn't know which ones to end.

 

2) How do I make sure that the OS settings assigns maximum memory to the application  (-e.g.. using \3G switch on Win$ )?  Can you provide more detailed guidance on this point?

 

3) I am using a clock period of 400e-9 (2.5 MHz), and my simulation time is 2 seconds.  I have 100,000 points of sampled data coming into the subsystem at 20us (50 Ksps).  I need to simulate 2 seconds of data at an absolute minimum since my signal of interest has a fundamental frequency of approx 1 Hz.  In order to properly capture at least 2 cycles I need to simulate for this long.

 

4) By using a PC with more memory, I already have the 3.5GB maximum allowable memory on Windows XP, so how would I go about getting a PC with more memory or allocating possibly some hard drive space to it.  Not sure really how to proceed on this one...

 

Thanks again for your help.

0 Kudos
Teacher eilert
Teacher
5,805 Views
Registered: ‎08-14-2007

Re: Memory allocation error when simulating long data

Jump to solution

Hi,

simulating for 2 seconds at 2.5Mhz gives you 5 million events (at least). Depending on youre design and the number of calculated outputs this may lead to a huge memory consumption.

 

If you are working on such a big design which also needs long simulation times (and therefore very much memory) I wonder why you are still using such a toyish computer?

You have software running that costs several thousands of Dollars, but a PC that's probably below the 1K$ range.

Can you imagine that there is some gap? It's like trying to pull a big truck with a riding mower.

Also it's a problem when the OS is limiting the ammount of usable memory for the application to 3GB.

(And that's why additional swap space is no solution to your problem.)

 

 

A proper solution would be to use some Server Mainboard, which could be equipped with much more memory (e.g. our main server has 64GB RAM, which is not very much as of today, but definitely a better machine for memory intense applications like simulations) and an OS that can handle that much memory.

I'm not sure if some Win$-Server edition can do it. We use a linux-bigmem kernel.

 

You can google for _ 3G switch _  and easily find detailed information about it on the net.

 

For reducing memory waste on your PC, you may take a look at the "Prefetch" directory somewhere in your Windows OS folder. There you find lots of code that's unneccessarily loaded into RAM to speed up application loading times. But application loading time isn't your problem yet. Google for it to to see how to deal with it.

 

Have a nice simulation

  Eilert

 

Observer droid77
Observer
6,835 Views
Registered: ‎07-22-2010

Re: Memory allocation error when simulating long data

Jump to solution

Hello eilert,

 

I updated my system to the following specs:

Desktop PC with: Windows 7 Pro 64-bit, Intel i5 5.3GHz Processor, 8GB physical RAM, 1GB video specific RAM, and increased my virtual memory (VM) minimum paging size to 32GB.  I also updated Matlab to R2010bSP1 64-bit edition, and installed System Generator version 13.1.

 

It seemed this upgrade was inevitable considering the dataset size and length of simulation.  The biggest help however was getting rid of most of the scopes (sinks) I had buried within each subsystem, probably totaled around 20 scopes.  Each one of these scopes was collecting data during simulation eating up the computer's resources. By reducing the number of scopes in the design along with these other upgrades, the simulation is now able to complete successfully in around 20 minutes for the 2 seconds of data.  It does this while using about 60% of available memory and about 70% of the dual CPU processing power.  This information was gathered using the Resource Monitor provided by WIndows 7.

 

In any case, thank you for your help in understanding my limitations.

 

View solution in original post

0 Kudos