Go to the source code of this file.
Data Structures | |
struct | _hostnameMsg |
struct | _rankMsg |
struct | _affMsg |
Typedefs | |
typedef struct _hostnameMsg | hostnameMsg |
typedef struct _rankMsg | rankMsg |
typedef struct _affMsg | affMsg |
Functions | |
CpvDeclare (int, myCPUAffToCore) | |
CpvDeclare (void *, myProcStatFP) | |
void | CmiInitHwlocTopology (void) |
static int | in_exclude (int core) |
static void | add_exclude (int core) |
static int | set_process_affinity (hwloc_topology_t topology, hwloc_cpuset_t cpuset) |
static int | set_thread_affinity (hwloc_topology_t topology, hwloc_cpuset_t cpuset) |
int | CmiSetCPUAffinity (int mycore) |
int | print_cpu_affinity (void) |
int | print_thread_affinity (void) |
int | CmiPrintCPUAffinity (void) |
int | get_cpu_affinity (cpu_set_t *cpuset) |
int | get_thread_affinity (cpu_set_t *cpuset) |
int | get_affinity (cpu_set_t *cpuset) |
int | CmiOnCore (void) |
static void | cpuAffinityHandler (void *m) |
static void | cpuAffinityRecvHandler (void *msg) |
static void | cpuPhyNodeAffinityRecvHandler (void *msg) |
static int | search_pemap (char *pecoremap, int pe) |
CLINKAGE int | getXTNodeID (int mpirank, int nummpiranks) |
getXTNodeID returns nodeID corresponding to the MPI rank (possibly obtained from CmiMyNode()/CmiNodeOf(pe)) passed to it | |
void | CmiCheckAffinity (void) |
Check that there are not multiple PEs assigned to the same core. | |
static void | bind_process_only (hwloc_obj_type_t process_unit) |
static void | bind_threads_only (hwloc_obj_type_t thread_unit) |
static void | bind_process_and_threads (hwloc_obj_type_t process_unit, hwloc_obj_type_t thread_unit) |
static int | set_default_affinity (void) |
void | CmiInitCPUAffinity (char **argv) |
void | CmiInitCPUAffinityUtil (void) |
Variables | |
CmiHwlocTopology | CmiHwlocTopologyLocal |
static int | excludecore [MAX_EXCLUDE] = {-1} |
static int | excludecount = 0 |
static int | affinity_doneflag = 0 |
static int | affMsgsRecvd = 1 |
static cpu_set_t | core_usage |
static int | aff_is_set = 0 |
static int | cpuAffinityHandlerIdx |
static int | cpuAffinityRecvHandlerIdx |
static int | cpuPhyNodeAffinityRecvHandlerIdx |
static rankMsg * | rankmsg = NULL |
static CmmTable | hostTable |
static CmiNodeLock | affLock = 0 |
int | CmiMyLocalRank |
typedef struct _hostnameMsg hostnameMsg |
CpvDeclare | ( | int | , | |
myCPUAffToCore | ||||
) |
CpvDeclare | ( | void * | , | |
myProcStatFP | ||||
) |
void CmiInitHwlocTopology | ( | void | ) |
Definition at line 40 of file cpuaffinity.C.
References CmiHwlocTopology::num_cores, CmiHwlocTopology::num_pus, and CmiHwlocTopology::num_sockets.
Referenced by ConverseInit().
Definition at line 106 of file cpuaffinity.C.
References excludecore, and excludecount.
Referenced by add_exclude(), and cpuAffinityHandler().
static void add_exclude | ( | int | core | ) | [static] |
Definition at line 113 of file cpuaffinity.C.
References excludecore, excludecount, and in_exclude().
Referenced by CmiInitCPUAffinity().
static int set_process_affinity | ( | hwloc_topology_t | topology, | |
hwloc_cpuset_t | cpuset | |||
) | [static] |
Definition at line 124 of file cpuaffinity.C.
References CmiMyPe(), CmiPhysicalNodeID(), CmiPrintf(), and free().
Referenced by bind_process_and_threads(), bind_process_only(), and CmiSetCPUAffinity().
static int set_thread_affinity | ( | hwloc_topology_t | topology, | |
hwloc_cpuset_t | cpuset | |||
) | [static] |
Definition at line 156 of file cpuaffinity.C.
References CmiMyPe(), CmiPhysicalNodeID(), CmiPrintf(), free(), and Cpthread_s::thread.
Referenced by bind_process_and_threads(), bind_threads_only(), and CmiSetCPUAffinity().
Definition at line 189 of file cpuaffinity.C.
References CmiAbort(), CmiError(), CmiNumCores(), set_process_affinity(), and set_thread_affinity().
Referenced by CmiInitCPUAffinity(), cpuAffinityRecvHandler(), and ndhThreadWork().
int print_cpu_affinity | ( | void | ) |
Definition at line 225 of file cpuaffinity.C.
References CmiMyPe(), CmiPrintf(), and free().
Referenced by CmiPrintCPUAffinity().
int print_thread_affinity | ( | void | ) |
Definition at line 252 of file cpuaffinity.C.
References CmiMyPe(), CmiPrintf(), free(), and Cpthread_s::thread.
Referenced by CmiPrintCPUAffinity().
int CmiPrintCPUAffinity | ( | void | ) |
Definition at line 287 of file cpuaffinity.C.
References CmiPrintf(), print_cpu_affinity(), and print_thread_affinity().
Referenced by CmiInitCPUAffinity().
int get_cpu_affinity | ( | cpu_set_t * | cpuset | ) |
Definition at line 297 of file cpuaffinity.C.
Referenced by get_affinity().
int get_thread_affinity | ( | cpu_set_t * | cpuset | ) |
Definition at line 307 of file cpuaffinity.C.
Referenced by get_affinity().
int get_affinity | ( | cpu_set_t * | cpuset | ) |
Definition at line 321 of file cpuaffinity.C.
References get_cpu_affinity(), and get_thread_affinity().
Referenced by CmiCheckAffinity().
int CmiOnCore | ( | void | ) |
Definition at line 330 of file cpuaffinity.C.
References CmiAbort(), and n.
Referenced by FuncCkLoop::createPThreads().
static void cpuAffinityHandler | ( | void * | m | ) | [static] |
Definition at line 393 of file cpuaffinity.C.
References CmiFree(), CmiMyPe(), Converse::CmiSyncBroadcastAllAndFree(), CmmEntries(), CmmFree(), CmmPut(), count, in_exclude(), _hostnameMsg::ip, msg, _hostnameMsg::ncores, _rankMsg::nodes, npes, _hostnameMsg::pe, _hostnameMsg::rank, _rankMsg::ranks, _hostnameMsg::seq, and tag.
Referenced by CmiInitCPUAffinity().
static void cpuAffinityRecvHandler | ( | void * | msg | ) | [static] |
Definition at line 455 of file cpuaffinity.C.
References CmiAbort(), CmiFree(), CmiMyPe(), CmiPrintf(), CmiSetCPUAffinity(), int, PUP::m, _rankMsg::nodes, and _rankMsg::ranks.
Referenced by CmiInitCPUAffinity().
static void cpuPhyNodeAffinityRecvHandler | ( | void * | msg | ) | [static] |
Definition at line 477 of file cpuaffinity.C.
References _affMsg::affinity, affMsgsRecvd, CmiFree(), core_usage, and PUP::m.
Referenced by CmiInitCPUAffinity().
Definition at line 492 of file cpuaffinity.C.
References count, free(), h, int, malloc(), and stride.
Referenced by CmiInitCPUAffinity().
getXTNodeID returns nodeID corresponding to the MPI rank (possibly obtained from CmiMyNode()/CmiNodeOf(pe)) passed to it
Definition at line 39 of file CrayNid.c.
Referenced by CmiInitCPUAffinity(), and LrtsInitCpuTopo().
static void bind_process_only | ( | hwloc_obj_type_t | process_unit | ) | [static] |
Definition at line 635 of file cpuaffinity.C.
References CmiMyLocalRank, and set_process_affinity().
Referenced by set_default_affinity().
static void bind_threads_only | ( | hwloc_obj_type_t | thread_unit | ) | [static] |
Definition at line 660 of file cpuaffinity.C.
References CmiMyRank(), and set_thread_affinity().
Referenced by set_default_affinity().
static void bind_process_and_threads | ( | hwloc_obj_type_t | process_unit, | |
hwloc_obj_type_t | thread_unit | |||
) | [static] |
Definition at line 687 of file cpuaffinity.C.
References CmiMyLocalRank, CmiMyRank(), set_process_affinity(), and set_thread_affinity().
Referenced by set_default_affinity().
static int set_default_affinity | ( | void | ) | [static] |
Definition at line 717 of file cpuaffinity.C.
References bind_process_and_threads(), bind_process_only(), bind_threads_only(), n, and PUP::s.
Referenced by CmiInitCPUAffinity().
void CmiInitCPUAffinity | ( | char ** | argv | ) |
Definition at line 773 of file cpuaffinity.C.
References add_exclude(), aff_is_set, affinity_doneflag, affLock, buf, CmiAbort(), CmiAlloc(), CmiAssignOnce(), CmiCreateLock(), CmiDeliverSpecificMsg(), CmiGetArgFlagDesc(), CmiGetArgIntDesc(), CmiGetArgStringDesc(), CmiLock(), CmiMyPe(), CmiMyPeGlobal(), CmiMyRank(), CmiNodeAllBarrier(), CmiNodeFirst(), CmiNodeOf(), CmiNumCores(), CmiPhysicalNodeID(), CmiPrintCPUAffinity(), CmiPrintf(), CmiRegisterHandler(), CmiSetCPUAffinity(), Converse::CmiSyncSendAndFree(), CmiUnlock(), CmmNew(), core_usage, cpuAffinityHandler(), cpuAffinityHandlerIdx, cpuAffinityRecvHandler(), cpuAffinityRecvHandlerIdx, cpuPhyNodeAffinityRecvHandler(), cpuPhyNodeAffinityRecvHandlerIdx, CpuTopoDetails::done, excludecore, excludecount, getXTNodeID(), int, malloc(), msg, n, nnodes, search_pemap(), set_default_affinity(), and skt_my_ip().
Referenced by _initCharm().
int excludecore[MAX_EXCLUDE] = {-1} [static] |
Definition at line 95 of file cpuaffinity.C.
Referenced by add_exclude(), CmiInitCPUAffinity(), and in_exclude().
int excludecount = 0 [static] |
Definition at line 96 of file cpuaffinity.C.
Referenced by add_exclude(), CmiInitCPUAffinity(), and in_exclude().
int affinity_doneflag = 0 [static] |
int affMsgsRecvd = 1 [static] |
Definition at line 101 of file cpuaffinity.C.
Referenced by CmiCheckAffinity(), and cpuPhyNodeAffinityRecvHandler().
cpu_set_t core_usage [static] |
Definition at line 102 of file cpuaffinity.C.
Referenced by CmiCheckAffinity(), CmiInitCPUAffinity(), and cpuPhyNodeAffinityRecvHandler().
int aff_is_set = 0 [static] |
Definition at line 103 of file cpuaffinity.C.
Referenced by CmiCheckAffinity(), and CmiInitCPUAffinity().
int cpuAffinityHandlerIdx [static] |
int cpuAffinityRecvHandlerIdx [static] |
int cpuPhyNodeAffinityRecvHandlerIdx [static] |
Definition at line 364 of file cpuaffinity.C.
Referenced by CmiCheckAffinity(), and CmiInitCPUAffinity().
Definition at line 388 of file cpuaffinity.C.
CmiNodeLock affLock = 0 [static] |