Go to the source code of this file.
Functions | |
void | CmiPushNode (void *msg) |
static int | HelperOnCore () |
static void * | ndhThreadWork (void *id) |
CpvStaticDeclare (int, chunkHandler) | |
CpvStaticDeclare (int, hybridHandler) | |
CpvStaticDeclare (int, NdhStealWorkHandler) | |
static void | RegisterCkLoopHdlrs () |
Variables | |
static CMK_THREADLOCAL pthread_cond_t | thdCondition |
static CMK_THREADLOCAL pthread_mutex_t | thdLock |
static FuncCkLoop * | mainHelper = NULL |
static int | mainHelperPhyRank = 0 |
static int | numPhysicalPEs = 0 |
static CurLoopInfo * | pthdLoop = NULL |
static pthread_mutex_t ** | allLocks = NULL |
static pthread_cond_t ** | allConds = NULL |
static pthread_t * | ndhThreads = NULL |
static volatile int | gCrtCnt = 0 |
static volatile int | exitFlag = 0 |
static FuncCkLoop * | globalCkLoop = NULL |
static int | _ckloopEP |
void CmiPushNode | ( | void * | msg | ) |
Definition at line 497 of file machine-common-core.C.
References _Cmi_sleepOnIdle, CmiIdleLock_addMessage(), CmiLock(), CmiPushImmediateMsg(), CmiUnlock(), CmiStateStruct::idle, and MPMCQueuePush().
Referenced by handleOneRecvedMsg(), FuncCkLoop::parallelizeFunc(), and processNodeBcastMsg().
static void* ndhThreadWork | ( | void * | id | ) | [static] |
Definition at line 57 of file CkLoop.C.
References allConds, allLocks, CKLOOP_TREE, CmiSetCPUAffinity(), exitFlag, gCrtCnt, FuncCkLoop::getNumHelpers(), FuncCkLoop::getSchedPolicy(), mainHelperPhyRank, numPhysicalPEs, size_t, CurLoopInfo::stealWork(), thdCondition, and thdLock.
Referenced by FuncCkLoop::createPThreads().
CpvStaticDeclare | ( | int | , | |
chunkHandler | ||||
) |
CpvStaticDeclare | ( | int | , | |
hybridHandler | ||||
) |
CpvStaticDeclare | ( | int | , | |
NdhStealWorkHandler | ||||
) |
static void RegisterCkLoopHdlrs | ( | ) | [static] |
Author: Vivek Kale Contributors: Harshitha Menon, Karthik Senthil Kumar
The CkLoop_Hybrid library is a mode of CkLoop that incorporates specific adaptive scheduling strategies aimed at providing a tradeoff between dynamic load balance and spatial locality. It is used in a build of Charm++ where all chares are placed on core 0 of each node (called the drone-mode, or all-drones-mode). It incorporates a strategy called staggered static-dynamic scheduling (from dissertation work of Vivek Kale). The iteration space is first tentatively divided approximately equally to all available PEs. Each PE's share of the iteration space is divided into a static portion, specified by the staticFraction parameter below, and the remaining dynamic portion. The dynamic portion of a PE is divided into chunks of specified chunksize, and enqueued in the task-queue associated with that PE. Each PE works on its static portion, and then on its own task queue (thus preserving spatial locality, as well as persistence of allocations across outer iterations), and after finishing that, steals work from other PE’s task queues.
CkLoop_Hybrid support requires the SMP mode of Charm++ and the additional flags --enable-drone-mode and --enable-task-queue to be passed as build options when Charm++ is built.
Definition at line 556 of file CkLoop.C.
References _charmHandlerIdx, _ckloopEP, envelope::alloc(), BGConverse::BgNodeRank(), CurLoopInfo::chunkSize, CkLoop_DestroyHelpers(), CkLoop_Exit(), CkLoop_Init(), CKLOOP_NODE_QUEUE, CkLoop_Parallelize(), CkLoop_ParallelizeHybrid(), CkLoop_SetSchedPolicy(), CKLOOP_TREE, BGConverse::CkMyNode(), Converse::CkMyPe(), BGConverse::CkMyRank(), BGConverse::CkNodeFirst(), CkRegisterChare(), CkRegisterChareInCharm(), CkRegisterEp(), CkRegisterMsg(), CmiLock(), CmiMyRank(), CmiPushPE(), CmiRegisterHandler(), CmiUnlock(), FuncSingleHelper::createNotifyMsg(), FuncCkLoop::destroyHelpers(), CurLoopInfo::doWorkForMyPe(), loopChunkMsg::endIndex, converseNotifyMsg::eventID, executeChunk(), CurLoopInfo::fnPtr, ForChareMsg, FuncSingleHelper::funcckproxy, FuncSingleHelper::FuncSingleHelper(), CurLoopInfo::getNextChunkIdx(), FuncSingleHelper::getNotifyMsg(), FuncCkLoop::getSchedPolicy(), FuncCkLoop::helperPtr, hybridHandlerFunc(), CurLoopInfo::inited, int, CurLoopInfo::isFree(), CurLoopInfo::localReduce(), loop_info_inited_lock, loopChunkMsg::loopRec, CurLoopInfo::lowerIndex, malloc(), FuncCkLoop::MAX_CHUNKS, memory_order_release, msg, FuncSingleHelper::nextFreeNotifyMsg, FuncSingleHelper::nextFreeTaskBuffer, NODE_Q, FuncSingleHelper::notifyMsg, FuncSingleHelper::notifyMsgBufSize, CurLoopInfo::numChunks, FuncCkLoop::numHelpers, FuncCkLoop::parallelizeFunc(), FuncCkLoop::parallelizeFuncHybrid(), CurLoopInfo::param, CurLoopInfo::paramNum, PE_Q, CharmNotifyMsg::ptr, converseNotifyMsg::ptr, converseNotifyMsg::queueID, CurLoopInfo::redBufs, CurLoopInfo::reportFinished(), CurLoopInfo::runChunk(), FuncCkLoop::schedPolicy, FuncSingleHelper::schedPolicy, envelope::setEpIdx(), envelope::setMsgtype(), envelope::setObjPtr(), FuncCkLoop::setSchedPolicy(), envelope::setSrcPe(), SingleHelperStealWork(), srcRank, CharmNotifyMsg::srcRank, converseNotifyMsg::srcRank, loopChunkMsg::startIndex, CurLoopInfo::staticFraction, CurLoopInfo::stealWork(), FuncSingleHelper::stealWork(), FuncSingleHelper::taskBuffer, FuncSingleHelper::thisCkLoop, FuncSingleHelper::totalHelpers, CurLoopInfo::type, TypeInvalid, CurLoopInfo::upperIndex, UsrToEnv(), and x.
CMK_THREADLOCAL pthread_cond_t thdCondition [static] |
CMK_THREADLOCAL pthread_mutex_t thdLock [static] |
FuncCkLoop* mainHelper = NULL [static] |
int mainHelperPhyRank = 0 [static] |
Definition at line 26 of file CkLoop.C.
Referenced by FuncCkLoop::createPThreads(), and ndhThreadWork().
int numPhysicalPEs = 0 [static] |
Definition at line 27 of file CkLoop.C.
Referenced by FuncCkLoop::createPThreads(), and ndhThreadWork().
CurLoopInfo* pthdLoop = NULL [static] |
pthread_mutex_t** allLocks = NULL [static] |
Definition at line 30 of file CkLoop.C.
Referenced by FuncCkLoop::createPThreads(), FuncCkLoop::exit(), ndhThreadWork(), and FuncCkLoop::parallelizeFunc().
pthread_cond_t** allConds = NULL [static] |
Definition at line 31 of file CkLoop.C.
Referenced by FuncCkLoop::createPThreads(), FuncCkLoop::exit(), ndhThreadWork(), and FuncCkLoop::parallelizeFunc().
pthread_t* ndhThreads = NULL [static] |
Definition at line 32 of file CkLoop.C.
Referenced by FuncCkLoop::createPThreads(), and FuncCkLoop::exit().
Definition at line 34 of file CkLoop.C.
Referenced by FuncCkLoop::createPThreads(), and ndhThreadWork().
FuncCkLoop* globalCkLoop = NULL [static] |