FORTRAN Reference Manual

Statements
FORTRAN Reference Manual528615-001
7-17
CHECKPOINT Statement
checkpoint large amounts of data to the backup process. For more information on
this usage, see Section 16, Fault-Tolerant Programming.
CPLIST specifier
The CPLIST specifier enables you to checkpoint changes to saved messages. You
must provide a complete checkpoint list in the form of an INTEGER*4 array for
cplist. The first element is a header for the list and each remaining element is a
single entry in the checkpoint list. The following statements declare a CPLIST for
programs compiled with ENV OLD in effect:
INTEGER*4 cplist1 (0:100)
INTEGER*2 cpinit1 (2)
EQUIVALENCE (cplist1,cpinit1)
DATA cpinit1/ 100, 0 /
Each entry in the CPLIST1 array contains one doubleword. If you compile your
program with ENV COMMON in effect, each entry is 2.5 doublewords. You must
change the upper bound of the CPLIST1 array and the first entry in the DATA
statement to specify enough space for the wider entries used when you specify
ENV COMMON. If you generalize the preceding statements to:
INTEGER*4 cplist1 (0:n)
INTEGER*2 cpinit1 (2)
EQUIVALENCE (cplist1,cpinit1)
DATA cpinit1/ n, 0 /
the following formula determines the value of N:
n = INT(( 2.5 * number_cplist_entries ) + .5 )
The following lines show the code you must enter to have the same number of
entries, 100, with ENV COMMON in effect as you do with ENV OLD in effect:
INTEGER*4 cplist1 (0:250)
INTEGER*2 cpinit1 (2)
EQUIVALENCE (cplist1,cpinit1)
DATA cpinit1/ 250, 0 /
Note that you must change the upper bound of the CPLIST1 array as well as the
value stored in CPINIT1(1) by the DATA statement, which specifies the number of
doubleword entries in the array.
CPLIST1 is the checkpoint list and the cplist parameter for the routine. The
checkpoint list contains one header entry (CPINIT1) and one hundred saved
message checkpoint entries. The required number of INTEGER*4 array elements
depends on the number of operations the list must record prior to checkpoint. For
additional information, see the Checkpoint Considerations for Saved Message
Utility Routines on page 15-28.