OpenMP alternatives #258

Open
ivan-ushakov opened this Issue Mar 20, 2017 · 4 comments

Comments

Projects
None yet
4 participants

As I understand current version uses OpenMP only for parallel for operation. Not all platforms support OpenMP. For example Android and iOS doesn't. On the other hand it is possible build Intel TBB library for that platforms.
So my idea is to have abstraction for parallel processing or maybe we can switch to Intel TBB (Apache license). What do you think?

Contributor

pmoulon commented Mar 20, 2017

Does anyone can be interested also in considering using the c++11 thread features?

I guess we need high level solution not just plain threads because in this case we have to create parallel for from zero. Also I think that TBB uses C++11 features.

Contributor

sandwichmaker commented Mar 21, 2017

This comes up regularly. Up till now we have held the line on not requiring the use of c++11 in the code base. @keir can say more.

keir was assigned by sandwichmaker Mar 26, 2017

Contributor

keir commented Mar 26, 2017

We are still holding the line on no C++11 features in the core, but I'm happy for us to support C++11 optionally if it provides clear benefits to some users. The issue we've had in the past is that it is hard to replace OpenMP's parallel for in straight C++11; you need to replicate all the scheduling and batching logic. TBB is the most likely candidate, but it's a heavy dependency. It's also awkward to support multiple concurrency approaches in the same codebase. So here is how I feel about it.

  1. OpenMP support must remain; it's still a good solution even today and works out-of-the-box without dependencies on several platforms.
  2. C++11 optional implementations are welcome.
  3. TBB optional implementations are welcome.

The key question is how to add #2 and #3 without either making multiple copies of the evaluator and schur eliminator, and without making the code horribly complex and brittle. Ideas or patches are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment