Consider the C (or C++) code called from the .Call interface:
SEXP foo() {
SEXP *p = PROTECT(allocVector(REALSXP, 10));
...
UNPROTECT(1);
return p;
}
Why is there no danger that the allocated memory will be garbage
collected after the UNPROTECT, but before the return of p?
I have used cod
Jeff Brown wrote:
>
> Hi,
>
> I appear to be able to compile, load and call shared objects using SHLIB
> and .Call:
>
>> code <- '#include \n #include \n SEXP f(){\n return
>> R_NilValue ; }'
>> writeLines( code, "test.c" )
>> system( "R CMD SHLIB test.c" )
> gcc -arch i386 -std=gnu99
> -I/L
jgarcia-2 wrote:
>
> Yes That's it! Thanks a lot!!
> Changing UNIT=5 in the F95 code by UNIT=7 solves the collision.
>
> Thank you very much Charlie, I've spent a lot of hours with this.
>
I'm glad it worked!
Google seems to indicate that units 0, 5, 6, 100, 101 and 102 are speci
Yes That's it! Thanks a lot!!
Changing UNIT=5 in the F95 code by UNIT=7 solves the collision.
Thank you very much Charlie, I've spent a lot of hours with this.
Still
R -d valgrind --vanilla < foofortran.Rcheck/foofortran-Ex.R
gives 3 errors (two "Invalid read of size 8" and one "Sys
At 16:24 12/04/2010, Henrik Bengtsson wrote:
On Mon, Apr 12, 2010 at 5:08 PM, Duncan Murdoch wrote:
> On 12/04/2010 10:51 AM, Michael Dewey wrote:
>>
Just to draw a line under it my comment inline below
>> When I run R CMD check on a package I have recently started work on I get
>> the foll
jgarcia-2 wrote:
>
> Hi,
> I've stripped all the code, and it seems that any simple attempt to
> open/close a file from fortran is the cause of the error, and the error
> appears in f77 as well as in f95 code. Please, find attached a foo package
> that reproduce the errors, it should build/check
Dear list subscribers,
this is posted in appreciation of the level of skill that subscribers to this
mailing list enjoy and in no way to abuse it.
We are looking to hire a Research Developer with extensive R and/or python
development skills. If interested (below), please contact me directly on
The SVN (Subversion) Server of the R-project, svn.r-project.org,
financed and run by the Math Department of ETH Zurich,
now has got it's own "validated" aka "trusted" SSL certificate,
mostly thanks to Simon Urbanek (R-core) and his employer, AT&T Labs.
This may mean that those of you who have been
That is tremendously helpful. Â Thanks Charlie!
--- On Mon, 4/12/10, Sharpie [via R]
wrote:
From: Sharpie [via R]
Subject: Re: Getting started with .C
To: "Jeff Brown"
Date: Monday, April 12, 2010, 10:11 PM
Jeff Brown wrote:
Hi,
I'm trying to learn to use .C, which lets one invoke comp
Hi,
I've stripped all the code, and it seems that any simple attempt to
open/close a file from fortran is the cause of the error, and the error
appears in f77 as well as in f95 code. Please, find attached a foo package
that reproduce the errors, it should build/check/install without any
problem (it
Please try running this under valgrind (see 'Writing R Extensions').
The most likely cause is that the Fortran code is corrupting its or
R's memory. You may need a build of R set up to instrument R
allocations (see the manual for details).
On Tue, 13 Apr 2010, jgar...@ija.csic.es wrote:
Hi
Hi all,
I'm preparing a package which uses .Fortran to interface a Fortran 95
function. This F95 function simply receives the name of a file from R,
opens this file and forwards its content to a F95 module, which, in turn,
makes the real computation. The F95 module is a pre-existing one and I'm
tr
Quick question regarding multicore versions of mapply. Package 'multicore'
provides a parallelized version of 'lapply', called 'mclapply'. I haven't
found any parallelized versions of 'mapply', however (although one can use
the lower level function 'parallel', it becomes harder to control the numbe
13 matches
Mail list logo