# Organization and Implementation

The TR solvers have RCI-based interfaces. The RCI TR interface implements a group of user-callable routines that are used in the step-by-step solving process for nonlinear least squares problem and follows the general RCI scheme described in [Dong95]. RCI means that the user is supposed to perform certain operations for the solver, for example, to provide values of the objective function or a Jacobi matrix. When the solver needs the results of such operations, the user should pass them to the solver. This makes the solver independent of specific implementation of the operations. However, this approach requires some additional work by the user.

Typical order for invoking RCI solver routines

The Trust-Region solvers are implemented with OpenMP* support. To use the multiprocessing mode, set the number of threads in environment variable OMP_NUM_THREADS.

## Memory Allocation and Handles

To make the routines easy to use, you are not required to allocate temporary working storage. Any required memory is allocated by the solver. To allow multiple users to access the solver simultaneously, the solver keeps track of the storage allocated for a particular application by using an opaque data object called a handle. Each of the Intel RCI TR solver routine creates, uses or deletes a handle.

Handle declaration varies from language to language. This document declares it as to be of _TRNSP_HANDLE_t or _TRNSPBC_HANDLE_t type.

C and C++ programmers should declare a handle as:

#include "mkl_rci.h"

_TRNSP_HANDLE_t handle;

or

_TRNSPBC_HANDLE_t handle;

Fortran programmers using compilers that support eight byte integers should declare a handle as:

INCLUDE "mkl_rci.fi"

INTEGER*8 handle

In addition to the necessary definition, for the correct declaration of a handle, the include file also defines the following:

- function prototypes for languages that support prototypes

- symbolic constants that are used for the error returns

- user options for the solver routines

- message severity.

Parent topic: Optimization Solver Routines