From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,9b7034837b3fc85a,start X-Google-Attributes: gid1164f8,public X-Google-Thread: 1094ba,9b7034837b3fc85a,start X-Google-Attributes: gid1094ba,public From: gt9271a@prism.gatech.edu (William Steve Shepard) Subject: F77, Errors when Optimizing on Alpha Date: 1995/08/11 Message-ID: <40g89i$h27@acmex.gatech.edu>#1/1 X-Deja-AN: 107977741 organization: Georgia Institute of Technology keywords: dec, alpha, fortran, f77, error followup-to: poster newsgroups: comp.lang.fortran,comp.sys.dec We are using several codes that read and write data (to the disk) numerous times so that a set of original data can be reused. We are experiencing an interesting problem with these codes. If the code is compiled using the standard F77 command, the results obtained when runing the program are NOT ALWAYS CORRECT. In one code, the results are correct with one loop of execution and incorrect on the next loop. In this same code, the results are repeatable. That is, the Nth loop always gives the same, incorrect, answer. If the code is compiled with OPTIMIZATION OFF (using -g option), the results obtained when running the program are ALWAYS CORRECT. To check this problem further, another code (written by a different person) was even separated into a mathematical section and a read/write section. When run together, the codes gave the correct answer only when the read/write section was NOT optimized. Optimizing the mathematical section did not affect the results. So, it appears that when the optimized code is used, the read/write statements are not always executing. We are currently running: Dec Fortran for OSF/1 v3.6 on an Alpha machine. Has anyone else experienced this problem? Does anyone have any ideas what could be happening? Please send replies to: shepard@lab11.me.gatech.edu Cross-Posted in: comp.lang.fortran comp.sys.dec Thanks in Advance! Steve Shepard -- ********************************************************* Steve Shepard shepard@lab11.me.gatech.edu A Ramblin' Wreck from Georgia Tech And a Helluva Engineer