********> bugfix.64 Correction Author: David A. Pearlman Correction Date: 02/20/96 Programs: GIBBS Severity: Slight Problem: An attempt to restart a Gibbs simulation can fail with an "unexpected character" message when one is attempting to restart a simulation that ran more than 999,999 MD steps. The "unexpected character" error arises from an overflowed field in the restart file. A simple workaround is available (see below). Note that this fix trivially modifies the 'restrt' format. Affects: On most computers, the simulation will immediately halt. There is no other effect, because the variable that should appear in the overflow field is not subsequently used. Cause: A variable that contains the accumuated step total was being written to (and read from )the restart file in (I6) format. Since the total number of steps may exceed the capacity of this format, an error can occur. Fix: Make the following changes to file slwadj.f: ------------------------------------------------------------------------------ *** OLD slwadj.f --- NEW slwadj.f *************** *** 610,616 **** C C Read variables for the PRTST2 block: C ! READ(NF,END=200) IONCE4,ISTORC,NSTPSV READ(NF,END=200) DSTOT,DETOT,RLM,TIINTS C C ----------------- --- 610,616 ---- C C Read variables for the PRTST2 block: C ! READ(NF,END=200) IONCE4,ISTORC READ(NF,END=200) DSTOT,DETOT,RLM,TIINTS C C ----------------- *************** *** 648,654 **** C C Read variables for the PRTST2 block: C ! READ(NF,9140,END=200) IONCE4,ISTORC,NSTPSV READ(NF,9110,END=200) DSTOT,DETOT,RLM,TIINTS END IF C --- 648,654 ---- C C Read variables for the PRTST2 block: C ! READ(NF,9140,END=200) IONCE4,ISTORC READ(NF,9110,END=200) DSTOT,DETOT,RLM,TIINTS END IF C *************** *** 836,842 **** C C Write variables for the PRTST2 block: C ! WRITE(NF) IONCE4,ISTORC,NSTPSV WRITE(NF) DSTOT,DETOT,RLM,TIINTS C C ----------------- --- 836,842 ---- C C Write variables for the PRTST2 block: C ! WRITE(NF) IONCE4,ISTORC WRITE(NF) DSTOT,DETOT,RLM,TIINTS C C ----------------- *************** *** 868,874 **** C C Write variables for the PRTST2 block: C ! WRITE(NF,9140) IONCE4,ISTORC,NSTPSV WRITE(NF,9110) DSTOT,DETOT,RLM,TIINTS END IF RETURN --- 868,874 ---- C C Write variables for the PRTST2 block: C ! WRITE(NF,9140) IONCE4,ISTORC WRITE(NF,9110) DSTOT,DETOT,RLM,TIINTS END IF RETURN ------------------------------------------------------------------------------ Temporary workarounds: A simple workaround is available. Simply modify the overflowed field in the restart file (typically a six character-long field filled with "*"'s), replacing it with any arbitrary integer. E.g. "******" -> "000000". The value read from this field is not subsequently used, so it makes no difference what value is in the field. Routines affected: GIBBS Routine GETDYS in file ...amber4/src/gibbs/slwadj.f GIBBS Routine WRTDYS in file ...amber4/src/gibbs/slwadj.f --