[R-SIG-Mac] gfortran bug?

Andreas Noack Jensen andreas.noack.jensen at econ.ku.dk
Tue Apr 27 21:14:47 CEST 2010


Great. There it was. Thank you so much for helping the Fortran amateur.

Andreas


Den 27/04/10 14.43 skrev "Berend Hasselman" <bhh at xs4all.nl> følgende:

> 
> On 27-04-2010, at 20:28, Andreas Noack Jensen wrote:
> 
>> Thank you so much for looking at it. Initially my code was in the "free"
>> F95 format but partly because of the error and partly because of portability
>> concerns I chose to translate it to strict F77 even thought it is ugly and
>> annoying with the line width limit.
>> 
>> Indeed I think something is going wrong with the initial values but I cannot
>> figure out why. Maybe because of missing Fortran skills but I am puzzled
>> because the code works fine on Windows and Linux.
>> 
> 
> Indeed, that is what I have found. See below.
> 
>> I think the "-mtune=core2" problem has disappeared in the latest 4.2.3
>> gfortran at r.research because I had the error in the beginning but after
>> reinstall of gfortran it was gone (right now, however,  I am on gfortran
>> 4.2.4 aka gcc 4.2.1).
>> 
>> Thank you once again and hope some new ideas to isolate the problem will
>> appear.
> 
> 
> The error is in the fortran line
> 
>      double precision, intent(in) :: coef(ndim(1),ndim(2),ndim(3)),
> init(ndim(3),ndim(nl(2)))
> 
> The dimensions of init are wrong.
> The line should read:
> 
>      double precision, intent(in) :: coef(ndim(1),ndim(2),ndim(3)),
> init(ndim(3),nl(2))
> 
> I have attached the corrected rmfilter.f90, a slightly modified rmfilter.R
> that I used to print various stuff
> the test1.R and the output.
> 
> In the test case your code declares init(2,2)
> In the corrected code it is declared as init(2,3)
> The actual dimension is init(2,3)
> 
> Berend
> 
> 
> 
> 



More information about the R-SIG-Mac mailing list