# NAG Library Routine Document

## 1Purpose

e04wbf is used to initialize routines e04dga, e04mfa, e04nca, e04nfa, e04nka, e04uca, e04ufa, e04uga and e04usa.

## 2Specification

Fortran Interface
 Subroutine e04wbf (
 Integer, Intent (In) :: lcwsav, llwsav, liwsav, lrwsav Integer, Intent (Inout) :: ifail Integer, Intent (Out) :: iwsav(liwsav) Real (Kind=nag_wp), Intent (Out) :: rwsav(lrwsav) Logical, Intent (Out) :: lwsav(llwsav) Character (*), Intent (In) :: rname Character (80), Intent (Out) :: cwsav(lcwsav)
#include nagmk26.h
 void e04wbf_ ( const char *rname, char cwsav[], const Integer *lcwsav, logical lwsav[], const Integer *llwsav, Integer iwsav[], const Integer *liwsav, double rwsav[], const Integer *lrwsav, Integer *ifail, const Charlen length_rname, const Charlen length_cwsav)

## 3Description

e04wbf initializes some or all of the arrays cwsav, lwsav, iwsav and rwsav for the routine specified by rname, and any associated option setting routines.

None.

## 5Arguments

1:     $\mathbf{rname}$ – Character(*)Input
On entry: the name of the routine to be initialized. The name may be abbreviated to the first 5 letters of the ‘short’ name, or by omitting the nagf_ or opt_ prefixes of the ‘long’ name.
Constraint: rname must be the name of one of the routines initialized by e04wbf.
2:     $\mathbf{cwsav}\left({\mathbf{lcwsav}}\right)$ – Character(80) arrayCommunication Array
3:     $\mathbf{lcwsav}$ – IntegerInput
On entry: the dimension of the array cwsav as declared in the (sub)program from which e04wbf is called.
Constraints:
• if ${\mathbf{rname}}=\text{'e04uf'}$ or $\text{'nlp1_rcomm'}$, ${\mathbf{lcwsav}}\ge 5$;
• otherwise ${\mathbf{lcwsav}}\ge 1$.
4:     $\mathbf{lwsav}\left({\mathbf{llwsav}}\right)$ – Logical arrayCommunication Array
5:     $\mathbf{llwsav}$ – IntegerInput
On entry: the dimension of the array lwsav as declared in the (sub)program from which e04wbf is called.
Constraints:
• if ${\mathbf{rname}}=\text{'e04nk'}$ or $\text{'qpconvex1_sparse_solve'}$, ${\mathbf{llwsav}}\ge 20$;
• if ${\mathbf{rname}}=\text{'e04ug'}$ or $\text{'nlp1_sparse_solve'}$, ${\mathbf{llwsav}}\ge 20$;
• otherwise ${\mathbf{llwsav}}\ge 120$.
6:     $\mathbf{iwsav}\left({\mathbf{liwsav}}\right)$ – Integer arrayCommunication Array
7:     $\mathbf{liwsav}$ – IntegerInput
On entry: the dimension of the array iwsav as declared in the (sub)program from which e04wbf is called.
Constraints:
• if ${\mathbf{rname}}=\text{'e04nk'}$ or $\text{'qpconvex1_sparse_solve'}$, ${\mathbf{liwsav}}\ge 380$;
• if ${\mathbf{rname}}=\text{'e04ug'}$ or $\text{'nlp1_sparse_solve'}$, ${\mathbf{liwsav}}\ge 550$;
• otherwise ${\mathbf{liwsav}}\ge 610$.
8:     $\mathbf{rwsav}\left({\mathbf{lrwsav}}\right)$ – Real (Kind=nag_wp) arrayCommunication Array
9:     $\mathbf{lrwsav}$ – IntegerInput
On entry: the dimension of the array rwsav as declared in the (sub)program from which e04wbf is called.
Constraints:
• if ${\mathbf{rname}}=\text{'e04nk'}$ or $\text{'qpconvex1_sparse_solve'}$, ${\mathbf{lrwsav}}\ge 285$;
• if ${\mathbf{rname}}=\text{'e04ug'}$ or $\text{'nlp1_sparse_solve'}$, ${\mathbf{lrwsav}}\ge 550$;
• otherwise ${\mathbf{lrwsav}}\ge 475$.
10:   $\mathbf{ifail}$ – IntegerInput/Output
On entry: ifail must be set to $0$, $-1\text{​ or ​}1$. 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 $-1\text{​ or ​}1$ is recommended. If the output of error messages is undesirable, then the value $1$ is recommended. Otherwise, if you are not familiar with this argument, the recommended value is $0$. When the value $-\mathbf{1}\text{​ 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$
The routine name supplied in rname is invalid
${\mathbf{ifail}}=2$
One or more of the workspace array lengths lcwsav, llwsav, liwsav or lrwsav is too small.
${\mathbf{ifail}}=-99$
See Section 3.9 in How to Use the NAG Library and its Documentation for further information.
${\mathbf{ifail}}=-399$
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.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.
See Section 3.7 in How to Use the NAG Library and its Documentation for further information.

Not applicable.

## 8Parallelism and Performance

e04wbf is not threaded in any implementation.