This section summarizes the conventions adopted for announcing and controlling errors in the memory management system, and fully describes the role of the character variables CERACT and CRESLT, which occur in many of the argument lists for subroutines.
A typical memory management subroutine contains two character strings in its argument list: CERACT and CRESLT. CERACT is passed as input to the subroutine, and determines the action to be taken when there is an error. CRESLT is set as output, and indicates the result of the call to the subroutine. If the subroutine call is successful then CRESLT = ‘GOOD’ on exit.
Both CERACT and CRESLT should be declared as CHARACTER*4 in the calling subroutine.
Below are the standard values that can be set for CERACT.
CERACT = ‘SKIP’
In the event of an error, there is no warning message and the program continues (control being returned to the calling subroutine).
CERACT = ‘STOP’
In the event of an error, an error message is produced and the program is stopped.
CERACT = ‘WARN’
In the event of an error, a warning message is produced and the program continues (control being returned to the calling subroutine).
If any other value is set for CERACT, then this is equivalent to ‘STOP’.
There are many values that can be set for CRESLT by the various memory management subroutines, and these are listed below.
CRESLT | Description |
---|---|
ADRS | The address passed for locating an array entry (for example, JADRES in PEEK and POKE subroutines) is out of range. |
BIG | When using POKECA or POKECS to set a character string, or even when using PEEKCA to obtain a character string, this value for CRESLT indicates that the character variable passed down is too big for this data area. Conversely, when using PEEKCS, to obtain a character string, this value for CRESLT indicates that the character variable passed to contain it is too small. This error code can also be returned by the subroutine SQZDAT, to show that you are trying to increase the length of a data area (or give it a negative length). Finally, this error code will be returned by subroutine MMSTAT if LENINF is set too small. |
BSL | The character string passed down to PEEKCA or POKECA, to contain an entry from a character array, has a length inconsistent with the total length of the character array data area (BSL = Bad String Length). |
DAT | The name passed to the subroutine represents a data area, when it should (perhaps) be a directory. |
DIR | The name passed to the subroutine represents a directory, when it should be a data area. |
END | There are no more data areas or subdirectories to be found. |
ERR | There is some unspecified error, not covered elsewhere in this list. |
FCAT | The memory management catalogue is full (catalogue size has been exceeded). To increase the catalogue size, see Starting the CFX-Solver from the Command Line in the CFX-Solver Manager User's Guide and Configuring Memory for the CFX-Solver in the CFX-Solver Manager User's Guide. |
FULL | The memory management stack is full. |
GOOD | The subroutine successfully achieves what was asked of it. |
ILEG | The name passed to the subroutine is illegal. This value of CRESLT is returned if one of the directories in the pathname does not exist, or if the pathname has an illegal character or is too long. |
NLNK | The name passed to the subroutine is an existing data area or directory in its own right, when it should have been created by a call to MAKLNK. In the case of MMSTAT, this indicates an internal error within this subroutine. |
NONE | The name passed to the subroutine could not be found. |
OLD | The name passed to the subroutine is already in use. |
SIZE | There is a problem with the size requested. |
TEMP | The subroutine cannot find a temporary name for workspace. |
TYPE | The data area is of an inappropriate type (integer, real, and so on.) for this particular POKE or PEEK subroutine. In the case of MMSTAT, this error condition implies that the value set for CTYPE has not been recognized. |
OPTS | Illegal options passed to FNDFIL. |