Bugfix/multithreading
A few changes to the way multithreading is handles (includes a bugfix):
-
dune/fem/function/localfunction/bindable.hh
stored anEntity
and not like other structures anEntity*
. That works fine with single threads and also often with multithreading. An error occurred when a multithreadedGeometryGP
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 variableDUNE_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.