[Rd] invoking R function in C++ in parallel

2015-01-31 Thread Zheng Da
Hello, 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

Re: [Rd] invoking R function in C++ in parallel

2015-01-31 Thread Dirk Eddelbuettel
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

Re: [Rd] invoking R function in C++ in parallel

2015-01-31 Thread Zheng Da
Thank you both. I think I have got the answer I need. I'll need to turn to another direction to search for my solution. Best, Da On Sat, Jan 31, 2015 at 8:32 PM, Dirk Eddelbuettel e...@debian.org wrote: On 31 January 2015 at 19:29, Gábor Csárdi wrote: | On Sat, Jan 31, 2015 at 7:05 PM, Dirk

Re: [Rd] invoking R function in C++ in parallel

2015-01-31 Thread Gábor Csárdi
On Sat, Jan 31, 2015 at 7:05 PM, Dirk Eddelbuettel e...@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

Re: [Rd] invoking R function in C++ in parallel

2015-01-31 Thread Dirk Eddelbuettel
On 31 January 2015 at 19:29, Gábor Csárdi wrote: | On Sat, Jan 31, 2015 at 7:05 PM, Dirk Eddelbuettel e...@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 |