DASH
0.3.0
|
Wrapper of a single dart_unit_locality_t
object.
More...
#include <UnitLocality.h>
Public Member Functions | |
UnitLocality (const dash::Team &team, team_unit_t unit) | |
UnitLocality (global_unit_t unit) | |
UnitLocality (const UnitLocality &)=default | |
UnitLocality & | operator= (const UnitLocality &)=default |
const dart_hwinfo_t & | hwinfo () const |
dart_hwinfo_t & | hwinfo () |
dart_domain_locality_t & | domain () |
const dart_domain_locality_t & | domain () const |
const dash::Team & | team () const |
team_unit_t | unit_id () const |
dash::util::LocalityDomain & | node_domain () |
dash::util::LocalityDomain | parent () |
dash::util::LocalityDomain | parent_in_scope (dash::util::Locality::Scope scope) |
std::string | domain_tag () const |
std::string | host () const |
void | set_domain_tag (const std::string &tag) |
void | set_host (const std::string &hostname) |
int | num_cores () const |
int | min_threads () |
int | max_threads () |
int | num_threads () const |
int | num_numa () const |
int | numa_id () const |
int | cpu_id () const |
int | cpu_mhz () const |
int | max_shmem_mbps () const |
int | max_cpu_mhz () |
int | min_cpu_mhz () |
int | cache_line_size (int cache_level) |
std::string | hostname () |
int | num_domain_threads () |
Number of threads currently available to the active unit. More... | |
Wrapper of a single dart_unit_locality_t
object.
Definition at line 30 of file UnitLocality.h.
|
inline |
Number of threads currently available to the active unit.
The returned value is calculated from unit locality data and hardware specifications and can, for example, be used to set the num_threads
parameter of OpenMP sections:
The following configuration keys affect the number of available threads:
DASH_DISABLE_THREADS
: If set, disables multi-threading at unit scope and this method returns 1.DASH_MAX_SMT
: If set, virtual SMT CPUs (hyperthreads) instead of physical cores are used to determine availble threads.DASH_MAX_UNIT_THREADS
: Specifies the maximum number of threads available to a single unit.Note that these settings may differ between hosts.
Example for MPI:
mpirun -host node.0 -env DASH_MAX_UNIT_THREADS 4 -n 16 myprogram : -host node.1 -env DASH_MAX_UNIT_THREADS 2 -n 32 myprogram
The DASH configuration can also be changed at run time with the dash::util::Config
interface.
Definition at line 306 of file UnitLocality.h.
Referenced by dash::fill(), and dash::min_element().