vnlb icon indicating copy to clipboard operation
vnlb copied to clipboard

OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option.

Open huanzheng551803 opened this issue 3 years ago • 1 comments

When I run the main function on a sequence with 2 images. It always give us a warning "OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option". Also it seems that the program does no stop even after 5 mins. How can I solve this issue?

huanzheng551803 avatar Oct 29 '21 08:10 huanzheng551803

Sorry for the late reply. I never encountered this problem, but apparently this comes from VNLB trying to use parallelization with OpenMP, but OpenBLAS being built without OpenMP support.

So, there are two things you can try.

  1. Disable OpenMP parallelization in VNLB (which will make it run slower)
  2. Recompile OpenBLAS with OpenMP support.

For option 2, you need to download the source code of OpenBLAS and compile it with the flag USE_OPENMP=1. Probably something like this:

make USE_OPENMP=1

I never compiled OpenBLAS from its source code, so I won't be able to help you with that.

For option 1, you can either

  • disable OpenMP at compilation by commenting in the main CMakeList.txt file the lines 30-35, or
  • set OMP_NUM_THREADS=1 before calling the denoising program (assuming you are working in Linux) . You can do that with the command
export OMP_NUM_THREADS=1

pariasm avatar Nov 02 '21 15:11 pariasm