Skip to content

Unexpected OpenMP in RcppArmadillo data structures? #340

Closed
@evanbiederstedt

Description

@evanbiederstedt

Hi @eddelbuettel CC @VPetukhov

Apologies if this is documented somewhere and we missed it.

We've been noticing some strange behavior with the following function jsDist(), which spins up multiple processes when run:

https://github.com/kharchenkolab/sccore/blob/master/src/matrix_utils.cpp#L6-L31

I cannot see why this would happen; my best guess currently is that something multithreaded in the RcppArmadillo data structures used within this function. Am I crazy thinking this?

Is there any way to conditionally disable/limit OpenMP for certain parts of RcppArmadillo?

Otherwise....I'm befuddled why this would be happening. We can disable OpenMP entirely of course in the Makevars files, but this doesn't explain why this function is multithreaded....

Thank you for the help, Evan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions