Skip to content

Only sample using a single thread when sampling multiple chains in parallel #5453

Open
@twiecki

Description

@twiecki

My prior of what cores=4 does when calling pm.sample() is that pymc would use 4 of my cores. However, because of multi-threading this might not be the case. Furthermore, multi-threading is causing problems when running multiple chains in parallel: #3140

I thus think we should set os.environ['OMP_NUM_THREADS'] = '1' if we're sampling on > 1 core.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions