On Sat, 9 Oct 2021, Gábor Csárdi wrote:
On Sat, Oct 9, 2021 at 8:52 AM Ivan Krylov <krylov.r...@gmail.com> wrote:
[...]
* pthread or openmp ? I am particularly concerned about
interaction with other packages. I have seen that using pthread and
openmp libraries simultaneously can result in incorrectly pinned
threads.
pthreads-based code could be harder to run on Windows (which is a
first-class platform for R, expected to be supported by most packages).
R uses mingw on windows, and mingw supports pthreads, you don't need
to do anything special on Windows. You don't even need a
`Makevars`/`Makevars.win` or configure* file just for using pthreads.
Great, thank you !
Some CRAN packages do this, you can search here:
https://github.com/search?l=C&p=5&q=org%3Acran+pthread_create&type=Code
(Some of these are from Unix-specific code, but not all.)
Useful link ! I also did a search for cran+omp and this turned up some
packages as well.
Looks like both openmp and pthreads are used in packages that passed CRAN
checks.
thanks
Vladimir Dergachev
Gabor
[...]
______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel