I've managed to isolate the problem to a very small piece of code.
The original version:
program omega
implicit none
integer,parameter :: Nx=10
double precision :: pi
integer px
pi = 4.0D0*DATAN(1.0D0)
px = Nx - 1
write(*,*)cos(pi*(6-1)/(px))
write(*,*)cos(pi*(6-1)/(Nx-1))...
I tried that, but the same thing happens. Turning back to using INTEGER,PARAMETER's instead of parameters from a file solved the trick, but I do want these parameters in a file!
Thanks for your comment! I figured out what is the reason of my problem, but I do not know how to solve it. This post can be somewhat long, but it takes me sometime to explain what the problem is, sorry for that.
Basically, the first version of the program was written something like this...
I'm currently busy refactoring a script i got from somebody and a really strange thing happens. At a certain point in the code, a simple calculation is made. In order to check if the result and input is the same, I wrote the following in both versions...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.