NAG FL Interface
e04rwf (handle_​set_​get_​integer)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

e04rwf 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.

2 Specification

Fortran Interface
Subroutine e04rwf ( handle, cmdstr, ioflag, liarr, iarr, ifail)
Integer, Intent (In) :: ioflag
Integer, Intent (Inout) :: liarr, iarr(liarr), ifail
Character (*), Intent (In) :: cmdstr
Type (c_ptr), Intent (In) :: handle
C Header Interface
#include <nag.h>
void  e04rwf_ (void **handle, const char *cmdstr, const Integer *ioflag, Integer *liarr, Integer iarr[], Integer *ifail, const Charlen length_cmdstr)
The routine may be called by the names e04rwf or nagf_opt_handle_set_get_integer.

3 Description

e04rwf adds an additional means of communication to routines 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
PINFO The current problem sizes and statistics as pinfo defined in e04saf Read 100
See Section 3.1 in the E04 Chapter Introduction for more details about the NAG optimization modelling suite.

4 References

None.

5 Arguments

1: handle Type (c_ptr) Input
On entry: the handle to the problem. It needs to be initialized by e04raf and must not be changed between calls to the NAG optimization modelling suite.
2: cmdstr Character(*) 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: cmdstr='PINFO'.
3: ioflag Integer Input
On entry: indicates the direction of the communication.
ioflag0
e04rwf will extract the requested information from the handle to iarr.
ioflag=0
The writing mode will apply and the content of iarr will be copied to the handle.
4: 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 e04rwf returns ifail=2).
5: iarr(liarr) Integer array Input/Output
On entry: if 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 ioflag0 (read mode), iarr contains the information requested by cmdstr; otherwise, iarr is unchanged.
6: 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 -1 is recommended since useful values can be provided in some output arguments even when ifail0 on exit. When the value -1 or 1 is used it is essential to test the value of ifail on exit.
On exit: ifail=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6 Error Indicators and Warnings

If on entry 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:
Note: in some cases e04rwf may return useful information.
ifail=1
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.
ifail=2
On entry, liarr=value, expected value=value.
Constraint: liarr must match the size of the data identified in cmdstr.
ifail=3
The provided cmdstr is not recognised.
ifail=4
Reading mode is not supported for the given cmdstr.
ifail=5
Writing mode is not supported for the given cmdstr.
ifail=6
The request cannot be processed at this phase.
The requested information is not available.
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
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.
ifail=-999
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

7 Accuracy

Not applicable.

8 Parallelism and Performance

e04rwf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
e04rwf 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 routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9 Further Comments

None.

10 Example

See e04taf.