Defects Index | Documentation Table of Contents
99/07/13 DEFECT IN PROGRAM tdsolve
SYMPTOM: Program is unable to iterate to a solution on the HP workstations.
It also complains of unmatched satellites.
PROBLEM: tdsolve is a C program which reads a binary file created with
a Fortran program. On the HP's, PC/NT's, Linux and Suns, a
binary file written with Fortran has four bytes added to the
start and end of each line giving the length of that line in
bytes (excluding the start/end four tags). When tdsolve was
initially ported, the HP's created one exception to this rule
for Fortran binary files - a line of zero length only had
a "leading" four byte tag; all other platforms continued to
use two (start and end) tags. Of course, for a zero length
line, all bytes in the tags were zero and no bytes appeared
between the tags. Recently, (and I don't know when - MSS)
HP Fortran start putting two tags rather than one for zero
length binary lines.
In tdsolve, conditional compilation statements were created
to handle the HP binary file case as well as other platforms.
Therefore, tdsolve expected only one length tag for zero length
lines, not two. This cause a misalignment on subsequent
reading of the file.
CORRECTION: tdsolve.c: comment out the conditional compilation instructions
so that the HP's files are now handled identically to other
FOUND BY: M Schenewerk 99/06/25
FIXED BY: M Schenewerk 99/06/25
July 13, 1999