[Rcpp-devel] OpenMP and Rinside

Dirk Eddelbuettel edd at debian.org
Tue Jul 31 13:38:14 CEST 2012


On 31 July 2012 at 12:23, David Ibarra Gómez wrote:
| Hello,
| 
|  
| 
|                 I was mixing RInside with OpenMP. When I try to run the
| software, I get a message in three of the four threads (4 Cores Multicore).
| 
|  
| 
| Exception caught: can only have one RInside instance
| 
| Exception caught: can only have one RInside instance
| 
| Exception caught: can only have one RInside instance

R is (famously) single-threaded so you cannot simply instantiate several
RInside object and just pray that it will work.  It won't.

| It's about the name of the instance?
| 
| Any fast solution (but RCPP direct)?

Rcpp can be used with OpenMP if you are careful.

Dirk
 
  
| 
|  
| 
| Kind regards
| 
|  
| 
| David Ibarra
| 
|  
| 
| 
| -------------------------------------------------------------------------------
| Disclaimer: http://disclaimer.aqualogy.net/
| 
| ----------------------------------------------------------------------
| _______________________________________________
| 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
-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com  


More information about the Rcpp-devel mailing list