Place all of the relevant variables that need to
be checkpointed in a COMMON block. EQUIVALENCE that
COMMON block to a large array, and place the lot in an
include file that is included into every relevant subroutine:
REAL*8 a,b,x(N),Y(N),Z(N),model(10*N)
COMMON /modelcom/ a,b,x,y,z
EQUIVALENCE a,model
The checkpoint routine simply writes model to a file, and
the restart routine reads it (as a binary not text file):
SUBROUTINE checkpoint SUBROUTINE restart
INCLUDE 'model.inc' INCLUDE 'model.inc'
WRITE (8) model READ (8) model
END END