模型训练 – 解决启动深度学习项目出现OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized问题
今天在开始跑一个深度学习项目时,在启动时,程序出现了以下的错误,
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
已经被初始化了导致的错误,这个有可能是因为系统环境中存在多个版本的OpenMP库导致,可能是由于你的电脑使用Anaconda管理了多个Python虚拟环境,并且每个环境中都安装了Pytorch库,导致每个环境中都有libiomp5md.dll
。
网上大多数人给出的解决方案就是修改系统的环境变量,如下
import os
os.environ['KMP_DUPLICATE_LIB_OK'] = 'True'
将KMP_DUPLICATE_LIB_OK
设置为True即可,但是我测试了有更加简单的办法就是重启电脑,重启电脑之后这个问题就会被修复。
本文作者:StubbornHuang
版权声明:本文为站长原创文章,如果转载请注明原文链接!
原文标题:模型训练 – 解决启动深度学习项目出现OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized问题
原文链接:https://www.stubbornhuang.com/2378/
发布于:2022年09月30日 14:57:51
修改于:2022年09月30日 14:57:51
当前分类随机文章推荐
- 模型训练 - 解决启动深度学习项目出现OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized问题 阅读878次,点赞0次
- 神经网络 - 模型训练需注意的细节与超参数调优 阅读1100次,点赞1次
全站随机文章推荐
- Modern OpenGL - GLSL着色语言3:GLSL中的数据类型 阅读2201次,点赞0次
- Centos7 - frp内网穿透,访问内网web服务/访问内网websocket服务 阅读3301次,点赞1次
- WordPress - 网站性能优化,延迟加载css和js文件 阅读153次,点赞0次
- C++ - 使用Spout2将视频流发送到OBS 阅读228次,点赞0次
- CUDA 安装报错 could not create file "...\chrome_elf.dll" 阅读2334次,点赞0次
- 在CSDN写博客五年之后,我成为了博客专家 阅读2280次,点赞0次
- C++ - C++实现Python numpy的矩阵维度转置算法,例如(N,H,W,C)转换为(N,C,H,W) 阅读5060次,点赞4次
- 资源分享 - Geometry for Computer Graphics - Formulae, Examples and Proofs 英文高清PDF下载 阅读1836次,点赞0次
- 资源分享 - 非均匀有理B样条(第二版,Les Piegl),The NURBS Book中文译文版下载 阅读11239次,点赞10次
- Pytorch - masked_fill方法参数详解与使用 阅读1301次,点赞0次
评论
169