Silverfrost Forums

Welcome to our forums

fortran 95

15 Apr 2010 9:22 #6296

I have made a comprehensive conversion of a mixed fortran 4/77 simulation program containing heaps of spaghetti code, to fortran 95. The code has about 132 subroutines and 30 common blocks which I have converted to modules. I am able to compile and debug both the old and new in silverfrost ftn95 anf ftn95 express, so I can just about do a to do a comparitive debug. The two programs perform an initial trim to a balanced system state with nearly identical results, but in the ft95 code, despite the fact that i can write out local variables, when i inspect the same variables using the visualdisplay with the mouse they are usually all zeros. One of the reasons for upgrading the code was to make it portable and compileable opn any machine/compiler. e.g Intel visual fortran as well as silverfrost, without any special compiler options e.g global save and zeroise, and elimination of undefined variables by initialising in the modules. There are still code errors but is the initialisation to zero in the variable declaration having some effect of the debugger output ? Can anybody help ?

15 Apr 2010 9:36 #6298

If you remove /SAVE and /ZEROISE from the command line then /CHECKMATE should reveal all of the undefined variables at runtime.

Perhaps you should remove /SAVE later because this could be necessary for a different reason. i.e. some of the local variables may need to persist thoughout the runtime.

15 Apr 2010 12:22 #6300

I'm debugging with the .net option in silverefrost express and I set the global zeroise and save options off in the project properties/numerical options but it makes no difference .. In fact if I compile and debug with fn95 in plato on another machine the variables are visible so perhaps its a visual studio bug. All very frustrating.

18 Apr 2010 12:22 #6307

Have you tried /undef what Paul suggests and i'd back him? That's the mandatory step before doing or guessing for anything else.

Please login to reply.