[Rd] gfortran optimization problems
Mike Prager
mike.prager at noaa.gov
Mon Nov 3 17:11:03 CET 2008
Dave Roberts <droberts at montana.edu> wrote:
> I have a routine in package labdsv that calls a FORTRAN subroutine.
> Recently, I was informed that it sometimes gives different results on a
> PC and Mac, and that the PC version is clearly wrong. I tested it on
> linux (because I don't have a PC), and I get the same (incorrect)
> behavior as the PC.
>
> Simply by inserting debug WRITE statements in the FORTRAN I would get
> different, and correct, results, so I assumed it was an optimization
> error.
>
>[...]
Not to prejudge the case, but such sometime errors are classic
symptoms of access violations in Fortran, such as accessing a
variable whose value has not been set, exceeding array bounds,
or something similar. The usual suggestion is to recompile the
Fortran with ALL error-checking options turned on and see if
such a bug turns up.
--
Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.
More information about the R-devel
mailing list