# NAG CL Interfacee04rwc (handle_​set_​get_​integer)

Settings help

CL Name Style:

## 1Purpose

e04rwc is a part of the NAG optimization modelling suite. It allows an Integer piece of information to be read from or written to the problem stored in the handle. For example, it may be used to extract the current problem sizes and statistics.

## 2Specification

 #include
 void e04rwc (void *handle, const char *cmdstr, Integer ioflag, Integer *liarr, Integer iarr[], NagError *fail)
The function may be called by the names: e04rwc or nag_opt_handle_set_get_integer.

## 3Description

e04rwc adds an additional means of communication to functions within the NAG optimization modelling suite. It allows you to either read or write a piece of information in the handle in the form of an integer array. The item is identified by cmdstr and the direction of the communication is set by ioflag. The functionality is limited in this release of the NAG Library to the retrieval of the problem size and statistics.
General information on available cmdstr is as follows.
cmdstr Description Direction of communication liarr
BASIS The current state of the variables and slacks of the problem. It can also be referred as WARM START BASIS. Read and write $*$
PINFO The current problem sizes and statistics as pinfo defined in e04sac Read $100$
MCS Number Points Used to provide a custom initialization list for the solver e05kbc. Write nvar
MCS Initial Points Used to provide a custom initialization list for the solver e05kbc. Write nvar
See Section 4.1 in the E04 Chapter Introduction for more details about the NAG optimization modelling suite.

None.

## 5Arguments

1: $\mathbf{handle}$void * Input
On entry: the handle to the problem. It needs to be initialized by e04rac and must not be changed between calls to the NAG optimization modelling suite.
2: $\mathbf{cmdstr}$const char * Input
On entry: a string which identifies the item within the handle to be read or written. The string is case insensitive and space tolerant.
Constraint: ${\mathbf{cmdstr}}=\text{'BASIS'}$, $\text{'PINFO'}$ or $\text{'WARM START BASIS'}$.
3: $\mathbf{ioflag}$Integer Input
On entry: indicates the direction of the communication.
${\mathbf{ioflag}}\ne 0$
e04rwc will extract the requested information from the handle to iarr.
${\mathbf{ioflag}}=0$
The writing mode will apply and the content of iarr will be copied to the handle.
4: $\mathbf{liarr}$Integer * Input/Output
On entry: the dimension of the array iarr.
On exit: the correct expected dimension of iarr if liarr does not match the item identified by cmdstr (in this case e04rwc returns ${\mathbf{fail}}\mathbf{.}\mathbf{code}=$ NE_DIM_MATCH).
5: $\mathbf{iarr}\left[{\mathbf{liarr}}\right]$Integer Input/Output
On entry: if ${\mathbf{ioflag}}=0$ (write mode), iarr must contain the information to be written to the handle; otherwise, it does not need to be set.
On exit: if ${\mathbf{ioflag}}\ne 0$ (read mode), iarr contains the information requested by cmdstr; otherwise, iarr is unchanged.
6: $\mathbf{fail}$NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

## 6Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
NE_BAD_PARAM
On entry, argument $⟨\mathit{\text{value}}⟩$ had an illegal value.
NE_DIM_MATCH
On entry, ${\mathbf{liarr}}=⟨\mathit{\text{value}}⟩$, expected $\mathrm{value}=⟨\mathit{\text{value}}⟩$.
Constraint: liarr must match the size of the data identified in cmdstr.
NE_HANDLE
The supplied handle does not define a valid handle to the data structure for the NAG optimization modelling suite. It has not been properly initialized or it has been corrupted.
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
NE_PHASE
The request cannot be processed at this phase.
The requested information is not available.
NE_READ_ERROR
Reading mode is not supported for the given cmdstr.
NE_STR_UNKNOWN
The provided cmdstr is not recognised.
NE_WRITE_ERROR
Writing mode is not supported for the given cmdstr.

Not applicable.

## 8Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
e04rwc is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
e04rwc makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

None.

See e04tac.