NAG Library Routine Document
e05zkf
(optset)
1
Purpose
e05zkf either initializes or resets the optional parameter arrays or sets a single optional parameter for supported problem solving routines in
Chapter E05.
The following routines are supported:
2
Specification
Fortran Interface
Integer, Intent (In) | :: |
liopts,
lopts | Integer, Intent (Inout) | :: |
iopts(liopts),
ifail | Real (Kind=nag_wp), Intent (Inout) | :: |
opts(lopts) | Character (*), Intent (In) | :: |
optstr |
|
3
Description
e05zkf has three purposes: to initialize optional parameter arrays; to reset all optional parameters to their default values; or to set a single optional parameter to a user-supplied value.
Optional parameters and their values are, in general, presented as a character string,
optstr, of the form ‘
option ’; alphabetic characters can be supplied in either upper or lower case. Both
option and
may consist of one or more tokens separated by white space. The tokens that comprise
will normally be either an integer, real or character value as defined in the description of the specific optional argument. In addition all optional parameters can take an
DEFAULT which resets the optional parameter to its default value.
It is imperative that optional parameter arrays are initialized before any options are set, before the relevant problem solving routine is called and before any options are queried using
e05zlf. To initialize the optional parameter arrays
iopts and
opts for a specific problem solving routine, the option
Initialize is used with
optval identifying the problem solving routine to be called. For example, to initialize optional parameter arrays to be passed to
e05saf,
e05zkf is called as follows:
Call e05zkf('Initialize = e05saf', iopts, liopts, opts, lopts, ifail)
Note that the routine name may be abbreviated to just the first five letters of the ‘short’ name, or by omitting the nagf_ or glopt_ prefixes of the ‘long’ name. So the above may be equivalently specified as 'Initialize = e05sa' or 'Initialize = bnd_pso'.
Information relating to available option names and their corresponding valid values is given in Section 12 in
e05saf,
e05sbf,
e05ucf and
e05usf.
4
References
None.
5
Arguments
- 1: – Character(*)Input
-
On entry: a string identifying the option to be set.
- Initialize the optional parameter arrays iopts and opts for use with routine , where is the short name associated with the routine of interest.
- Resets all options to their default values.
- See Section 12 in e05saf, e05sbf, e05ucf and e05usf for details of valid values for option and optval. The equals sign () delimiter must be used to separate the option from its optval value.
optstr is case insensitive. Each token in the
option and
optval component must be separated by at least one space.
- 2: – Integer arrayCommunication Array
-
On entry: optional parameter array.
If
optstr has the form
, the contents of
iopts need not be set.
Otherwise,
iopts must not have been altered since the last call to
e05zkf,
e05zlf or the selected problem solving routine.
On exit: dependent on the contents of
optstr, either an initialized, reset or updated version of the optional parameter array.
- 3: – IntegerInput
-
On entry: the length of the array
iopts.
Constraint:
unless otherwise stated in the documentation for a specific, supported, problem solving routine,.
- 4: – Real (Kind=nag_wp) arrayCommunication Array
-
On entry: optional parameter array.
If
optstr has the form
, the contents of
opts need not be set.
Otherwise,
opts must not have been altered since the last call to
e05zkf,
e05zlf or the selected problem solving routine.
On exit: dependent on the contents of
optstr, either an initialized, reset or updated version of the optional parameter array.
- 5: – IntegerInput
-
On entry: the length of the array
opts.
Constraint:
unless otherwise stated in the documentation for a specific, supported, problem solving routine,.
- 6: – IntegerInput/Output
-
On entry:
ifail must be set to
,
. If you are unfamiliar with this argument you should refer to
Section 3.4 in How to Use the NAG Library and its Documentation for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this argument, the recommended value is
.
When the value is used it is essential to test the value of ifail on exit.
On exit:
unless the routine detects an error or a warning has been flagged (see
Section 6).
6
Error Indicators and Warnings
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
Errors or warnings detected by the routine:
-
On entry, the optional parameter in
optstr was not recognized:
.
-
On entry, the expected delimiter ‘
’ was not found in
optstr:
.
-
On entry, could not convert the specified optval to an integer: .
On entry, could not convert the specified optval to a real: .
The
option in
optstr is associated with a numerical value. However, the
optval,
, present in
optstr could not be fully interpreted.
-
On entry, the
option in
optstr has been detected as
Initialize, however the
optval,
, associated with
optstr has not been recognized as a valid routine name.
-
On entry, the optval supplied for the integer optional parameter is not valid.
.
-
On entry, the optval supplied for the real optional parameter is not valid.
.
-
On entry, the optional parameter in
optstr was not recognized:
.
On entry, the optval supplied for the character optional parameter is not valid.
.
-
On entry, either the option arrays have not been initialized or they have been corrupted.
On entry, the optional parameter in
optstr was not recognized:
.
-
On entry, .
Constraint: .
-
On entry, .
Constraint: .
An unexpected error has been triggered by this routine. Please
contact
NAG.
See
Section 3.9 in How to Use the NAG Library and its Documentation for further information.
Your licence key may have expired or may not have been installed correctly.
See
Section 3.8 in How to Use the NAG Library and its Documentation for further information.
Dynamic memory allocation failed.
See
Section 3.7 in How to Use the NAG Library and its Documentation for further information.
7
Accuracy
Not applicable.
8
Parallelism and Performance
e05zkf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
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.
Some options have default values which are problem dependent. For example the option
Maximum Iterations Completed for
e05saf has the default value
. If options such as this are set, they may only be set to constant values. If such an option is reset to its DEFAULT value its dependence on the specific problem will be restored.
10
Example
See the example programs associated with the problem solving routine you wish to use for a demonstration of how to use e05zkf to initialize option arrays and set options.