[Rcpp-devel] Fwd: CRAN submission growfunctions 0.1

Kevin Ushey kevinushey at gmail.com
Sat Aug 9 21:02:31 CEST 2014


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


More information about the Rcpp-devel mailing list