From sgiannerini at gmail.com  Mon Sep 12 15:11:34 2005
From: sgiannerini at gmail.com (Simone Giannerini)
Date: Mon, 12 Sep 2005 15:11:34 +0200
Subject: [Rd] A question on R memory management in .Fortran() calls
	under Windows
In-Reply-To: <2B95FE9B-2106-4226-A9AE-395C070994BD@r-project.org>
References: <3c12769c0509091004555400f@mail.gmail.com>
	<4321CBB4.3090805@stats.uwo.ca>
	<3c12769c05091201305a31f10f@mail.gmail.com>
	<2B95FE9B-2106-4226-A9AE-395C070994BD@r-project.org>
Message-ID: <3c12769c05091206113df83eb1@mail.gmail.com>

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



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