Download Quantified Maximum Entropy MemSys5 Users` Manual

Transcript
9.3. SAVE AND RESTORE UTILITY: MESAVE AND MEREST
9.3
61
Save and restore utility: MESAVE and MEREST
This facility allows the user to stop a MemSys5 run after any iterate, and preserve outside the
package the information necessary to restart the run from exactly the stage at which it was halted.
It can also be used, for example, to store the information from a converged MEM5 run so that one
of the other routines, such as MOVIE5 or MASK5, can be run from a separate program.
To save the information from a run, the user should
CALL MESAVE
This will cause a call to the user-supplied routine USAVE which should be as follows:
SUBROUTINE USAVE(INTS,NINTS,REALS,NREALS)
INTEGER NINTS,NREALS,INTS(NINTS)
REAL REALS(NREALS)
The user is then required to save the contents of the arrays INTS, and REALS externally, perhaps
on disc. The values of the input arguments NINTS and NREALS will be approximately 9 and 33
respectively, depending on the MemSys5 version being used. The vector storage areas h3i (if DEF ≤
0), h21i, h22i (if Poisson or ACC ≤ 0), h23i (and h29i if using nonlinear response) must also be
preserved at this stage. The user will also need to save his storage addressing information in
/VPOINT/, as well as any other variables passed in COMMON blocks to the transform routines. A call
to MESAVE during a run has no effect on that run, which may be continued if desired.
In order to restart the package, the user should
CALL MEREST
This will result in a call to the user-supplied routine
SUBROUTINE UREST(INTS,NINTS,REALS,NREALS)
INTEGER NINTS,NREALS,INTS(NINTS)
REAL REALS(NREALS)
in which NINTS and NREALS are input arguments. The user should restore to the arrays INTS and
REALS the values supplied by USAVE. The contents of the vector storage areas listed above must
also be restored, along with /VPOINT/ and any other COMMON blocks.
Examples of USAVE and UREST are supplied with the package.
9.4
Error messages
All the errors detected within the MemSys5 package are deemed to be fatal, and so if an error is
encountered the package will STOP with one of the following error messages:
Illegal MEMRUN value
MEMRUN is an INTEGER switch for initialisation or continuation of a MEM5 run, and must be set
to a value between 1 and 4 inclusive when calling MEM5. See page 67.
Illegal METHOD(0) value
METHOD(0) is an INTEGER which determines the stopping criterion, and must be set to a value
between 1 and 4 inclusive when calling MEMSET. See page 65.