[f2py] fortran module crahes from time to time
volker
lorrmann at physik.uni-wuerzburg.de
Tue Nov 13 10:37:33 EET 2007
Marek Wojciechowski <mwojc <at> p.lodz.pl> writes:
>
> Dnia poniedziałek 12 listopad 2007, volker napisał:
> > FORTRAN CODE
> >
> > subroutine chsign(ar_in,ar_out,n,i)
> > integer n,i,ar_out(0:n-1)
> > real*8 ar_in(0:n-1)
> > Cf2py intent(in) ar_in
> > Cf2py intent(out) ar_out
> > do i=0,n-1
> > if ((ar_in(i).lt.0).and.(ar_in(i+1).gt.0)) then
> > ar_out(i+1)=1
> > .....
>
> Normally such a crashes means you have errors in fortran code, so write
> programs carefully...
>
Thanks for that tip. I've looked over the fortan code and found the mistake.
ar_out is of size n-1 and i runs up to n+1 too, so ar_out(i+1) is out of size.
Thanks
volker
More information about the f2py-users
mailing list