pymc-devs/pymc
Only sample using a single thread when sampling multiple chains in parallel
已关闭
#5,453 创建于 2022年2月9日
help wantedrequest discussionv4
仓库指标
- 星标
- (7,926 个星标)
- PR 合并指标
- (平均合并 11天) (30 天内合并 7 个 PR)
描述
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: https://github.com/pymc-devs/pymc/issues/3140
I thus think we should set os.environ['OMP_NUM_THREADS'] = '1' if we're sampling on > 1 core.