Hardware detection clean-up and pre/post-processing
This change cleans up the various tests and hacks we have
had in different places to remove a number of false warnings
and errors. It also unifies all this processing to two
small routines that are called just before/after the
hardware is detected, so the user can choose whether it
should be done or not in other places.
- Rather than trying to guess when we should or shouldn't
override the number of cores online, the preprocessing
uses a piece of code that allows sleeping cores to come
online automatically by running a small C++11 thread loop before
doing the hardware topology detection. This way we can
remove all ARM-specific paths. To avoid wasting a second
on systems where SMT is disabled, we avoid calling it on x86.
- All SMT warnings are handled in the post-processing call,
but only as notes in the log file to avoid writing
warnings on stderr.
- The check for OpenMP thread mismatch has been removed
since it caused incorrect warnings by comparing the number
or threads configured for each OpenMP process with the
total number of cores in the entire system. We will have
to rewrite this later as a test in the MPI/OpenMP
parallelization setup instead.
By sticking with the hwloc/sysconf-online detection, we should
now also handle all special cases where cores have been taken
offline manually in a correct way without using hardware-specific
paths.
Change-Id: I37edb3eada3f4c8c0906c641c7041cc0270985e8