FNLSpecFunc : Reference Material : Deprecated Features and Deleted Routines
Deprecated Features and Deleted Routines
Automatic Workspace Allocation
FORTRAN subroutines that work with arrays as input and output often require extra arrays for use as workspace while doing computations or moving around data. IMSL routines generally do not require the user explicitly to allocate such arrays for use as workspace. On most systems the workspace allocation is handled transparently. The only limitation is the actual amount of memory available on the system.
On some systems the workspace is allocated out of a stack that is passed as a FORTRAN array in a named common block WORKSP. A very similar use of a workspace stack is described by Fox et al. (1978, pages 116121). (For compatibility with older versions of the IMSL Libraries, space is allocated from the COMMON block, if possible.)
The arrays for workspace appear as arguments in lower‑level routines. For example, the IMSL Math routine LSARG (in Chapter 1, “Linear Systems”), which solves systems of linear equations, needs arrays for workspace. LSARG allocates arrays from the common area, and passes them to the lower‑level routine L2ARG which does the computations. In the “Comments” section of the documentation for LSARG, the amount of workspace is noted and the call to L2ARG is described. This scheme for using lower‑level routines is followed throughout the IMSL Libraries. The names of these routines have a “2” in the second position (or in the third position in double precision routines having a “D” prefix). The user can provide workspace explicitly and call directly the “2‑level” routine, which is documented along with the main routine. In a very few cases, the 2‑level routine allows additional options that the main routine does not allow.
Prior to returning to the calling program, a routine that allocates workspace generally deallocates that space so that it becomes available for use in other routines.
Changing the Amount of Space Allocated
This section is relevant only to those systems on which the transparent workspace allocator is not available.
By default, the total amount of space allocated in the common area for storage of numeric data is 5000 numeric storage units. (A numeric storage unit is the amount of space required to store an integer or a real number. By comparison, a double precision unit is twice this amount. Therefore, the total amount of space allocated in the common area for storage of numeric data is 2500 double precision units.) This space is allocated as needed for INTEGER, REAL, or other numeric data. For larger problems in which the default amount of workspace is insufficient, the user can change the allocation by supplying the FORTRAN statements to define the array in the named common block and by informing the IMSL workspace allocation system of the new size of the common array. To request 7000 units, the statements are
COMMON /WORKSP/ RWKSP
REAL RWKSP(7000)
CALL IWKIN(7000)
If an IMSL routine attempts to allocate workspace in excess of the amount available in the common stack, the routine issues a fatal error message that indicates how much space is needed and prints statements like those above to guide the user in allocating the necessary amount. The program below uses IMSL routine BSJS (See Chapter 6, “Bessel Functions” of this manual) to illustrate this feature.
This routine requires workspace that is just larger than twice the number of function values requested.
INTEGER N
REAL BS(10000), X, XNU
EXTERNAL BSJS
! Set Parameters
XNU = .5
X = 1.
N = 6000
CALL BSJS (XNU, X, N, BS)
END
Output
*** TERMINAL ERROR from BSJS. Insufficient workspace for
*** current allocation(s). Correct by calling
*** IWKIN from main program with the three
*** following statements: (REGARDLESS OF
*** PRECISION)
*** COMMON /WORKSP/ RWKSP
*** REAL RWKSP(12018)
*** CALL IWKIN(12018)
*** TERMINAL ERROR from BSJS. The workspace requirement is
*** based on N =6000.
STOP
In most cases, the amount of workspace is dependent on the parameters of the problem so the amount needed is known exactly. In a few cases, however, the amount of workspace is dependent on the data (for example, if it is necessary to count all of the unique values in a vector). Thus, the IMSL routine cannot tell in advance exactly how much workspace is needed. In such cases, the error message printed is an estimate of the amount of space required.
Character Workspace
Since character arrays cannot be equivalenced with numeric arrays, a separate named common block WKSPCH is provided for character workspace. In most respects, this stack is managed in the same way as the numeric stack. The default size of the character workspace is 2000 character units. (A character unit is the amount of space required to store one character.) The routine analogous to IWKIN used to change the default allocation is IWKCIN.
The routines in the following list are being deprecated in Version 2.0 of MATH/LIBRARY Special Functions. A deprecated routine is one that is no longer used by anything in the library but is being included in the product for those users who may be currently referencing it in their application. However, any future versions of MATH/LIBRARY Special Functions will not include these routines. If any of these routines are being called within an application, it is recommended that you change your code or retain the deprecated routine before replacing this library with the next version. Most of these routines were called by users only when they needed to set up their own workspace. Thus, the impact of these changes should be limited.
G2DF
G2IN
G3DF
The following specific FORTRAN intrinsic functions are no longer supplied by IMSL. They can all be found in their manufacturer’s FORTRAN runtime libraries. If any change must be made to the user’s application as a result of their removal from the IMSL Libraries, it is limited to the redeclaration of the function from “external” to “intrinsic.” Argument lists and results should be identical.
ACOS
CEXP
DATAN2
DSQRT
AINT
CLOG
DCOS
DTAN
ALOG
COS
DCOSH
DTANH
ALOG10
COSH
DEXP
EXP
ASIN
CSIN
DINT
SIN
ATAN
CSQRT
DLOG
SINH
ATAN2
DACOS
DLOG10
SQRT
CABS
DASIN
DSIN
TAN
CCOS
DATAN
DSINH
TANH