SBU-BMI / wsinfer

🔥 🚀 Blazingly fast pipeline for patch-based classification in whole slide images
https://wsinfer.readthedocs.io
Apache License 2.0
55 stars 9 forks source link

Report of Multiple OpenMP Runtime Instances Linked in Software Installation on Windows 10 #212

Closed jeginderof closed 5 months ago

jeginderof commented 5 months ago

(base) C:>wsinfer --help 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/.

(base) C:>

kaczmarj commented 5 months ago

Thanks for the report. Could you please provide the following information to help us track down the issue?- your operating system and version- how did you install wsinfer?- which version of wsinfer are you using?- which version of PyTorch are you using?- how did you install PyTorch?I’m wondering which of our dependencies use openmp. They could include PyTorch, numpy, and shapely.On Feb 6, 2024, at 02:58, jeginderof @.***> wrote: (base) C:>wsinfer --help 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/. (base) C:>

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

jeginderof commented 5 months ago

Thank you for following up on the issue.

your operating system and version

windows 10.0.19045.3930

how did you install wsinfer?

python -m pip install wsinfer

- which version of wsinfer are you using?

I tried to install it today, then it should be the latest version

- which version of PyTorch are you using?- how did you install PyTorch?

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

jeginderof commented 5 months ago

I tried to update:

python -m pip install git+https://github.com/SBU-BMI/wsinfer

but still issue persists:

Uninstalling wsinfer-0.5.0:
      Successfully uninstalled wsinfer-0.5.0
Successfully installed wsinfer-0.5.1.dev5+gd28caf1
PS C:\Users\pqmao> wsinfer --help
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 c
an 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/product
s/support/.
kaczmarj commented 5 months ago

Thanks. Let me debug this and see where the issue is coming from. Please ping me here if you don’t here from me in a few days. On Feb 6, 2024, at 10:13, jeginderof @.***> wrote: I tried to update: python -m pip install git+https://github.com/SBU-BMI/wsinfer but still issue persists: Uninstalling wsinfer-0.5.0: Successfully uninstalled wsinfer-0.5.0 Successfully installed wsinfer-0.5.1.dev5+gd28caf1 PS C:\Users\pqmao> wsinfer --help 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 c an 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/product s/support/.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

kaczmarj commented 5 months ago

@jeginderof - can you please try creating a new virtual environment for wsinfer? using something like venv in the standard library.

another potential solution is to uninstall and reinstall numpy.

jeginderof commented 5 months ago

Thank you, Now it works

wsinfer --help
Usage: wsinfer [OPTIONS] COMMAND [ARGS]...

  Run patch-level classification inference on whole slide images.

Options:
  --backend [openslide|tiffslide]
                                  Backend for loading whole slide images.
  --log-level [debug|info|warning|error|critical]
                                  Set the loudness of logging.
  --version                       Show the version and exit.
  --help                          Show this message and exit.

Commands:
  patch  Patch a directory of whole slide iamges.
  run    Run model inference on a directory of whole slide images.
  tosbu  Convert model outputs to Stony Brook format.
kaczmarj commented 5 months ago

excellent, glad this worked. closing the issue now.