Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
107 views

R package using RcppParallel builds but fails to install due to undefined TBB symbols Body: I'm developing an R package using RcppParallel to compute distance matrix. The package builds successfully, ...
marc's user avatar
  • 451
1 vote
0 answers
80 views

I have an RcppArmadillo code that runs sequentially and I am trying to adapt it for parallel compilation with RcppParellel. The code is a copy paste of sequential code and actually runs faster. Yet ...
Juan Mucho's user avatar
0 votes
1 answer
68 views

I run R + Rcpp + RcppParallel from RStudio. I run a parallel loop that works if I do not use a Rcpp::List in the worker, but throws an abort if I use the Rcpp::List in the worker (even in a trivial ...
Andre Lucas's user avatar
0 votes
1 answer
100 views

I have installed Rcpp, RcppParallel and I was testing simple function, written in .cpp file. #include <RcppParallel.h> #include <Rcpp.h> #include <vector> using namespace ...
Kamat's user avatar
  • 123
1 vote
0 answers
96 views

I'm attempting to write code in C++ that loops over an Rcpp::List of IntegerVectors. The computation itself is complicated to explain, but for the sake of example let's suppose that I wanted to take ...
Eric Weine's user avatar
0 votes
3 answers
507 views

Problem: In R, I can run library(RcppParallel) in the usual way without issues but in an RStudio Project that uses {renv} for local dependency management, after running renv::install("...
Edward Lavender's user avatar
1 vote
0 answers
86 views

I would like someone who understands better than me to help me implement a mclapply with rcpp in a project I am working on. The fragment I want to transfer is this one, where data_by is a list of data....
Dark.Smart's user avatar
0 votes
0 answers
55 views

In a parallel code with Rcpp, I convert a NumericVector variable to RcppParallel::RVector<double>. I also convert a NumericMatrix variable to RcppParallel::RMatrix<double>. To speed up the ...
Emmanuel Hamel's user avatar
1 vote
1 answer
122 views

Consider the following serial example function: // [[Rcpp::plugins(cpp20)]] #include <Rcpp.h> // [[Rcpp::export]] Rcpp::NumericVector example_fun(int n) { Rcpp::NumericVector result (n); ...
user's user avatar
  • 1,150
1 vote
1 answer
785 views

To install the package rstan in R, the package RcppParallel is required, but I'm not able to install it in R/4.3 on a Linux machine (cluster). I tried different solutions proposed (e.g., install from ...
Anthony's user avatar
  • 437
0 votes
0 answers
74 views

I am fitting a statistical model whose likelihood and gradient evaluation depend on many complicated matrix operations, for which the Eigen library is very well-suited. I am working within Rcpp and ...
astring's user avatar
1 vote
0 answers
45 views

I have rewritten the example given in the package RcppParallel for the function ParallelReduce, to understand how it works. Instead of summing a RVector to a double, I've tried to sum each row of a ...
Maxime2506's user avatar
0 votes
1 answer
307 views

I'm trying to speed up numeric computation in my R code using RcppParallel and am attempting to edit an example that uses the Cpp sqrt() function to take the square root of each element of a matrix. ...
Nate Lockwood's user avatar
0 votes
0 answers
161 views

One of my inputs is a List of NumericVector. If I declare this as I would with regular (non paralllel) Rcpp code, I get a correct result at the end, but with the stack imbalance warnings. Warning: ...
Chechy Levas's user avatar
  • 2,406
0 votes
1 answer
246 views

I have developed a dual chain markov monte carlo model designed to forecast loan portfolios in the excellent package Rcpp but have run into an issue trying to implement a parallelised version of these ...
David Neumann's user avatar
3 votes
0 answers
170 views

I would like to parallelize a for loop using parallelReduce of RcppParallel but struggle with joining the results because the dimension of the parallel output for each iteration is not known a priori. ...
Smelton's user avatar
  • 31
0 votes
2 answers
264 views

I'm using RcppParallel in my own R package. I know that I need to add Imports: RcppParallel to the DESCRIPTION file and importFrom(RcppParallel, RcppParallelLibs) to the NAMESPACE file. My current ...
Ding Li's user avatar
  • 723
0 votes
0 answers
2k views

I am a newbie/student to rstanarm and I having issues installing RcppParallel. I have tried devtools::install_github("RcppCore/RcppParallel") and install.packages("RcppParallel", ...
LittleBlueHeron's user avatar
0 votes
0 answers
91 views

I have been experiment with using references for speed improvements. The (not working) trivial example below, probably won't see any improvements. However, I think by not copying the data into a ...
skatz's user avatar
  • 115
1 vote
1 answer
120 views

I'm having a problem while trying to learn RcppParallel. I tried to modify the code form https://rcppcore.github.io/RcppParallel/ for the vector summation to calculate the mean of a vector instead, to ...
Jakob J's user avatar
  • 13
0 votes
0 answers
55 views

I have have c++ code in which I parallelize some Monte Carlo Simulations using Rcpp and RcppParallel's parallelFor. The execution is, as expected, much faster then when using a non-parallel loop. ...
sheß's user avatar
  • 525
3 votes
1 answer
332 views

Overview: I'm interested in parallelizing (across chains) a Gibbs sampler for a non-trivial regression problem that I've already implemented in serial via Rcpp/RcppEigen. I've read the documentation ...
Adam's user avatar
  • 55
2 votes
1 answer
241 views

I have a package posted on CRAN which uses multiple cores through the RcppParallel framework. It has the problem being installed on r-devel-linux-x86_64-fedora-clang and r-patched-solaris-x86. I get ...
Bogdan's user avatar
  • 914
0 votes
1 answer
301 views

This is my first try with the RcppParallel package and I have to work with C++17 (Ubuntu) I tried to stay close to the ParallelFor example of the developers site, but I need an additional (non-...
Daniel R's user avatar
0 votes
0 answers
100 views

I am attempting to implement a particle filter within Rcpp and use OpenMP to parallelise the transition step. I am using dqrng to create threadsafe RNG with using the boost distribution functions as ...
proverIdr's user avatar
1 vote
1 answer
280 views

I am trying to use RcppParrallel to estimate distances between rows of two 3D-matrix and return a new matrix. I saw examples of Parallel Distance Matrix Calculation using parallelFor, but these ...
J. Antonio Guzmán Q.'s user avatar
1 vote
1 answer
64 views

I am looking for a deterministic threadsafe Rcpp algorithm for 2-D numerical integration. RcppNumerical provides a partial interface to Cuba for multidimensional integration, but from my trials that ...
user3291798's user avatar
2 votes
1 answer
108 views

As I'm a bit new to Rcpp, I might be missing a trick here. Let's create two matrices: library(Rcpp) library(microbenchmark) P <- matrix(0, 200,500) for(i in 1:500) P[,i] <- rep(rep(sample(0:1)...
Nick's user avatar
  • 3,414
0 votes
0 answers
364 views

I'm trying to build an R package implementing Dijkstra algorithm using Rcpp and RcppParallel. You can see my work here. Now I want to add a new function and a strange behavior appears. When I compile ...
vlarmet's user avatar
  • 71
0 votes
1 answer
279 views

I'm new to Rcpp and RcppParallel. I'm trying to use RcppParallel to optimize my R code and now I'm making some toy codes for studying them. Now I made a RcppParallel code and the result is different ...
vicent's user avatar
  • 3
0 votes
0 answers
130 views

How do you convet an RMatrix::Column to a NumericVector in RcppParallel? e.g. // [[Rcpp::depends(RcppParallel)]] // [[Rcpp::plugins("cpp11")]] #include <Rcpp.h> #include <RcppParallel.h> ...
cmo's user avatar
  • 4,154
2 votes
1 answer
260 views

I am pretty new at Rccp and Rccpparallel and I have trouble figuring out where I made mistake. So I want to create a function that do a power element wise in a matrix in parallel. I am following ...
JacobJacox's user avatar
0 votes
1 answer
71 views

Building off the example here Parallel Worker in namespace, I would like to employ function pointers with the Parallel Worker. The code below produces an error along the lines of: "cannot initialize ...
skatz's user avatar
  • 115
0 votes
2 answers
159 views

This example is a follow up example from this earlier post. I am trying to move the Parallel Worker to its own cpp file and and declare it in the header file. Calling 'mypackage' function ...
skatz's user avatar
  • 115
3 votes
2 answers
447 views

I was using this Rcpp code to do a quickselect on a vector of values, i.e. obtain the kth largest element from a vector in O(n) time (I saved this as qselect.cpp): // [[Rcpp::depends(RcppArmadillo)]] ...
Tom Wenseleers's user avatar
0 votes
1 answer
144 views

I am trying to parallelize for cycle computing fitness value of individuals. For this whole algorithm I am using Rcpp, but fitness function is passed from R. So I am trying to do something like this: ...
P. Soltes's user avatar
0 votes
0 answers
128 views

I have a working R package including the necessary R/Cpp working. My question here is more of a 'good practices' when using nested namespace. Currently, my package has; 1) cost functions, 2) ...
skatz's user avatar
  • 115
0 votes
1 answer
846 views

I'm trying to apply a function to multiple groups/id's in r using the foreach package. It's taking forever to run using parallel processing via %dopar%, so I was wondering if it's possible to run the ...
user2566907's user avatar
4 votes
1 answer
188 views

I am trying to parallelise the addition of (large) vectors using RcppParallel. That's what I've come up with. // [[Rcpp::depends(RcppParallel)]] #include <RcppParallel.h> #include <Rcpp.h>...
mce's user avatar
  • 107
0 votes
1 answer
283 views

This problem arose from testing my R (RcppParallel) package on windows through the win-builder-r, as for my mac there is not a problem. "error: 'mt19937' is not a member of 'std'" Additionally, ...
skatz's user avatar
  • 115
0 votes
0 answers
292 views

I have an R list which I convert to vector of vectors in Rcpp. Now I want to use RcppParallel to use multiple cores. Can I pass such a list or vector of vectors to RcppParallel similar to ...
user8401743's user avatar
1 vote
2 answers
157 views

I know the problem I have is a thread-safety issue. As the code I have now will execute with 'seThreadOptions(1)'. My question is what would be a good practice to overcome this. I know this: ...
skatz's user avatar
  • 115
0 votes
2 answers
347 views

I would like to use a threadsafe function pointer to be applied in an RcppPrallel worker. But I have already problems with this tiny example. No matter if I use it in a package and add ...
maxatSOflow's user avatar
1 vote
0 answers
228 views

I have been building an r-package that runs RcppParallel and calls nloptr from the cpp in parallel. Currently, the package will not build as it can't find the 'nloptrAPI.h' file. The build log ...
skatz's user avatar
  • 115
0 votes
1 answer
526 views

I presume, or rather hope, that I have a singular fixable problem or perhaps many smaller ones and should give up. Either way I am relatively new to Rcpp and extremely uninformed on parallel ...
skatz's user avatar
  • 115
2 votes
2 answers
767 views

I want to seed R's internal unif_rand() in a multithreaded environment. The code below generates a 2-column matrix of uniform random numbers within 2 threads. The results are interesting. struct ...
user2961927's user avatar
  • 1,820
2 votes
0 answers
185 views

I am updating a CRAN package that needs C++ compilation. CRAN forbids std::cout << but allows Rcpp::Rcout <<. The latter however crashes the program in a multithreaded environment. I am ...
user2961927's user avatar
  • 1,820
5 votes
1 answer
894 views

I am trying to program the naive parallel version of Conjugate gradient, so I started with the simple Wikipedia algorithm, and I want to change the dot-products and MatrixVector products by their ...
Adrián Rodriguez Villarreal's user avatar
1 vote
1 answer
408 views

I am using RcppParallel to speed up some calculations. However, I am running out of memory in the process, so I would like to save results within the Parallel loop that are pass some relevance ...
thc's user avatar
  • 9,725
6 votes
1 answer
1k views

The problem I am having is that I have to calculate a Euclidean distance matrix between shapes that can range from 20,000 up to 60,000 points, which produces 10-20GB amounts of data. I have to run ...
JJL's user avatar
  • 394