当前位置:网站首页>Deoldify project problem - omp:error 15:initializing libiomp5md dll,but found libiomp5md. dll already initialized.

Deoldify project problem - omp:error 15:initializing libiomp5md dll,but found libiomp5md. dll already initialized.

2022-07-06 11:07:00 zkkkkkkkkkkkkk

Catalog

One 、 Error message

Two 、 reason

3、 ... and 、 resolvent


One 、 Error message

         The complete error report is as follows :

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

 

Two 、 reason

        New virtual environment , Then run the program and report an error . There are two reasons to search online in the virtual environment libiomp5md.dll file . One is in pytorch In the bag , The other is in the directory where the virtual environment is located . It's strange that these two files .

 

 

 

3、 ... and 、 resolvent

        Check the relevant articles and blogs online , Two methods are summarized .

        1) The code to solve

                I'm reporting a mistake Python Use in script os modular , Add environment variables . The code is as follows :

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

 

        2) Manual solution

                Will already exist two libiomp5md.dll Delete one ( The first method is recommended , Because no one knows whether deleting will affect other packages , Which leads to other errors )

原网站

版权声明
本文为[zkkkkkkkkkkkkk]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060912331935.html