There are various memory settings available, which can be specified from both the solver manager and when running
the solver from the command line. The notes below explain the issues and what to do when certain situations arise.
each of the data types. This may be specified from the solver manager or via the cfx5solve command. For parallel
simulations, different memory settings may be applied to the partitioner and solver.
Why does the ANSYS CFX-Solver fails during memory allocation on Windows?
The ANSYS CFX-Solver requests its 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 memory address space
(physical & virtual memory). When a Windows application loads, dynamic link libraries (or
DLLs) may also be loaded at the same time. These libraries are loaded into the memory
address space at the address location specified in the DLL file. Sometimes DLLs will load in
the middle of the address space creating fragmentation of the address space. The
fragmentation reduces the maximum contiguous size of a free block of memory. When the
solver tries to allocate memory, it is given the largest contiguous space in the entire address
range. Depending on where Windows loaded the initial libraries, this may be 1.7GB, 1.3GB,
or even less. You may be surprised to find that a 1.4GB solver run was fine one time, but
failed to allocate memory a subsequent time. This is an unfortunate side effect of how
Windows virtual memory management works.
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. For details, see Memory Allocation Factor. 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.