[R-pkg-devel] multithreading in packages

Erin Hodgess er|nm@hodge@@ @end|ng |rom gm@||@com
Sat Oct 9 22:25:12 CEST 2021


Yes it does use MPI.  You can get the pbd from GitHub, as a backup.

Thanks

On Sat, Oct 9, 2021 at 2:23 PM Vladimir Dergachev <volodya using mindspring.com>
wrote:

>
>
> On Sat, 9 Oct 2021, Erin Hodgess wrote:
>
> > Have you thought about using C or c++, please?
>
> Yes, indeed, the core of the package is written in C, with some C++ for
> sorting (which turned out to be rather interesting).
>
> Beyound writing optimized C there are two ways to speed up execution on a
> single computer - multithreading and vector instructions.
>
> Multithreading is easier here, because only one or two libraries are
> needed (libgomp or pthread) and because it is often hard to vectorize
> operations like sorting, hashing and the like.
>
> Also, to use vector instructions to full potential one typically needs a
> fair bit of black magic which is unlikely to pass CRAN tests. I am having
> enough trouble as it is getting a simple flexible array past address
> sanitizers.
>
> > Also, there are packages called pbdDMAT from Drew Schmidt at U of Tenn
> which might help.
>
> Great, thanks for pointing this out ! Looks like pbdDMAT uses mpi.
>
> Also, it appears this package was removed from CRAN for failing to compile
> on macs, which seems rather unfair - I don't know of any clusters running
> mac os.
>
> Vladimir Dergachev

-- 
Erin Hodgess, PhD
mailto: erinm.hodgess using gmail.com

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list