[Rcpp-devel] Fwd: CRAN submission growfunctions 0.1
Dirk Eddelbuettel
edd at debian.org
Sat Aug 9 23:25:14 CEST 2014
Hi Terrance,
On 9 August 2014 at 16:58, terrance savitsky wrote:
| 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
It's not complicated.
'R CMD check' needs a code path that does this, which can be as simple as an
example section in the manual page (mayne you meant this by 'added an
example'). Or something tickled via a test script in tests/.
You submitted a CRAN package. It has testable code. It failed. We now need a
_minimal reproducible example_, ideally without a long tail of dependencies,
to examine it.
| toy package .cpp file that generates the same data (list object of dgCMatrix
| objects created using R::Matrix) and runs an example.
|
| Terrance
|
|
| [icon_10_ge] sparseList_1.1.tar.gz
Can you update to a version which loads data and passes down to the code
which was seen to tickle this?
And then place it somewhere where we can get it with a simple wget or curl call.
Thanks, Dirk
|
| 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
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the Rcpp-devel
mailing list