[Rd] A question on R memory management in .Fortran() calls under Windows

2005-09-09 Thread Simone Giannerini
Dear R community, I have a question on how R manages memory allocation in .Fortran() calls under Windows. In brief, apparently, it is not possible to allocate large matrices inside a Fortran subroutine unless you pass them as arguments. If you do not act in this way RGUI crashes with a stack ove

Re: [Rd] A question on R memory management in .Fortran() calls under Windows

2005-09-09 Thread Duncan Murdoch
On 9/9/2005 1:04 PM, Simone Giannerini wrote: > Dear R community, > > I have a question on how R manages memory allocation in .Fortran() > calls under Windows. > In brief, apparently, it is not possible to allocate large matrices > inside a Fortran subroutine > unless you pass them as arguments.

Re: [Rd] A question on R memory management in .Fortran() calls under Windows

2005-09-09 Thread Simon Urbanek
Simone, On Sep 9, 2005, at 1:04 PM, Simone Giannerini wrote: > Dear R community, > > I have a question on how R manages memory allocation in .Fortran() > calls under Windows. > In brief, apparently, it is not possible to allocate large matrices > inside a Fortran subroutine I suspect that th

Re: [Rd] A question on R memory management in .Fortran() calls under Windows

2005-09-12 Thread Simone Giannerini
Dear Duncan and Simon, many thanks for your helpful reply. > Duncan Murdoch wrote: > It looks as though your Fortran compiler is allocating the new matrix on > the stack. R doesn't give you a huge stack, and that's causing the > overflow. When you get R to do the allocation, it does it on the h

Re: [Rd] A question on R memory management in .Fortran() calls under Windows

2005-09-12 Thread Duncan Murdoch
Simone Giannerini wrote: > Dear Duncan and Simon, > > many thanks for your helpful reply. > > >>Duncan Murdoch wrote: >>It looks as though your Fortran compiler is allocating the new matrix on >>the stack. R doesn't give you a huge stack, and that's causing the >>overflow. When you get R to do

Re: [Rd] A question on R memory management in .Fortran() calls under Windows

2005-09-12 Thread Simon Urbanek
Simone, On Sep 12, 2005, at 4:30 AM, Simone Giannerini wrote: > yes, CVF allocates automatic objects on the stack and apparently > there is no way of changing it. Yes, that's bad news. > By the way, increasing the stack of the fortran process when > linking does not solve the problem In ge

Re: [Rd] A question on R memory management in .Fortran() calls under Windows

2005-09-12 Thread Simone Giannerini
> I think it's far from the best optimizing compiler, but the Fortran that > comes with MinGW (g77 currently in Windows) is the one used to build R, > so it's the one that will is most likely to work with it without > fiddling. But I don't use Fortran, so I don't know what else is available. > >

Re: [Rd] A question on R memory management in .Fortran() calls under Windows

2005-09-12 Thread Simone Giannerini
On 9/12/05, Simon Urbanek <[EMAIL PROTECTED]> wrote: > Simone, > > On Sep 12, 2005, at 4:30 AM, Simone Giannerini wrote: > > > yes, CVF allocates automatic objects on the stack and apparently > > there is no way of changing it. > > Yes, that's bad news. > > > By the way, increasing the stack of