Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Combining Tulip + matplotlib/pyplot (without GUI) - OMP conflicts #172

Open
renoust opened this issue May 22, 2020 · 0 comments
Open

Combining Tulip + matplotlib/pyplot (without GUI) - OMP conflicts #172

renoust opened this issue May 22, 2020 · 0 comments

Comments

@renoust
Copy link

renoust commented May 22, 2020

Hi,

I am running under osx some code with the goal of combining some pyplot elements with tulip data. My context is python 3.7.6 under anaconda, with matplotlib 3.1.3, and Tulip 5.3.1 installed from pip.

The conflict comes from loading both matplotlib and tulip libraries, but only appears while running some matplotlib code.

OMP: Error #15: Initializing libiomp5.dylib, but found libomp.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. 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/.

The suggested workaround so far works for me, but I am unsure to what extent. I leave it below if anyone encounters it (put it before importing tulip and matplotlib).

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

Note that I did not recall having the issue on python 2.7 (but maybe I am wrong), and that I am using tulip out of the GUI (the distributed binaries for OSX not including a python3 version yet).

Cheers,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant