Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling OpenMP for Windows & Linux #1081

Closed
Belval opened this issue Aug 14, 2017 · 2 comments
Closed

Disabling OpenMP for Windows & Linux #1081

Belval opened this issue Aug 14, 2017 · 2 comments
Labels

Comments

@Belval
Copy link

Belval commented Aug 14, 2017

Environment

  • Tesseract Version: Latest / cloned from master
  • Platform: Windows 10 x64 with VS2017

Current Behavior:

The compiling section does not explain how to compile under Windows without OpenMP (neither under Linux mind you). How can it be done?

Expected Behavior:

The compiling section of the wiki should include such informations as they are quite important if the binaries are to be used in a heavily threaded environnement.

Suggested Fix:

For Linux, add a line in the wiki about using ./configure --disable-openmp flag (although you can simply use ./configure --help)

For Windows, add a line explaining how it can be done (I haven't figured out that one yet)

I am more than willing to make a PR for this if you consider it necessary, if not, how can it be achieved under Windows?

@stweil
Copy link
Contributor

stweil commented Aug 14, 2017

The option --disable-openmp works for Windows with Mingw-w64, too. You don't need it neither for Linux nor for Windows, because it is possible to tell OpenMP not to create any threads:

export OMP_THREAD_LIMIT=1
tesseract ...

or

OMP_THREAD_LIMIT=1 tesseract ...

You can help improving the Wiki by adding any important information which is currently missing.

@Belval
Copy link
Author

Belval commented Aug 14, 2017

@stweil Thank you for the quick response. I am using MSVC. Any parameter for that one? Also how can I set OMP_THREAD_LIMIT in Windows?

Doing SET OMP_THREAD_LIMIT=1 then calling tesseract.exe works

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

No branches or pull requests

3 participants