From: dpb on 6 Jul 2010 08:27 Lynn McGuire wrote: >> Oh, something just came to me...the statement that in particular >> you initialized the array indices. W/O that and /NOSAVE were you >> getting floating point errors on the integer conversion, perhaps? > > Nope. The integer variables that were used to build the array indices > had random values in them. Generally huge random numbers that caused > the program to crash immediately when that code was hit. One of them was: > > NOUT = IVDY(NWOUT).I > IF (NOUT .GT. MAXOUT) MAXOUT = NOUT > > where the maxout initialization code was jumped over so it had a random > value of something like 101,456,999 and nout was equal to 1, 2 or 3. I > put a maxout=0 at the beginning of the subroutine and all was OK. .... That's the kind of thing I was thinking about; just badly written... I think the option others have suggested of alternate compilers to produce warnings on at least some of these items would be beneficial in the process rather than relying on the crashes to find them. --
From: Lynn McGuire on 6 Jul 2010 15:23 > Hmmm....which OS is that on? One Windows 7 Ultimate x64 using Watcom 11.0c I get: C:\temp>wfl386 wat.for Watcom F77/32 Compile and Link Utility Version 11.0c Copyright by Sybase, Inc., and its subsidiaries, 1990, 2000. All rights reserved. Watcom is a trademark of Sybase, Inc. wfc386 wat.for Watcom FORTRAN 77/32 Optimizing Compiler Version 11.0c 2010/07/06 14:21:37 Copyright by Sybase, Inc., and its subsidiaries, 1984, 2000. All rights reserved. Watcom is a trademark of Sybase, Inc. wat.for: 10 statements, 67 bytes, 1 extensions, 0 warnings, 0 errors WATCOM Linker Version 11.0c Copyright by Sybase, Inc., and its subsidiaries, 1985, 2000. All rights reserved. Watcom is a trademark of Sybase, Inc. loading object files searching libraries creating a Windows NT character-mode executable C:\temp>wat 1.0141403E+033 1.0141403E+033 So the behavior of unsaved local variables has not changed between Watcom 11.0c and OW 1.9. Lynn
From: dpb on 6 Jul 2010 15:43 Lynn McGuire wrote: .... > So the behavior of unsaved local variables has not changed > between Watcom 11.0c and OW 1.9. Interesting, I'll have to keep that in mind (altho hopefully I have no code that relies on the behavior difference I'll not bet terribly heavy on it altho had no issues w/ the CVF port). :) I guess I was asleep at the switch on V11 updates as things were pretty inactive on the monitoring stuff at about that time so afaik there aren't any updates around to compare to. Anyway, sounds as though you're getting to be on your way... --
From: dpb on 6 Jul 2010 17:35 Lynn McGuire wrote: .... > ... makes smalltalk look easy ! oooh...there's a reminder of a past there! :) --
From: Lynn McGuire on 10 Jul 2010 12:50
> That's the kind of thing I was thinking about; just badly written... > > I think the option others have suggested of alternate compilers to produce warnings on at least some of these items would be > beneficial in the process rather than relying on the crashes to find them. I was thinking of a perl script to go through and init all local variable explicitely for all 5000 sibroutines. Kinda brute force but should get the job done. Thanks, Lynn |