pytorch实现多进程的时候出现的BUG:OMP: Error #13: Assertion failure at z_Linux_util.cpp(2361).

在使用Python和PyTorch进行A3C强化学习代码实现时,遇到多进程OMP错误#13:断言失败。尝试安装apex未解决问题,最终通过设置环境变量KMP_INIT_AT_FORK=FALSE成功规避此问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在跑强化学习A3C的代码时候,用到python和pytorch的多进程,但是遇到这样的bug。 

OMP: Error #13: Assertion failure at z_Linux_util.cpp(2361).                                                                                           │··································
OMP: Hint Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and ope│··································
rating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see http://│··································
www.intel.com/software/products/support/.           

首先,尝试了https://github.com/hszhao/semseg/issues/16 的方法,安装apex,之后发现并不起效果。

最后,找到了https://github.com/ContinuumIO/anaconda-issues/issues/11294,在python运行命令前面加上KMP_INIT_AT_FORK=FALSE,即可避免这个问题。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值