Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.

在Anaconda的某个特定环境中遇到OpenMP错误,提示libiomp5md.dll已初始化。这是由于程序链接了多个OpenMP运行时导致的。为解决问题,删除了PyTorch目录下的libiomp5md.dll文件,从而成功解决了性能下降或不正确结果的问题。
摘要由CSDN通过智能技术生成

问题

在Anaconda的另外的环境中调试运行代码发现如下错误

OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.

删除

这是因为有多个libiomp5md.dll文件,引起的。

在pytorch这个环境中删除libiomp5md.dll

D:\Software\pytorch\Library\bin

成功解决。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值