TwirlySocrates
Technical User
Hi, I'm running numerical sediment chemistry models in FORTRAN.
I have a very bizarre problem:
I frequently debug my source code by using PRINT*, commands to write numbers to the console.
There's a couple of PRINT*, commands which, once removed from my source code, the program goes completely bonkers. Somehow, certain state variables are getting overwritten, throwing off the entire simulation.
In my mind, there's absolutely no reason that the presence or absence a PRINT*, command should alter my program's state variables ... right?
Would anyone have any idea what could cause this?
I'm using gFortran. Is it possible that the compiler is doing something strange?
I have a very bizarre problem:
I frequently debug my source code by using PRINT*, commands to write numbers to the console.
There's a couple of PRINT*, commands which, once removed from my source code, the program goes completely bonkers. Somehow, certain state variables are getting overwritten, throwing off the entire simulation.
In my mind, there's absolutely no reason that the presence or absence a PRINT*, command should alter my program's state variables ... right?
Would anyone have any idea what could cause this?
I'm using gFortran. Is it possible that the compiler is doing something strange?