An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20121013/aa482751/attachment.pl>
Multithreaded code in .Call interface
3 messages · Brian Ripley, Rob Anderson
On 13/10/2012 08:09, Rob Anderson wrote:
Hi, I was wondering if it is safe to call R functions and/or R BLAS functions from within multithreaded C/C++ code(.Call interface)? It is not in case with MATLAB. I was experimenting using pthreads and OpenMP.
Not unless it is documented to be so. (I believe the internal BLAS to be fine, but you could use an external one: although with care if that also uses threads.) See also ?8.1.5 of 'Writing R Extensions'.
Thanks, Rob
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
2 days later
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20121015/ca726cd8/attachment.pl>