[f2py] problem with maximum allowed size

William Henney w.henney at astrosmo.unam.mx
Fri Nov 30 18:09:08 EET 2007


Hi Martinho

On 11/30/07, Martinho MA <mma at ua.pt> wrote:
> Ok,
> But this subroutine was just an exmple, real one is more like:
>
>     subroutine slicez(s,L,M,N)
>     integer L,M,N
>     real A(L,M,N), s(L,M)
> Cf2py intent(out) s
>
> c   some operations with A producing s
>     ...
>
>     print*, N
>     end
>
>
> So, when I put this inside a  fortran program it runs without problem !

I'm just guessing here, but perhaps python is setting the stack size
to a smaller value than when you run the standalone fortran program.

> Besides, a 3D array with shape 200,200,50 is nothing !

Well, 10MB isn't much compared with the size of main memory, but it
might be bigger than your cache...

> So, if it runs
> inside my program, is it must be something to do with f2py.

Perhaps

> About allocated arrays... I am using fortran 77, so I cannot use them.

You are using automatic arrays (such as your A), which I don't think
are standard fortran 77. Modern fortran is entirely backward
compatible with (standard) fortran 77 and there are free compilers
available (e.g, gfortran). What are your reasons for not moving on?
1977 was a long time ago now....

> The funniest thing is that using ulimit ... works :)
>

That's good

Cheers

Will

-- 

  Dr William Henney, Centro de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia



More information about the f2py-users mailing list