[Rcpp-devel] RCPP, Rstudio, parallel

2015-01-12 Thread Maxime To
Hi all, I have a problem using simultaneously RCPP and Snow with Rstudio. The problem only appears when I use Rstudio, and the code runs well when using RGUI. I wrote a cpp function that I want to run in parallel. So I use Snow and compile the function on each node as follow: library(parallel)

Re: [Rcpp-devel] Rcpp Parallel and Rcpp Armadillo

2014-12-10 Thread Maxime To
t does not seem to work, when I run a long loop the program just crash because of full memory. -Message d'origine- De : "Romain François" Envoyé : ‎10/‎12/‎2014 14:32 À : "Maxime To" Cc : "Dirk Eddelbuettel" ; "rcpp-devel@lists.r-forge.r-project

Re: [Rcpp-devel] Rcpp Parallel and Rcpp Armadillo

2014-12-10 Thread Maxime To
Hi, I changed the function as indicated by Dirk and I modify the functions and the program does work now. However, I am still puzzled by the memory use of the program. when I run a loop of my function in R as in the code below, it seems that the program does not free the memory used in the pre

[Rcpp-devel] Rcpp Parallel and Rcpp Armadillo

2014-12-09 Thread Maxime To
Hi, I started to work with Rcpp and I have some trouble to adapt some code. I copy below the following code: - I want to write a function named contrib1, that is simplified version here, but the idea is that that function makes a large use of the pnorm (and qnorm) on marices and I would like t