21.4. Using the Configuration File

When you execute the program, it reads a configuration file, config.ans, if one exists. The file controls system-dependent settings such as the size of each file buffer, maximum number of database pages in memory, etc.

The program searches for the config.ans file first in the current (working) directory, next in the login (home) directory, and finally in the /apdl directory. The search path for config.ans is identical to the start.ans and stop.ans files.

The configuration file is a fixed-format file, consisting of a list of keywords followed by an equal (=) sign and a number. The keyword must begin in column 1, the equal sign must be in column 9, and the number must begin in column 10.

Example 21.3:  config.ans File
NO_RSTGM=1
NO_ELDBW=0
NUM_BUFR=2
SIZE_BIO=4096
VIRTM_MB=2048
NUM_VPAG=8192
SIZ_VPAG=16384
NUM_DPAG=16777212
MEM_GROW=12
LOCALFIL=0
CONTACTS=1000
ORDERER_=2
MX_NODES=5000
MX_ELEMS=2000
MX_KEYPT=500
MX_LINES=1000
MX_AREAS=300
MX_VOLUS=200
MX_REALS=10
MX_COUPS=10
MX_CEQNS=10
FILESPLT=128

Following are descriptions of each keyword in the example. Because many of the values for config.ans are dependent on the system being used, a range of values for each keyword is provided. On most computer systems, 1 integer word = 4 bytes.


NO_RSTGM -- Key that determines whether or not the geometry data will be written to the results file: 0 (write the data) or 1 (do not write the data). This is especially useful for large, complex analyses where the results file would become excessively large during the solution.

NO_ELDBW -- Key that determines whether or not to write results into the database after a solution. When VALUE = 0, write results into the database. When VALUE=1, do not write results into the database. It defaults to 0 and can be changed at the Begin level with the /CONFIG,NOELDB command.

NUM_BUFR -- Number of buffers per file stored in scratch space: 1 to 32. A buffer is a chunk of space used to "hold" data in memory before they are written to the hard disk. The program waits for the buffer to be completely "filled up" and only then "empties" it onto the hard disk. This prevents frequent disk input-output activity, which can be time consuming.

NUM_BUFR -- Defaults to 4 and can be changed at the Begin level with the /CONFIG,NBUF command. It is used for the EROT, ESAV, EMAT, and FULL files. On systems with a large amount of real memory, you can increase NUM_BUFR or SIZE_BIO (or both) to keep the program solution files in memory rather than on disk. This can save a significant amount of disk input-output activity and may be practical for small problems with many substeps.

SIZE_BIO -- Size of each file buffer: 1024 to 41943041073741824 integer words (4 KB to 3814 TB). It defaults to 16384 and can be changed (on most systems) at the Begin level with the /CONFIG,SZBIO command. See NUM_BUFR for details.

VIRTM_MB -- Amount of total program work space requested for the current session. It defaults to 2 GB (2048 MB); it can be changed with the work space entry option, as explained in the basic concepts section earlier in this chapter. (See Figure 21.5: Memory Diagram in Terms of Configuration Keywords.) You can also use VIRT_MEM in place of VIRTM_MB to specify the work space in integer words.

NUM_VPAG -- Maximum number of database pages in memory, ranging from 16 to 16384. The default value is 16384. You can change NUM_VPAG or SIZ_VPAG (or both) to change the amount of database space; see How and When to Perform Memory Management in this chapter, and Figure 21.5: Memory Diagram in Terms of Configuration Keywords.

Figure 21.5:  Memory Diagram in Terms of Configuration Keywords

Memory Diagram in Terms of Configuration Keywords

SIZ_VPAG is the size of each database page: 4096 to 4194304 integer words (16 KB to 16 MB), defaults to 16384 (64 KB). You can change SIZ_VPAG or NUM_VPAG (or both) to change the amount of database space. SIZ_VPAG also affects the size of the page file; see NUM_DPAG.

NUM_DPAG is the number of database pages on disk: NUM_DPAG defaults to 16777212 (the maximum). This number times SIZ_VPAG determines the maximum size of the page file (Jobname.PAGE), which is written only if the database becomes too large to fit in the database space in memory. If the page file is written, sufficient disk space must be available to accommodate it, or the program will abort.

MEM_GROW is the starting size of the memory block (in MB) that the program will attempt to allocate should a problem grow larger than will fit in the current scratch space allocation. If the program attempts to allocate additional scratch space, it will start with a memory block size equal to MEM_GROW and then reduce this by halves until it can allocate additional memory. If not specified, MEM_GROW defaults to one-half the initial scratch space. To turn off dynamic memory allocation (use a fixed-memory model), set MEM_GROW=0.

LOCALFIL is a key that determines when files are to be closed: 0 (globally closed) or 1 (locally closed). It defaults to 0 (globally closed) and can be changed at the Begin level with the /CONFIG,LOCFL command. This key is applicable only to the EROT, ESAV, EMAT, and FULL files. Locally closed files (LOCALFIL=1) may be deleted earlier during solution if requested with the /FDELE command. This may be helpful while running large problems. Globally closed files are closed at the end of the run and are not opened and closed each substep. This saves time in analyses with many substeps.

CONTACTS is the number of contact elements that are expected to be in contact at any given time. It defaults to 1000 and can be changed at the Begin level with the /CONFIG,NCONT command. This is not the same as the total number of contact elements in the model.

Any of the following nine keywords that you do not specify is set to 100 the first time the program encounters it. Whenever the current maximum is exceeded, the keyword value automatically doubles. The maximum values are dynamically expanded, even at first encounter.

FILESPLT is the integer value indicating the file split point in megawords. A megaword is 1024*1024 4-byte words, or 4 MB. All files that are eligible for splitting will be split into a new file every increment of xxxx megawords (where xxxx is the value specified with this keyword). You can change the value (on most systems) at the Begin level with the /CONFIG,FSPLIT command. See Splitting Files Across File Partitions in the Operations Guide for more information on splitting files.

You can change many of the configuration settings at program start-up using entry options, at the Begin level with the /CONFIG command, or with other the program commands. In most cases, therefore, there is no need to create your own config.ans file. Also, the default settings for each computer system have been chosen for efficient running of typical models on typical system configurations. Change them only for atypical models or atypical systems.

Distributed ANSYS Distributed ANSYS sets the following keywords: NO_ELDBW = 1; NO_RSTGM = 0; FSPLIT = the default value. The NO_ELDBW, NO_RSTGM, and FSPLIT options cannot be changed when using Distributed ANSYS.


Release 18.2 - © ANSYS, Inc. All rights reserved.