similar to: R external pointer and GPU memory leak problem

Displaying 20 results from an estimated 500 matches similar to: "R external pointer and GPU memory leak problem"

2007 Aug 03
2
How to properly finalize external pointers?
Dear R .Call() insiders, Can someone enlighten me how to properly finalize external pointers in C code (R-2.5.1 win)? What is the relation between R_ClearExternalPtr and the finalizer set in R_RegisterCFinalizer? I succeeded registering a finalizer that works when an R object containing an external pointer is garbage collected. However, I have some difficulties figuring out how to do that in an
2011 Sep 14
2
External pointers and an apparent memory leak
I'm using external pointers and seemingly leaking memory. My determination of a memory leak is that the R process continually creeps up in memory as seen by top while the usage as reported by gc() stays flat. I have isolated the C code: void h5R_allocate_finalizer(SEXP eptr) { Rprintf("Calling the finalizer\n"); void* vector = R_ExternalPtrAddr(eptr); free(vector);
2010 Feb 18
3
R CMD check: OK in LINUX. Crashes in Windows!
Hi, I have followed the recommended steps for creating a package (rctest). As of now, my goal is simply to understand how various pieces fit together. The package includes: (1) C code with source in sub-directories, compiled to create a static library. (a) There is a single C-struct (dns) a simple 'matrix': {int m; int n; double *d;} (b) C code to create random matrix of a certain size.
2012 Jul 21
3
Use GPU in R with .Call
Hi All, I am a newbie to GPU programming. I wonder if anyone can help me with using GPU in .Call in R. Basically, I want to write a function that calcuates the sum of two double type vectors and implement this using GPU. My final goal is to make such an implementation callable from R. (a) First, I wrote a R-C interface handles the R object using .Call (saved as VecAdd_cuda.c
2006 Oct 13
3
No exit codes from RTerm (Windows) (PR#9296)
Full_Name: Russell V. Lenth Version: 2.3.1 OS: Windows XP Pro Submission from: (NULL) (128.255.132.188) I wrote a simple .BAT file to run the Sweave function on a file (via RTerm), then run pdflatex on the result (after RTerm exits). The issue is that if an error condition occurs in RTerm, it is prudent to not do the pdflatex processing afterward. Here are the relevant statements in the BAT
2004 Sep 20
1
problem typcasting return of R_ExternalPtrAddr(SEXP s)
In the odesolve routine lsoda(), I allow the function (named func) that calculates the system of differential equations to be defined in a dll that has been dynamically loaded from the file named in dllname. I use getNativeSymbolInfo(func, dllname)$address to get the address of the function and pass it to a C function called via the .Call interface. Inside that C function, I use
2019 Jul 23
2
[External] Re: quiet namespace load is noisy
Lionel, Thanks for your response. I understand that method overriding can be a serious issue, but as you say, this is not something that the user can act upon. Yet the message lands at the user?s feet. In my case, the messages are cluttering my package vignettes, and may or may not represent what users see if they themselves run the vignette code, depending on what version of ggplot2, etc. they
2019 Jul 23
2
quiet namespace load is noisy
Dear R-devel, Consider the following clip (in R version 3.6.0, Windows): > requireNamespace("ggplot2", quietly = TRUE) Registered S3 methods overwritten by 'ggplot2': method from [.quosures rlang c.quosures rlang print.quosures rlang It seems to me that if one specifies 'quietly = TRUE', then messages about S3 method
2019 Jul 23
2
[External] Re: quiet namespace load is noisy
Dear Russ, I had the same problem in my vignettes and setting both message and warning to FALSE seems to remove all unwanted output: ```{r message=FALSE, warning=FALSE} library("afex") library("ggplot2") library("cowplot") theme_set(theme_grey()) ``` Result: https://cran.r-project.org/web/packages/afex/vignettes/afex_plot_introduction.html Best, Henrik Am Di.,
2018 Jul 20
2
Model formulas with explicit references
Dear R-Devel, I seem to no longer be able to access the bug-reporting system, so am doing this by e-mail. My report concerns models where variables are explicitly referenced (or is it "dereferenced"?), such as: cars.lm <- lm(mtcars[[1]] ~ factor(mtcars$cyl) + mtcars[["disp"]]) I have found that it is not possible to predict such models with new data. For example:
2000 May 03
1
Bug report -- 1.0.1, HP-UX (PR#532)
Dear R folks, Additional problem... bug.report() failed, so am sending it from another mailer. The file it generated is appended. Thanks Russ -- Russell V. Lenth -- Department of Statistics & Actuarial Science The University of Iowa -- Iowa City, IA 52242 USA Tel (319)335-0814 -- FAX (319)335-3017 mailto:Russell-Lenth@uiowa.edu - http://www.stat.uiowa.edu/~rlenth/ ===== R.bug.report
2019 Mar 28
1
default for 'signif.stars'
I read through the editorial. This is the one of the most mega-ultra-super-biased articles I've ever read. e.g. The authors encourage Baysian methods, and literally encourage subjective approaches. However, there's only one reference to robust methods and one reference to nonparametric methods, both of which are labelled as purely exploratory methods, which I regard as extremely
2008 Apr 25
1
R-devel Digest, Vol 62, Issue 24
The columns of the model matrix are all orthogonal. So the problem lies with poly(), not with lm(). > x = rep(1:5,3) y = rnorm(15) z <- model.matrix(lm(y ~ poly(x, 12))) x = rep(1:5,3) > y = rnorm(15) > z <- model.matrix(lm(y ~ poly(x, 12))) > round(crossprod(z),15) (Intercept) poly(x, 12)1 poly(x, 12)2 poly(x, 12)3 poly(x, 12)4 (Intercept)
2007 Jul 25
6
Using R_MakeExternalPtr
Hi all, I've been writing a package and I've run into a problem that I'm unsure how to solve. I am looking to pass a C++ class object to R so that it may be passed back to another C++ function later on to be used. I'm quite new to R and this is my first time writing a package, so I hope you can bear with me. The following is how I create the class and use
2007 Nov 22
3
Naming elements of a list
I have a numeric vector of lenth 1. I am trying to use it inside a function just by giving its name, rather than specifying it as an argument to the function. I am aware that there is an attach function which you need to call. The attach function will accept a list. However, I don't seem to be able to create the list properly. (Or should I use a frame instead?) free_driver <- function (){
2007 Feb 25
3
R/C++/memory leaks
Dear all, I have wrapped a C++ function in an R package. I allocate/deallocate memory using C++ 'new' and 'delete'. In order to allow user interrupts without memory leaks I've moved all the delete statements required after an interrupt to a separate C++ function freeMemory(), which is called using on.exit() just before the .C() call. I am concerned about the
2016 Aug 28
2
CRAN packages maintained by you
Hi Kurt, I have started to look into this, and I need some guidance about how to prioritize my repairs. There are basically 4 categories of warnings from gfortran?s pedantic critique of my packages: 1. Some errant tab characters it doesn?t like, 2. Too many or too few continue statements 3. Horrible (and obsolescent) arithmetic and computed gotos 4. undeclared doubles and dubious
2012 May 11
1
Passing externalptr to .C()
Greetings. 2.15.0 added this behavior http://developer.r-project.org/blosxom.cgi/R-devel/NEWS/2012/03/29#n2012-03-29 o Passing R objects other than atomic vectors, functions, lists and environments to .C() is now deprecated and will give a warning. Most cases (especially NULL) are actually coding errors. NULL will be disallowed in future. This seems to make sense,
2008 Apr 22
1
Bug in poly() (PR#11243)
Full_Name: Russell Lenth Version: 2.6.2 OS: Windows XP Pro Submission from: (NULL) (128.255.132.36) The poly() function allows a higher-degree polynomial than it should, when raw=FALSE. For example, consider 5 distinct 'x' values, each repeated twice. we can fit a polynomial of degree 8: ===== R> x = rep(1:5, 2) R> y = rnorm(10) R> lm(y ~ poly(x, 8)) Call: lm(formula = y ~
2013 Dec 16
1
External pointers and changing SEXPTYPE
Dear Developers, I've been struggling through writing R extension in C. I've been using an external pointer to store my data (please see sample below). I encountered a very weird erroneous behaviour: when I tried to use my external pointer to a structure holding several types of data, including SEXPs, I discovered that SEXPs change their types between returning from initialization