OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized. OMP: 解决方案

导读:本篇文章讲解 OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized. OMP: 解决方案,希望对大家有帮助,欢迎收藏,转发!站点地址:www.bmabk.com

一、报错

 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/.

二、解决方案
在代码前加入这两个代码行

import os
os.environ['KMP_DUPLICATE_LIB_OK'] = 'TRUE'

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/99740.html

(0)
小半的头像小半

相关推荐

极客之音——专业性很强的中文编程技术网站,欢迎收藏到浏览器,订阅我们!