Deprecated Features and Renamed Routines

Automatic Workspace Allocation

FORTRAN subfunctions 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 compatiblity 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 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 PERMA to permute rows or columns of a matrix. This routine requires workspace equal to the number of columns, which in this example is too large. (Note that the work vector RWKSP must also provide extra space for bookkeeping.)

 

USE_PERMA_INT

! Specifications for local variables

INTEGER NRA, NCA, LDA, IPERMU(6000), IPATH

REAL A(2,6000)

! Specifications for subroutines

!

NRA = 2

NCA = 6000

LDA = 2

! Initialize permutation index

DO 10 I = 1, NCA

IPERMU(I) = NCA + 1 - I

10 CONTINUE

IPATH = 2

CALL PERMA (A, IPERMU, A, IPATH=IPATH)

END

Output

 

*** TERMINAL ERROR 10 from PERMA. 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(6018)

*** CALL IWKIN(6018)

 

*** TERMINAL ERROR 10 from PERMA. Workspace allocation was based on NCA =

*** 6000.

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), so 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 have been deprecated. 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 may 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.

 

CZADD

DE2LRH

DNCONF

E3CRG

CZINI

DE2LSB

DNCONG

E4CRG

CZMUL

DE3CRG

E2ASF

E4ESF

CZSTO

DE3CRH

E2AHF

E5CRG

DE2AHF

DE3LSF

E2BHF

E7CRG

DE2ASF

DE4CRG

E2BSB

G2CCG

DE2BHF

DE4ESF

E2BSF

G2CRG

DE2BSB

DE5CRG

E2CCG

G2LCG

DE2BSF

DE7CRG

E2CCH

G2LRG

DE2CCG

DG2CCG

E2CHF

G3CCG

DE2CCH

DG2CRG

E2CRG

G4CCG

DE2CHF

DG2DF

E2CRH

G5CCG

DE2CRG

DG2IND

E2CSB

G7CRG

DE2CRH

DG2LCG

E2EHF

N0ONF

DE2CSB

DG2LRG

E2ESB

NCONF

DE2EHF

DG3CCG

E2FHF

NCONG

DE2ESB

DG3DF

E2FSB

SDADD

DE2FHF

DG4CCG

E2FSF

SDINI

DE2FSB

DG5CCG

E2LCG

SDMUL

DE2FSF

DG7CRG

E2LCH

SDSTO

DE2LCG

DHOUAP

E2LHF

SHOUAP

DE2LCH

DHOUTR

E2LRG

SHOUTR

DE2LHF

DIVPBS

E2LRH

 

DE2LRG

DN0ONF

E2LSB

 

The following routines have been renamed due to naming conflicts with other software manufacturers.

CTIME replaced with CPSEC
DTIME replaced with TIMDY
PAGE replaced with PGOPT