[Rcpp-devel] OpenMP and Rinside

Dirk Eddelbuettel edd at debian.org
Tue Jul 31 13:39:23 CEST 2012


On 31 July 2012 at 12:36, David Ibarra Gómez wrote:
| Hi Peter,
| 
|         I'm looking at MPI examples, thank you for the advice.
| 
| But If It's possible to use several instances with MPI. I think It should be possible with OpenMP.

You missed the subtle point that Open MPI spawns multiple _processes_ (which
are independent) where Open MP spawns multiple _threads_ (which are not).

One works, the other doesn't.

Dirk

| 
| Thank you
| 
| 
| 
| 
| 
| David Ibarra Gomez
| 
| 
| -----Mensaje original-----
| De: Peter Aberline [mailto:Peter.Aberline at rms.com]
| Enviado el: martes, 31 de julio de 2012 12:32
| Para: David Ibarra Gómez; rcpp-devel at lists.r-forge.r-project.org
| Asunto: RE: OpenMP and Rinside
| 
| > From: rcpp-devel-bounces at lists.r-forge.r-project.org
| > [mailto:rcpp-devel-bounces at lists.r-forge.r-project.org] On Behalf Of
| > David Ibarra Gómez
| 
| > 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
| 
| 
| Hi David,
| 
| It's my understanding is that the RInside class is a singleton as R is strictly single threaded. The message  you are seeing if an exception thrown because the singleton constraint is violated.
| 
| There are some examples that ship with RInside which demonstrate the use of multiple RInside processes using MPI. They might help you achieve the parallelism you are wanting.
| 
| Correct me if I'm wrong, Dirk.
| 
| Thanks
| Peter
| 
| 
| This message and any attachments contain information that may be RMS Inc. confidential and/or privileged.  If you are not the intended recipient (or authorized to receive for the intended recipient), and have received this message in error, any use, disclosure or distribution is strictly prohibited.   If you have received this message in error, please notify the sender immediately by replying to the e-mail and permanently deleting the message from your computer and/or storage system.
| 
| 
| 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