  Code execution inconsistencies? 
 The Question is:
 
My colleague will probably be sending you an E-mail about
this same problem, soon, but I can't wait.
 
She has had two cases of Fortran code executing differently
on different machines.  Our system involves a dozen tasks
communicating with mailboxes, event flags, and a
global shared image.  The code that is executing differently
in both cases is code we have used without incidence for
ten years or so.
 
  In one case, two lines evaluated expressions,
and then stored their results in two differnet varialbes in a
local common.  The second line, when executed, changed the
value of the variable in the previous line.  By switching the
order of the two lines in the source code, the
problem ended.
 
  In the other case, an IF combining two expressions with an
AND was evaluating as TRUE all of a sudden, even
though other programs linked to the same shared region
did not see those variables as having changed in days.
By breaking the IF into two IF's, to simulate the AND,
the problem seemed to go away.  We compared the assembly
listing of the two versions of the program, and they were
identical.  I assume it is not the code that is wrong,
but how it is executed.
 
  In both cases I think it must have to do with page swapping
or memory mapping at runtime.  The same code is running
differently at different times.  I have never in twenty years
of programming seen that happen!
 
  Please let me know if you have any ideas!
 
  Thank you.    Steve Krimbill   616-348-7148
                skrimbill@jerviswebb.com
 
 
 
 The Answer is:
 
  The Wizard is experienced with OpenVMS code that has been executing for
  two decades without incident -- one hunk of this code was recently found
  to contain a latent "day one" bug.
 
  Please contact the customer support center for assistance with this
  problem -- there is insufficient information provided here for the
  Wizard to determine a likely problem scenario.  Expect to be asked for
  an example of the code that can reproduce the problem, as well as for
  the version(s) of Fortran in use, as well as for the OpenVMS platforms
  involved.
 
  Also please see the existing discussion of "Debugging synchronization
  problems? (SMP)" here in Ask The Wizard as a starting point for working
  through the code to resolve this.
