similar to: invoking R function in C++ in parallel

Displaying 20 results from an estimated 10000 matches similar to: "invoking R function in C++ in parallel"

2015 Feb 01
2
invoking R function in C++ in parallel
On Sat, Jan 31, 2015 at 7:05 PM, Dirk Eddelbuettel <edd at debian.org> wrote: [...] > - either work in something like OpenMP and run in multiple threads that > remain /completely/ shielded from R, ie no R calls, and not even R data > types as you cannot trigger gc() calls from different threads > I think you can use R objects, as long as you don't call R functions on
2015 Feb 01
0
invoking R function in C++ in parallel
On 31 January 2015 at 18:30, Zheng Da wrote: | I'm writing an R extension in C++. In the extension, I want to invoke | an R function directly and it works when I use Rcpp in the serial | code. But what I really want is to invoke the R function in parallel | with openmp. When I do so, I got segmentation fault. | | I remember someone said that R isn't thread-safe. I think it's also |
2016 May 12
3
Single-threaded aspect
On 12 May 2016 at 13:11, Mark van der Loo wrote: | Charles, | | 1. Perhaps this question is better directed at the R-help or | R-pacakge-devel mailinglist. | | 2. It basically means that R itself can only evaluate one R expression at | the time. | | The parallel package circumvents this by starting multiple R-sessions and | dividing workload. | | Compiled code called by R (such as C++ code
2016 May 12
5
Single-threaded aspect
R Developers, Could someone help explain what it means that R is single threaded? I am trying to understand what is actually going on inside R when users want to parallelize code. For example, using mclapply or foreach (with some backend) somehow allows users to benefit from multiple CPUs. Similarly there is the RcppParallel package for RMatrix/RVector objects. But none of these address the
2015 Feb 01
0
invoking R function in C++ in parallel
On 31 January 2015 at 19:29, G?bor Cs?rdi wrote: | On Sat, Jan 31, 2015 at 7:05 PM, Dirk Eddelbuettel <edd at debian.org> wrote: | [...] | | - either work in something like OpenMP and run in multiple threads that | ? ?remain /completely/ shielded from R, ie no R calls, and not even R data | ? ?types as you cannot trigger gc() calls from different threads | | | I think you can
2016 May 12
1
Single-threaded aspect
Charles, 1. Perhaps this question is better directed at the R-help or R-pacakge-devel mailinglist. 2. It basically means that R itself can only evaluate one R expression at the time. The parallel package circumvents this by starting multiple R-sessions and dividing workload. Compiled code called by R (such as C++ code through RCpp or C-code through base R's interface) can execute
2013 May 24
0
Rcpp with OpenMP - Need example Makevars
Dear R experts, recently I started developing a Rcpp package "OpenMPTest". Within that package I want to use OpenMP, as in the following code example: // header file #include <omp.h> using namespace Rcpp ; RcppExport SEXP testOpenMP( SEXP nThreads ) ; // cpp file SEXP testOpenMP( SEXP nThreads ) { BEGIN_RCPP NumericVector numberThreads = NumericVector( nThreads );
2020 Oct 25
2
Ubuntu 20.10
Hi Dirk, I didn't capture the output but using Focal I got an error with RcppParallel trying to open a file that wasn't found, and plotly::ggplot() would not render a ggplot graph. 20.10 is working well for me otherwise. Frank http://fharrell.com http://biostat.mc.vanderbilt.edu/FrankHarrell Twitter: @f2harrell ---- On Sun, 25 Oct 2020 11:52:43 -0500
2010 Jun 03
2
sig for R and C++
Dear R People: Is there a sig for people using R and C++, please? Thank you in advance, Sincerely, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodgess at gmail.com
2009 Sep 14
2
Escaping . in regular expression
If I run cvec<-c("test.f", "test.sf", "try.g","try.res", "try.f") print(cvec) indx<-grep('\.f',cvec,perl=TRUE) fset<-cvec[indx] print(fset) I get > cvec<-c("test.f", "test.sf", "try.g","try.res", "try.f") > print(cvec) [1] "test.f" "test.sf"
2011 Nov 29
3
Updated Windows toolchain
An updated toolchain is now being used for Windows' builds of R-devel: details are in the R-admin manual and at http://www.murdoch-sutherland.com/Rtools/ and http://www.stats.ox.ac.uk/pub/Rtools/ Both 32- and 64-bit parts of the toolchain use v2.0.1 of the Mingw-w64 project's runtime and a beta of gcc 4.5.4: the Mingw.org project's builds are no longer used. This should mean that
2004 Sep 16
1
Newbie q. need some help understanding this code.
dear all. Would someone be kind and willing to explain the code below for a person who has never used R? ( that is if one has enough time and inclination) It implements gillepsie's stochastic algorithm for Lotka Volterra model. What would help me tremendously is to see the breakdown of the line by line code into plain english. thanks for any insights or other comments. sean
2013 Feb 01
2
Armadillo error in R extension
Is there anyway with some experience in using armadillo in R C++ extensions? My problem is the following: I programmed a function in a header looking like #include <armadillo> inline arma::vec foo(input) { ... do something return an arma::vec object } compiling this via R CMD INSTALL packagename (PKG_CXXFLAGS = -I/folder/of/armadillo and armadillo_bits in my package) I get the
2020 Mar 24
2
help with rchk warnings on Rf_eval(Rf_lang2(...))
> Shield<SEXP> res(Rcpp_fast_eval(Rf_lang2(asEnvironmentSym, x), R_GlobalEnv)); The call should be protected before evaluation though. So more like: Shield<SEXP> call(Rf_lang2(asEnvironmentSym, x)); return Rcpp_fast_eval(call, R_GlobalEnv); Best, Lionel On 3/23/20, Dirk Eddelbuettel <edd at debian.org> wrote: > > > On 23 March 2020 at 17:07, Ben Bolker wrote: >
2014 Oct 22
1
Problems to compile examples of RInside
Hello, I have some problems to migrate to R >3.0 my devel machine (R.2.15.2). So I decided to start from scratch with a brand new virtual machine. Downloaded latest network install of debian testing, not stable (jessie/sid, SMP Debian 3.16.3-2 (2014-09-20) x86_64 GNU/Linux) installed only with ssh-server and basic utilities (no X). Then I installed R by: apt-get install
2020 Mar 23
5
help with rchk warnings on Rf_eval(Rf_lang2(...))
Thanks, that's really useful. One more question for you, or someone else here: const ArrayXd glmLink::linkFun(const ArrayXd& mu) const { return as<ArrayXd>(::Rf_eval(::Rf_lang2(as<SEXP>(d_linkFun), as<SEXP>(Rcpp::NumericVector(mu.data(), mu.data() + mu.size())) ), d_rho); } I guess I need that to read
2013 Nov 03
1
How to make an R package that uses Boost.Thread, qualified to be published on CRAN or shared by the most
Hi, Recently, I made an R package that used the C++ library Boost.Thread (http://www.boost.org/doc/libs/1_54_0/doc/html/thread.html) for multithreading. Previously, I have posted a question at stackoverflow (http://stackoverflow.com/questions/19651954/is-it-possible-to-build-an-r-package-which-use-rcpp-and-boost-thread-on-http), and I also asked at rcpp-devel
2013 Jun 19
3
Calling an array in a struct in C to R
Hi there, Although I'm a quite experienced R user and know my ways in C, I stumbled upon a problem I don't know how to solve. Therefore, I hope someone can provide me with the information or pointers I need in order to understand the way in which the communication between R and C occurs. I have the following C code which basicallly reflects what I want: typedef struct { float
2017 Dec 03
2
Rcpp, dyn.load and C++ problems
On 3 December 2017 at 05:23, Eric Berger <ericjberger at gmail.com> wrote: > > Do a search on "Rcpp calling C++ functions from R" > Thanks. However search for "Rcpp calling C++ functions from R" gives a lot of result but I think some of them are outdated and others don't agree with each other. Can you point to a specific good on-line guide for me? Regards
2017 Dec 03
1
Rcpp, dyn.load and C++ problems
On 3 December 2017 at 20:19, Dirk Eddelbuettel <edd at debian.org> wrote: Hi Dirk, Thanks for your answers. I got a few more questions. > > 0) Wrong list. Rcpp has its down, rcpp-devel, and I basically do not read > this and would have missed this were it not for luck. OK. I did found the rcpp-devel mailing-list. But I though it was a developers of the rcpp-package. So it is ok