PPL Logo

conv-core/cpuaffinity.C File Reference

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 rankMsgrankmsg = NULL
static CmmTable hostTable
static CmiNodeLock affLock = 0
int CmiMyLocalRank


Typedef Documentation

typedef struct _hostnameMsg hostnameMsg

typedef struct _rankMsg rankMsg

typedef struct _affMsg affMsg


Function Documentation

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().

Here is the caller graph for this function:

static int in_exclude ( int  core  )  [static]

Definition at line 106 of file cpuaffinity.C.

References excludecore, and excludecount.

Referenced by add_exclude(), and cpuAffinityHandler().

Here is the caller graph for this function:

static void add_exclude ( int  core  )  [static]

Definition at line 113 of file cpuaffinity.C.

References excludecore, excludecount, and in_exclude().

Referenced by CmiInitCPUAffinity().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

int CmiSetCPUAffinity ( int  mycore  ) 

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().

Here is the call graph for this function:

Here is the caller graph for this function:

int print_cpu_affinity ( void   ) 

Definition at line 225 of file cpuaffinity.C.

References CmiMyPe(), CmiPrintf(), and free().

Referenced by CmiPrintCPUAffinity().

Here is the call graph for this function:

Here is the caller graph for this function:

int print_thread_affinity ( void   ) 

Definition at line 252 of file cpuaffinity.C.

References CmiMyPe(), CmiPrintf(), free(), and Cpthread_s::thread.

Referenced by CmiPrintCPUAffinity().

Here is the call graph for this function:

Here is the caller graph for this function:

int CmiPrintCPUAffinity ( void   ) 

Definition at line 287 of file cpuaffinity.C.

References CmiPrintf(), print_cpu_affinity(), and print_thread_affinity().

Referenced by CmiInitCPUAffinity().

Here is the call graph for this function:

Here is the caller graph for this function:

int get_cpu_affinity ( cpu_set_t *  cpuset  ) 

Definition at line 297 of file cpuaffinity.C.

Referenced by get_affinity().

Here is the caller graph for this function:

int get_thread_affinity ( cpu_set_t *  cpuset  ) 

Definition at line 307 of file cpuaffinity.C.

Referenced by get_affinity().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

int CmiOnCore ( void   ) 

Definition at line 330 of file cpuaffinity.C.

References CmiAbort(), and n.

Referenced by FuncCkLoop::createPThreads().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

static int search_pemap ( char *  pecoremap,
int  pe 
) [static]

Definition at line 492 of file cpuaffinity.C.

References count, free(), h, int, malloc(), and stride.

Referenced by CmiInitCPUAffinity().

Here is the call graph for this function:

Here is the caller graph for this function:

CLINKAGE int getXTNodeID ( int  mpirank,
int  nummpiranks 
)

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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

void CmiInitCPUAffinity ( char **  argv  ) 


Variable Documentation

Definition at line 38 of file cpuaffinity.C.

Referenced by ConverseInit(), and printTopology().

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]

Definition at line 98 of file cpuaffinity.C.

Referenced by CmiInitCPUAffinity().

int affMsgsRecvd = 1 [static]

Definition at line 101 of file cpuaffinity.C.

Referenced by CmiCheckAffinity(), and cpuPhyNodeAffinityRecvHandler().

cpu_set_t core_usage [static]

int aff_is_set = 0 [static]

Definition at line 103 of file cpuaffinity.C.

Referenced by CmiCheckAffinity(), and CmiInitCPUAffinity().

Definition at line 362 of file cpuaffinity.C.

Referenced by CmiInitCPUAffinity().

Definition at line 363 of file cpuaffinity.C.

Referenced by CmiInitCPUAffinity().

Definition at line 364 of file cpuaffinity.C.

Referenced by CmiCheckAffinity(), and CmiInitCPUAffinity().

rankMsg* rankmsg = NULL [static]

Definition at line 388 of file cpuaffinity.C.

CmmTable hostTable [static]

Definition at line 389 of file cpuaffinity.C.

Referenced by cpuTopoHandler().

CmiNodeLock affLock = 0 [static]

Definition at line 390 of file cpuaffinity.C.

Referenced by CmiInitCPUAffinity().


Generated on Mon Sep 21 08:01:29 2020 for Charm++ by  doxygen 1.5.5