David Buchan
10-30-2004, 12:00 PM
Hi guys,
I have been using stifbs, driven by odeint, to solve a set of stiff equations. I wrote the program on AIX in FORTRAN and it compiles (XLF 8.1) and runs great.
But recently, I tried to port the code over to a SUN station, and although it compiles and runs, the behavior in stifbs is somewhat different.
What I see is, stifbs does not increase the stepsize on the SUN station as it does on the AIX platform. Also, the SUN version ends up running odeint up to 10000 iterations (MAXSTP) and I get a PAUSE: too many steps in odeint. These are likely related phenomena.
My equations are extremely stiff because the first and last equation differ in rates by many many orders of magnitude.
Also, and this may be part of the problem, I put everything into real(16), because I'm carrying a lot of digits. I did put all the exponents as 'Q' instead of 'E' and converted all the intrinsic functions over to real(16).
This is likely not enough information for anyone to suggest a fix, but does anybody have some idea where to look?
I checked for differences in conditional precedences because the F77 code given in NR has implicit precedences - especially in stifbs where it decides on step changes. I put in all the brackets so there is no doubt that the conditionals are being evaluated in the same order on the AIX and SUN platforms.
*** addendum to post ***
We did try dialling down the aggressiveness of the SUN's FORTRAN optimizer, but to no avail.
Also, my book says it's correct to V2.10, but I think my NR disk is 2.08. I don't believe there are any corrections relevant to me though.
Finally, I'm using rzextr instead of pzextr - I have a fondness for rational approximation.
*** end of addendum ***
Thanks,
Dave Buchan
I have been using stifbs, driven by odeint, to solve a set of stiff equations. I wrote the program on AIX in FORTRAN and it compiles (XLF 8.1) and runs great.
But recently, I tried to port the code over to a SUN station, and although it compiles and runs, the behavior in stifbs is somewhat different.
What I see is, stifbs does not increase the stepsize on the SUN station as it does on the AIX platform. Also, the SUN version ends up running odeint up to 10000 iterations (MAXSTP) and I get a PAUSE: too many steps in odeint. These are likely related phenomena.
My equations are extremely stiff because the first and last equation differ in rates by many many orders of magnitude.
Also, and this may be part of the problem, I put everything into real(16), because I'm carrying a lot of digits. I did put all the exponents as 'Q' instead of 'E' and converted all the intrinsic functions over to real(16).
This is likely not enough information for anyone to suggest a fix, but does anybody have some idea where to look?
I checked for differences in conditional precedences because the F77 code given in NR has implicit precedences - especially in stifbs where it decides on step changes. I put in all the brackets so there is no doubt that the conditionals are being evaluated in the same order on the AIX and SUN platforms.
*** addendum to post ***
We did try dialling down the aggressiveness of the SUN's FORTRAN optimizer, but to no avail.
Also, my book says it's correct to V2.10, but I think my NR disk is 2.08. I don't believe there are any corrections relevant to me though.
Finally, I'm using rzextr instead of pzextr - I have a fondness for rational approximation.
*** end of addendum ***
Thanks,
Dave Buchan