21.3. How and When to Perform Memory Management
Normally, there is no need to concern yourself with memory-management issues. The program’s memory
manager allocates extra memory from the system when it needs to in almost all cases.
The following sections provide guidance as to when it is likely that you will need to use the -m command
line option.
21.3.1. Determining When to Change the Work Space
21.3.2. Changing the Amount of Work Space
21.3.3. Changing the Amount of Database Space
21.3.1. Determining When to Change the Work Space
The -m command line option allows you to manually set the size of the initial block of memory used
by ANSYS. Memory allocated upon startup via the -m option exists in two contiguous blocks. For example,
a -m setting of 1800 with a -db option of 300 instructs the program to first allocate a 300 MB contiguous
block of memory for the database and then to allocate a 1500 MB contiguous block of scrat ch memory
(1800 - 300 = 1500).
The current defaults for all 64-bit machines are -m = 1024 and -db = 512. For 32-bit machines, the
defaults are -m = 512 and -db = 256. Ideally, all program memory will be allocated from within the
initial block, allowing efficient reuse of memory blocks during various phases of simulation. When the
program needs more memory, it will allocate from the system, automatically growing new blocks that
are half the size of the initial scrat ch memory block or the size of the new memory block allocation,
whichever is larger.
One reason to change the default memory settings is when a job fails due to insufficient memory that
may be caused by fragmented memory. For example, if a large model requires a contiguous block of
800 MB for the sparse solver, the default memory allocation will be insufficient (-m 1024 MB minus -db
512 MB = 512 MB contiguous memory). In this case, the program would try to allocate an additional
800 MB block of contiguous memory to satisfy the sparse solver requirement, bringing the total memory
requirement to 1824 MB (1024 default plus 800 additional).This memory requirement may fail on
smaller systems, especially 32-bit Windows systems. To accommodate this model within the default
memory availability, specify -db -100 (using a negative value will prevent the program from allocating
additional memory); this will result in an initial memory block of 924 MB, which is sufficient to satisfy
the sparse solver requirement of 800 MB. If you are running a 32-bit Windows system, see Memory Usage
on Windows 32-bit Systems for more information about that system.
Another reason to change the default memory settings is when you want to specifically control how
much memory the program can allocate from the system. This may be useful in a multi-user environment
where resources such as physical memory are being shared by multiple running analysis jobs. In this
case, users can set a fixed memory mode by specifying a negative -m value. When the fixed memory
mode is used, the initial database and scrat ch spaces are set per the -m (and -db) sizes; however, the
program is constrained so that it cannot grow any additional memory (for scrat ch or database). When
using this option, keep in mind that the program will fail if, at any point during the run, the memory
required by the program exceeds the initial block reserved at startup.
21.3.2. Changing the Amount of Work Space
The easiest way to change the amount of program work space is to use the work space entry option
(-m) while activating the program, either via the launcher or via the program execution command. For
example, to request 400 MB of program work space (instead of the default of 1 GB for 64-bit machines
or 512 MB for 32-bit machines), the program execution command would read:
Release 15.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
How and When to Perform Memory Management