How can I change the allocated memory in CFX and why might I need to do this?


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.


WHAT IS MEMORY ALLOCATION AND WHY DO PROBLEMS OCCUR?

At the start of a run, the solver estimates the maximum amount of memory likely to be required. Memory is then requested from the operating system. This estimate is based on parameters such as the mesh size and the physical models selected. In most cases this estimate is adequate, however sometimes the estimate is wrong and intervention is required, usually when the solver under-estimates its memory requirements.


HOW TO CHECK THE SOLVER MEMORY ALLOCATION

This is given in the solver output file, visible in the text monitor window in the solver manager. Look for the section entitled 'Memory Allocated for Run'. Summing the 'Kbytes' values for real and integer memory will give the approximate memory allocation in kilobytes. If you change any of the memory parameters, it is as well to check that you are getting what you expect.


SITUATION 1 - NOT ENOUGH MEMORY ALLOCATED

Typically, this situation manifests itself as a failure of the solver with the error messages such as:

'INSUFFICIENT MEMORY ALLOCATED'
'Action required : Increase the integer stack memory size'
'Action required : Increase the real stack memory size'
'CRESLT = FULL'

A solution to this problem is to increase the memory allocation. A sensible first step would be to increase all memory allocation by a factor of, say 1.2. Setting an individual multiplier for the data type concerned may be useful if memory is limited.


SITUATION 2 - NOT ENOUGH MEMORY AVAILABLE ON MACHINE

In this case, the solver typically fails with the following messages in the solver output file:

'Run-time memory allocation error'
'Not enough free memoryis currently available on the system'

Here, the solver has attempted to allocate more memory than is available on a machine. It may be useful to check the solver memory allocation and compare this with the amount of memory available on the machine(s).

Possible solutions are:

- Check that no other memory demanding jobs are running on the machine
- Run the simulation on a machine with more memory
- Run the simulation in parallel on several machines
- Reduce the mesh size
- Use fewer physical models
- If the attempted memory allocation was just a littlemore than the available memory, try reducing the default memory allocation slightly (e.g. by setting the memory allocation factor to 0.98). Use with care, since reducing the memory allocation too far will cause the solver to fail with insufficient memory allocated!


SETTING SOLVER MEMORY PARAMETERS

In most cases it is sufficient to set a single memory allocation factor. This affects all data types and is simply a multiplier of the default memory allocations. For finer control, it is possible to set multipliers or absolute values individually for 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.


SETTING SOLVER MEMORY PARAMETERS VIA THE SOLVER MANAGER

- On the 'Define Run' form, check the 'Show Advanced Controls' tick-box.
- Select either the 'Solver' tab or the 'Partitioner' tab

To set a blanket multiplier for all memory types:

- Set 'Memory Allocation Factor' to the desired value.

To set individual values for each data type:

- Check the 'Detailed Memory Overrides' tick-box.
- Set values for each data type.

Unless the x suffix is used, values are absolute and in words. Suffices M and k denote kilowords and megawords. The x suffix denotes a multiplier rather than an absolute value.


SETTING SOLVER MEMORY PARAMETERS FROM THE COMMAND LINE

To set a blanket multiplier for all memory types, use:

-size <factor>

For the partitioner ...

-size-part <factor>

To set individual values for each data type, use:

-size-nc
-size-nd
-size-ni
-size-nl
-size-nr

For the partitioner ...

-size-part-nc
-size-part-nd
-size-part-ni
-size-part-nl
-size-part-nr

Again, unless the x suffix is used, values are absolute and in words. Suffices M and k denote kilowords and megawords. The x suffix denotes a multiplier rather than an absolute value.

As with all of the CFX command line utilities, a full list of the available options for the cfx5solve command may be obtained by typing: cfx5solve -help


COMMAND LINE EXAMPLES

set a blanket multiplier of 1.2:

cfx5solve -def file1.def -size 1.2

Set a multiplier of 1.5 for integer memory only:

cfx5solve -def file1.def -size-ni 1.5x

Use a real memory allocation of 10 megawords:

cfx5solve -def file1.def -size-nr 10M


MMS CATALOGUE SIZE

This is the maximum number of data areas allowed in the memory management system used in the solver and is nothing to do with the amount of memory allocated. This issue is dealt with in a separate solution (381455).
**** Entered By: dsclarke @ 06/07/2005 16:31 ****





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