peterwittek / somoclu

Massively parallel self-organizing maps: accelerate training on multicore CPUs, GPUs, and clusters
https://peterwittek.github.io/somoclu/
MIT License
265 stars 68 forks source link

OMP: Error #15: Initializing libomp.dylib, but found libiomp5.dylib already initialized multiple copies of the OpenMP runtime have been linked into the program #135

Open isaac-you opened 5 years ago

isaac-you commented 5 years ago

when I use somoclu on ubuntu, there is no problem and perform perfectly with 100% cpu usage, but when I do the same experiment on Macbookpro with spyder IDE, it tells me that "OMP: Error #15: Initializing libomp.dylib, but found libiomp5.dylib 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.

can you tell me how to fix the problem?

xgdgsc commented 5 years ago

Are you using the conda forge version?

personalaccount commented 5 years ago

If you're on MacOS , then do the following to solve the issue:

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

Answer found at: https://github.com/dmlc/xgboost/issues/1715

i1mT commented 5 years ago

It's work! Tks

maddogAI commented 4 years ago

Can anyone tell me what this code actually means? I ran into the same issue and used the same code, but I don't understand what its actually accomplishing