[Rcpp-devel] Fwd: CRAN submission growfunctions 0.1

terrance savitsky tds151 at gmail.com
Sat Aug 9 22:58:28 CEST 2014


Hi Guys,

I embed a data list object of dgCMatrix elements (produced in the same
manner as used in package, growfunctions) in an .RData file located in the
sparseList \data folder. I'm not sure what script and data ASAN uses to
conduct the memory check.  I'm guessing the package examples are run.  So I
added an example that loads the .RData object embedded with this toy
package, sparseList.  Please pardon me if my understanding is off.   I also
embedd an R script in the single toy package .cpp file that generates the
same data (list object of dgCMatrix objects created using R::Matrix) and
runs an example.

Terrance
​

 sparseList_1.1.tar.gz
<https://docs.google.com/file/d/0B0DIDcaf6yMwUFI5VU5yX3NZY0MzanZNSVhTUVViblFXNkFv/edit?usp=drive_web>
​


On Sat, Aug 9, 2014 at 3:02 PM, Kevin Ushey <kevinushey at gmail.com> wrote:

> Hi Terrance,
>
> Can you please try to construct a reproducible example based on the
> (tagged, potentially offending) line of code -- that is,
>
>     #4 0x7f79b6541df0 in IGMRFDPMIX
> /data/gannet/ripley/R/packages/tests-49x/growfunctions/src/dpmix.cpp:63
>
> which has the line:
>
>     C(k,0)          = as<sp_mat>(Cr[k]);
>
> Can you construct a small, reproducible example using objects 'C',
> 'Cr' as you construct in the package, and then see if that gives a
> similar error?
>
> Preferably you can construct this using Rcpp Attributes, so an example
> of the form
>
>     // [[Rcpp::depends(RcppArmadillo)]]
>
>     #include <RcppArmadillo.h>
>     using namespace Rcpp;
>
>     // [[Rcpp::export]]
>     SEXP test(SEXP C, SEXP Cr) {
>       ... use C, Cr as above...
>     }
>
>     /*** R
>     ... construct C, Cr on the R side as necessary ...
>     */
>
> That way, we can 'sourceCpp' it and immediately investigate.
>
> Thanks,
> Kevin
>
> On Sat, Aug 9, 2014 at 11:31 AM, terrance savitsky <tds151 at gmail.com>
> wrote:
> > Dirk,  Thanks much for taking the time to investigate this issue.  I've
> > created a package (sparseList_1.0.tar.gz) with a minimal example of what
> > writing from a list of dgCMatrix matrices at the R layer to a
> field<sp_mat>.
> > I had intended to install boot2docker and use load your R-devel set-up
> to a
> > container so that I could replicate the ASAN-generated error.  Its
> taking me
> > longer than I'd hoped, however, so - for now - I include the package
> tarball
> > with the minimal example and also an R script (sparse_list_to_field.R) so
> > that you may see what the function does.
> > Terrance
> >  sparse_list_to_field.R
> >
> >  sparseList_1.0.tar.gz
> >
> >
> >
> > On Sat, Aug 9, 2014 at 11:50 AM, Dirk Eddelbuettel <edd at debian.org>
> wrote:
> >>
> >>
> >> Terrance,
> >>
> >> So I took a look with one of the prebuilt versions of R using the Docker
> >> container I prepare (see the blog / sanitizers write-up I linked to) as
> I
> >> realized that we had a Rcpp Gallery post similar to what that as<>
> >> conversion
> >> does.
> >>
> >> And no issue with that code.
> >>
> >> From a brief look at your package it seems like you are pushing the
> >> envelope
> >> a lot harder with fields and list of sparse matrices ( in dpmix.cpp,
> where
> >> another ASAN log pointed to ) so you may have to debug around there.
> >>
> >> A small reproducible example would surely help us. So far I don't have
> one
> >> for as<sp_mat>.
> >>
> >> Dirk
> >>
> >> --
> >> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
> >
> >
> >
> >
> > --
> > Thank you, Terrance Savitsky
> >
> > _______________________________________________
> > Rcpp-devel mailing list
> > Rcpp-devel at lists.r-forge.r-project.org
> > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>



-- 
Thank you, Terrance Savitsky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140809/dd19300e/attachment.html>


More information about the Rcpp-devel mailing list