Skip to content

Bugfix/multithreading

Andreas Dedner requested to merge bugfix/multithreading into master

A few changes to the way multithreading is handles (includes a bugfix):

  • dune/fem/function/localfunction/bindable.hh stored an Entity and not like other structures an Entity*. That works fine with single threads and also often with multithreading. An error occurred when a multithreaded GeometryGP was used. This fixes the issue but there might be some other reason. Error was segfault
  • this MR changes the way the max number of threads are determined. If the user doesn't fix anything then both pthreads and OMP now use a hardware default. So this is used if no environment variable is set (was singlethreaded before). In addition to OMP_NUM_THREADS (which was also used in _fem.cc for pthreads this MR adds another environment variable DUNE_NUM_THREADS. So the main difference to before the MR is that a part of the code which uses multithreading is run in parallel by default except when turned off instead of running in serial by default.

Merge request reports