How To Access More Memory
My model runs out of memory. Can I access more memory from Analytica?
You may be hitting a memory limit that is determined by your virtual memory settings. Your virtual memory settings will determine the maximum amount of memory that can be used by the total of all programs running on your computer.
On XP, you can examine and change these settings as follows: 1. Right click on the "My Computer" icon on the desktop. 2. Select Properties. 3. Click the Advanced tab. 4. Click the Performance Settings button 5. Click the Advanced tab 6. Click the Virtual memory "Change" button. 7. Examine and/or change the settings.
If you have a maximum size limit of less than 2000MB, you'll probably want to increase it. If you tend run to have many applications running simultaneously, or run database servers on your computer, you may want to allocate quite a bit more than this. You'll also need to ensure that drives used for paging have adequate free space to handle the maximum page file size.
If you are running Analytica under Virtual PC on a Macintosh computer, there are a few additional settings on Virtual PC that control the maximum amount of memory usable from Windows. Virtual PC users should check these as well.
If you have plenty of virtual memory space, you might be hitting the 2 Gigabyte limit that is imposed on all 32-bit processes in Windows, including Analytica. Two gigabytes is quite a bit of memory. However, it is not uncommon for people to get carried away with excessive dimensionality in their Analytica models. It is so easy to throw in another dimension here and another dimension there, and every time you do so, you expand the memory usage multiplicatively. It is not hard to quickly create arrays with billions of values if you aren't careful.
For example, suppose you create a 6-dimensional variable, each dimension having just 100 elements. It doesn't sound like much until you consider that this is 100^6 = 10^12 elements (= 1 trillion cells)!
Excessive dimensionality is really a problem with your model, and not a problem with your memory settings. An inherent part of the modeling process is making the tradeoffs between model complexity, dimensionality, level of detail, computation speed, memory usage, etc. If you are running into problems of excessive dimensionality, you will probably need to reconsider the structure, dimensionality, and algorithms of your model.
To this effect, the Profiling library from Analytica Enterprise can help you identify where memory is being consumed in your model. See Profiling in the Analytica User Guide for more information.
There are a variety of modeling tricks that can also help you explore very large dimensional spaces. The trick demonstrated in the "Choice and determtable.ana" example model (in the "Example Models/Function Examples" folder installed with Analytica) can often be effectively used. We can also provide you with an "Intro to Determtables" FAQ for a bit more detail.
Finally, with some re-configuration, certain Windows operating systems (e.g., XP professional, Appliations Server 2003) will allow you to change the system settings to allow certain programs access to 3 Gigabytes of memory (assuming you have sufficient virtual memory for this). If you configure these settings, Analytica 3.1 can access up to 3 Gigabytes (it is LARGE_ADDRESS_AWARE), providing a some additional space. To reconfigure your system, you must add the /3GB
flag to the Boot.ini
file, as described at:
Instructions for Accessing 3GB
Setting 32 Bit Windows to use 3GB RAM
Windows XP and Windows Server 2003
- Right-click 'My Computer'. Click 'Properties'.
- In the System Properties dialog box, click the 'Advanced' tab.
- On the Advanced tab, under 'Startup and Recovery', click 'Settings'.
- In the 'Startup and Recovery' dialog box, under System startup, click Edit. The Windows boot.ini file will be opened in Microsoft® Notepad.
- Add
/3GB
to the end of the linemulti(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows...
- Save and close the file.
- Click OK to close all dialogs.
- Restart your computer.
Example of a modified Boot.ini file
[boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect /NoExecute=OptIn /3GB
Windows Vista and Windows 7
- Start a Command Prompt as an Administrator.
- Click the 'Start button'.
- Click 'All Programs'
- Click 'Accessories'
- Right click 'Command Prompt'
- Click 'Run as Administrator'
- Run the command
bcdedit /set IncreaseUserVa 3072
- Restart your computer.
Enable comment auto-refresher