What would cause ehe CFX-5 Solver to fail during memory allocation on Windows?


The CFX-5 Solver requests it`s necessary memory from the operating system at the beginning of the run. If it fails to do so, it will fail with the following error.
+------------------------------------------------------+
*** Run-time memory configuration error ***
Not enough free memory is currently available on the system.
Could not allocate requested memory - exiting!
+------------------------------------------------------+

Windows workstations with large amounts of memory (>2Gb) can fail during this stage even if the total amount of requested memory is less than 2Gb. If this happens, first verify that sufficient Virtual Memory has been allocated in the Operating System. It is recommended that the maximum size of Virtual Memory be at least twice the size of the available physical memory.

Even with enough Virtual Memory, the problem may persist and is a limitation of the Windows Operating System. Under all current 32-bit Windows operating systems (Windows NT, 2000, XP), the total available address space for any process is 2Gb. If the solver is attempting to allocate more than 2Gb of memory, it will fail.

Unfortunately, even if the solver is attempting to allocate less than 2Gb of memory, it may fail.

The problem lies in the details of how Windows manages the 2Gb address space. When a Windows application loads, there are usually a number of libraries (or DLLs) that are loaded as well. These libraries are loaded into the 2Gb address space, but not in any specific order or memory location. The operating system tries to optimize the locations of the DLLs, but a certain degree of memory fragmentation does occur. When the solver tries to allocate memory, it is given the largest contiguous space in the 2Gb range. Depending on where Windows loaded the initial libraries, this may be 1.8Gb, 1.3Gb, or even less. You may be surprised to find that a 1.4Gb solver runwas fine one time, but failed to allocate memory a subsequent time. This is an unfortunate side effect of Windows memory management.

If the solver fails memory allocation, but is close to the available memory, using explicit solver memory allocation may allow the case to run. When it starts, the solver estimates the amount of memory required. Depending of the details of the case, this estimation may be conservative and request more memory than is actually required (but not by more than about 10%). It is possible to override the solver memory estimate and specify the memory allocation (see the Solver section of the Solver Manager documentation for more detail). Manually decreasing the allocation may allow the memory to fit within the available contiguous space.

If you have additional parallel keys, another solution is to execute the job with a larger number of parallel partitions, even if that means having more partitions than number of CPUs. With more parallel processes, each individual process will be smaller, and at some point will fit within the process memory limitations. This is done at the expense of some solver inefficiency due to additional parallel overhead.

Finally, other operating systems such a Linux do not display this limitation and may be considered if you want to take maximum advantage of your available memory.





Show Form
No comments yet. Be the first to add a comment!