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

Feature/10330 threadpool working with clang #47

Merged
merged 16 commits into from Nov 12, 2014

Conversation

quantumsteve
Copy link
Contributor

Clang lacks openmp and currently runs everything serially. The ThreadPool class only depends minimally on openmp (determining the number of processors and managing logging from individual threads) and therefore is easy to get working with clang. I also replaced PARALLEL_CRITICAL macros in LoadEventNexus and EventWorkspace with mutexes that will behave the same with and without openmp.

testing: code review double-checking there aren't other algorithms where using the threadpool without openmp might create a race condition. Verify that tests still pass, including those currently disabled in ThreadPoolTest.h.

http://trac.mantidproject.org/mantid/ticket/10330

@mantid-builder
Copy link
Collaborator

Can one of the admins verify this patch?

@stuartcampbell
Copy link
Collaborator

test this please

@quantumsteve
Copy link
Contributor Author

test this please

@peterfpeterson peterfpeterson added this to the Release 3.3 milestone Oct 27, 2014
@peterfpeterson peterfpeterson self-assigned this Oct 27, 2014
@peterfpeterson
Copy link
Member

The things that have both PARALLEL_CRITICAL and ThreadPool are:

  • LoadEventNexus.cpp (already done)
  • MultiThreaded.h (defines the macro)
  • BinMD.cpp (fixed in f793d15)
  • ConvertToDiffractionMDWorkspace.cpp (in a comment)
  • ResolutionConvolvedCrossSection.cpp

@quantumsteve
Copy link
Contributor Author

test this please

It will have the same effect but not require the look to run under OpenMP
Refs #10330
They have nothing to do with OpenMP so avoid any ambiguity.
Refs #10330
@martyngigg
Copy link
Member

test this please

@peterfpeterson peterfpeterson merged commit 3e07fb0 into master Nov 12, 2014
@peterfpeterson peterfpeterson deleted the feature/10330_threadpool_working_with_clang branch November 12, 2014 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants