As stated in a previous ppost, my old FORTRAN code has a lot of COMMON statements; or did have.
I have successfully removed most of these simply by defining the variables within an included file (will be a module, but not yet). Where possible, I have included these within the parameters of the subroutine, thus reducing the number of globals - which is still insane!
Anyway, I have 1 remaining COMMON block that is used within 2 subroutines…
common / rates / rpp, rhe3he3, rcno, r3a, r12a, r16a, rcc, &
& rlip, xpd, xpc, xpn, xpo, xpp23
I have checked and the variables within the common block only appear within the relevant two subroutines and the two common statements within both routines are identical.
I have created the same variables within the include file…
double precision :: rpp, rhe3he3, rcno, r3a, r12a, r16a, rcc
double precision :: rlip, xpd, xpc, xpn, xpo, xpp23
Yet, the code now generates incorrect data. The code runs fine but the results are wrong.
So, the variable values are not remaining the same (since the common block is the only part of the system I am ruling out at present).
What am I missing?