plink-ng icon indicating copy to clipboard operation
plink-ng copied to clipboard

pgenlibr: multi-threading?

Open agilly-regn opened this issue 1 year ago • 1 comments

Hi,

I am wondering whether, by default, pgenlibr uses multithreading the same way plink2 does? We are comparing performance between pgenlibr and wrapped plink2 calls in R and are seeing decreased performance in the former. If by default pgenlibr is single-threaded, how can we enable multithreading?

Thanks!

agilly-regn avatar Oct 13 '23 20:10 agilly-regn

The C++ pgenlib code does not contain any multithreading of its own (unless you count the isolated .pvar loader); it only includes some low-level constructs which are practical for plink2 to build multithreading logic on top of. The pgenlibr R package does not currently contain this sort of multithreading logic.

It is possible to modify pgenlibr's large-matrix-filling functions to imitate what plink2 does, though that would take a significant amount of work.

chrchang avatar Oct 13 '23 21:10 chrchang