【已解决】OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.

The specific error problem is:

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

There are solutions available online:

add this code

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

BUT, but 

It's useless to me. In fact, the translation of the above reasons is:

Multiple copies of the OpenMP runtime are linked into the program. This is dangerous because it can degrade performance or lead to wrong results. Best practice is to ensure that only one OpenMP runtime is linked into the process, e.g. avoid statically linking the OpenMP runtime in any library

To put it bluntly, your computer performance is not enough, you have to reduce the demand, (for me because: I double-opened two Pycharm, one runs the model, and the other wants to render 3D images showing medicine)

Hahaha, I have tossed my precious computer so much, I will definitely give you an error

Solution:

  1. Reduce demand, if it is a model, reduce Batch_size, or others
  2. The performance of the memory is not enough, so turn off other software that can be turned off
  3. After the program finishes running, run the next program

Guess you like

Origin blog.csdn.net/qq_42792802/article/details/128004791