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

Simone Giannerini sgiannerini at gmail.com
Mon Sep 12 15:11:34 CEST 2005


On 9/12/05, Simon Urbanek <simon.urbanek at r-project.org> 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 the fortran process when
> > linking does not solve the problem
> 
> In general the stack size is also governed by the system limits so
> you may need to increase those as well, but still, that won't really
> solve your problem.
> 
> >> I'd say your only reasonable workarounds are to tell your compiler to
> >> use the heap for the local matrix allocation (if that's possible),
> >> or do
> >> your allocations in R.
> >>
> >
> > I might follow the second way, in any case, I am considering
> > switching to Linux, I have also  considered changing compiler under
> > Win,  any suggestions on the choice would be welcomed.
> 
> As Duncan was mentioning g77 is your friend if you can convert your
> code to f77. If you don't have that option, you're partially on your
> own. GNU Fortran 95 (gfortran) may be an option as it exists both for
> unix and Windows (although not as a part of MinGW), but R currently
> doesn't provide .f90 target so you'll need to add your own small
> Makevars.
> 
> Cheers,
> Simon
> 
> 

Many thanks, I did not know about gfortran for Windows, I will have a
look at it.

Kind regards,
Simone

-- 
______________________________________________________

Simone Giannerini
Dipartimento di Scienze Statistiche "Paolo Fortunati"
Universita' di Bologna
Via delle belle arti 41 - 40126  Bologna,  ITALY
Tel: +39 051 2098248  Fax: +39 051 232153
E-mail: giannerini at stat.unibo.it



More information about the R-devel mailing list