Settings help

## 1Purpose

x10af_AD_f is only required from C and Fortran. x10af_AD_f sets the length of the iuser array in a configuration data object. This enables/disables checkpointing for symbolic adjoint routines. The set of possible values are: -1, 0 and greater 0.

## 2Specification

Fortran Interface
 Integer, Intent (In) :: iusersize Integer, Intent (Inout) :: ifail Type (c_ptr), Intent (Inout) :: ad_handle
To be consistent with the naming scheme for other routines in the AD Library, five routines are available with names formed by replacing AD in the above by one of p0w, a1w, t1w, a1t1w or t2w.
extern "C" {
}
To be consistent with the naming scheme for other functions in the AD Library, five functions are available with names formed by replacing AD in the above by one of p0w, a1w, t1w, a1t1w or t2w.

## 3Description

x10af_AD_f sets the length of the iuser array in the configuration data object. It is relevant in symbolic adjoint mode routines and enables/disables checkpointing of iuser array. The values currently allowed are -1, 0, and greater 0. 0 is default and generates an error, if iuser is not nullptr. -1 disables checkpoint. Any positive number defines the length of the array and enables checkpointing in symbolic mode. This routine must be called after a call to x10aa_AD_f (to create a handle to the configuration data object) and prior to the call of the computational NAG AD Library routines for which the information is set.

None.

## 5Arguments

1: $\mathbf{ad_handle}$Pointer to AD Data Input/Output
On entry: a handle to the AD configuration data object, as created by x10aa_AD_f.
On exit: holds a handle to the internal data structure where information about the length of the iuser array has been stored. You must not change the handle other than via NAG AD Library calls until it is destroyed by x10ab_AD_f.
2: $\mathbf{iusersize}$Integer Input
On entry: the size of the user declared array iuser.
Constraint: ${\mathbf{iusersize}}\ge -1$.
3: $\mathbf{ifail}$Integer Input/Output
On entry: ifail must be set to $0$, $-1$ or $1$ to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of $0$ causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of $-1$ means that an error message is printed while a value of $1$ means that it is not.
If halting is not appropriate, the value $-1$ or $1$ is recommended. If message printing is undesirable, then the value $1$ is recommended. Otherwise, the value $0$ is recommended. When the value $-\mathbf{1}$ or $\mathbf{1}$ is used it is essential to test the value of ifail on exit.
On exit: ${\mathbf{ifail}}={\mathbf{0}}$ unless the routine detects an error or a warning has been flagged (see Section 6).

## 6Error Indicators and Warnings

If on entry ${\mathbf{ifail}}=0$ or $-1$, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
${\mathbf{ifail}}=1$
On entry: ad_handle is not a valid handle for the AD computational data object. Either ad_handle has not been initialized or it has become corrupted.
${\mathbf{ifail}}=2$
On entry: unexpected value of iusersize.
Constraint: ${\mathbf{iusersize}}\ge -1$.
${\mathbf{ifail}}=-99$
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
${\mathbf{ifail}}=-399$
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

Not applicable.