这篇教程C++ CmiPrintf函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CmiPrintf函数的典型用法代码示例。如果您正苦于以下问题:C++ CmiPrintf函数的具体用法?C++ CmiPrintf怎么用?C++ CmiPrintf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CmiPrintf函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: collectNumbersstatic void collectNumbers(ProcMsg *msg){ int npes; EmptyMsg emsg; if(CpvAccess(isSingle)) { CpvAccess(Time1) = CmiWallTimer() - CpvAccess(Time1); CpvAccess(seqPI) = 4.0 * msg->success / NTRIALS; CpvAccess(isSingle) = 0; CpvAccess(nreported) = 0; CpvAccess(success) = 0; msg->success = NTRIALS/CmiNumPes(); CmiSetHandler(msg, CpvAccess(trial_handler)); CmiSyncBroadcastAll(sizeof(ProcMsg), msg); CpvAccess(TimeN) = CmiWallTimer(); } else { CpvAccess(nreported)++; CpvAccess(success) += msg->success; if(CpvAccess(nreported)==CmiNumPes()) { CpvAccess(TimeN) = CmiWallTimer() - CpvAccess(TimeN); CpvAccess(parPI) = 4.0 * CpvAccess(success) / NTRIALS; npes = iround(CpvAccess(Time1)/CpvAccess(TimeN)); CmiPrintf("[proc] Tseq = %le seconds, Tpar = %le seconds/n", CpvAccess(Time1), CpvAccess(TimeN)); CmiPrintf("[proc] CmiNumPes() reported %d processors/n", CmiNumPes()); CmiPrintf("[proc] But actual number of processors is %d/n", npes); CmiPrintf("[proc] FYI, appox PI (seq) = %lf/n",CpvAccess(seqPI)); CmiPrintf("[proc] FYI, appox PI (par) = %lf/n",CpvAccess(parPI)); CmiSetHandler(&emsg, CpvAccess(ack_handler)); CmiSyncSend(0, sizeof(EmptyMsg), &emsg); } }}
开发者ID:davidheryanto,项目名称:sc14,代码行数:33,
示例2: CcsImpl_netRequest/** * This is the entrance point of a CCS request into the server. * It is executed only on proc 0, and it forwards the request to the appropriate PE. */void CcsImpl_netRequest(CcsImplHeader *hdr,const void *reqData){ char *msg; int len,repPE=ChMessageInt(hdr->pe); if (repPE<=-CmiNumPes() || repPE>=CmiNumPes()) {#if ! CMK_BIGSIM_CHARM /*Treat out of bound values as errors. Helps detecting bugs*/ if (repPE==-CmiNumPes()) CmiPrintf("Invalid processor index in CCS request: are you trying to do a broadcast instead?"); else CmiPrintf("Invalid processor index in CCS request."); CpvAccess(ccsReq)=hdr; CcsSendReply(0,NULL); /*Send an empty reply to the possibly waiting client*/ return;#endif } msg=CcsImpl_ccs2converse(hdr,reqData,&len); if (repPE >= 0) { /* The following %CmiNumPes() follows the assumption that in BigSim the mapping is round-robin */ //CmiPrintf("CCS message received for %d/n",repPE); CmiSyncSendAndFree(repPE%CmiNumPes(),len,msg); } else if (repPE == -1) { /* Broadcast to all processors */ //CmiPrintf("CCS broadcast received/n"); CmiSyncSendAndFree(0,len,msg); } else { /* Multicast to -repPE processors, specified right at the beginning of reqData (as a list of pes) */ int firstPE = ChMessageInt(*(ChMessageInt_t*)reqData); /* The following %CmiNumPes() follows the assumption that in BigSim the mapping is round-robin */ //CmiPrintf("CCS multicast received/n"); CmiSyncSendAndFree(firstPE%CmiNumPes(),len,msg); }}
开发者ID:gitter-badger,项目名称:quinoa,代码行数:36,
示例3: cb_client void cb_client(CkReductionMsg *msg) { endTime = CkWallTimer (); int dataSize = msg->getSize(); void *data = msg->getData(); CmiPrintf("%e/n", endTime-startTime); // check correctness int result; int redno = msg->getRedNo(); result = 0; for (int i=0; i<sectionSize; i++) result+=i; if (*(int *)data != result) { CmiPrintf("Expected: %d acual:%d/n", result, *(int *)data); CmiAbort("reduction result is wrong!"); } cnt.reductionsRemaining--; if (cnt.reductionsRemaining<=0) { CProxy_main mproxy(mid); mproxy.maindone(); cnt.reductionNo++; } else { HiMsg *hiMsg = new (2, 0) HiMsg; hiMsg->data[0] = 22; hiMsg->data[1] = 28; startTime = CkWallTimer (); mcp.SayHi(hiMsg); cnt.reductionNo++; } delete msg; }
开发者ID:davidheryanto,项目名称:sc14,代码行数:34,
示例4: CmiPrintfvoid LBDB::DumpDatabase(){#ifdef DEBUG CmiPrintf("Database contains %d object managers/n",omCount); CmiPrintf("Database contains %d objects/n",objCount);#endif}
开发者ID:davidheryanto,项目名称:sc14,代码行数:7,
示例5: displayLBs void displayLBs() { CmiPrintf("/nAvailable load balancers:/n"); for (int i=0; i<lbtables.length(); i++) { LBDBEntry &entry = lbtables[i]; if (entry.shown) CmiPrintf("* %s: %s/n", entry.name, entry.help); } CmiPrintf("/n"); }
开发者ID:davidheryanto,项目名称:sc14,代码行数:9,
示例6: computeAverageint RefinerTemp::multirefine(){ computeAverage(); double avg = averageLoad; int maxPe=-1; // double max = computeMax(); double max = computeMax(&maxPe); //const double overloadStep = 0.01; const double overloadStep = 0.01; const double overloadStart = 1.001;// double dCurOverload = max / avg; double dCurOverload = max /(totalInst*procFreqNew[maxPe]/sumFreqs); int minOverload = 0; int maxOverload = (int)((dCurOverload - overloadStart)/overloadStep + 1); double dMinOverload = minOverload * overloadStep + overloadStart; double dMaxOverload = maxOverload * overloadStep + overloadStart; int curOverload; int refineDone = 0;//CmiPrintf("maxPe=%d max=%f myAvg=%f dMinOverload: %f dMaxOverload: %f/n",maxPe,max,(totalInst*procFreqNew[maxPe]/sumFreqs), dMinOverload, dMaxOverload); if (_lb_args.debug()>=1) CmiPrintf("dMinOverload: %f dMaxOverload: %f/n", dMinOverload, dMaxOverload); overLoad = dMinOverload; if (refine()) refineDone = 1; else { overLoad = dMaxOverload; if (!refine()) { CmiPrintf("ERROR: Could not refine at max overload/n"); refineDone = 1; } } // Scan up, until we find a refine that works while (!refineDone) { if (maxOverload - minOverload <= 1) refineDone = 1; else { curOverload = (maxOverload + minOverload ) / 2; overLoad = curOverload * overloadStep + overloadStart; if (_lb_args.debug()>=1) CmiPrintf("Testing curOverload %d = %f [min,max]= %d, %d/n", curOverload, overLoad, minOverload, maxOverload); if (refine()) maxOverload = curOverload; else minOverload = curOverload; } } return 1;}
开发者ID:luyukunphy,项目名称:namd,代码行数:54,
示例7: vars_check_cpv_and_csvCpmInvokable vars_check_cpv_and_csv(vars_chare c){ if (CpvAccess(cpv1) != CmiMyPe()) { CmiPrintf("cpv privacy test failed./n"); exit(1); } if (CsvAccess(csv1) != 0x12345678) { CmiPrintf("csv sharing test failed./n"); exit(1); } Cpm_vars_ack(CpmSend(0), c);}
开发者ID:davidheryanto,项目名称:sc14,代码行数:12,
示例8: CmiPoolPrintListvoid CmiPoolPrintList(char *p){ CmiPrintf("Free list is: -----------/n"); while (p != 0) { char ** header = (char **) p-CMI_POOL_HEADER_SIZE; CmiPrintf("next ptr is %p. ", p); CmiPrintf("header is at: %p, and contains: %p /n", header, *header); p = *header; } CmiPrintf("End of Free list: -----------/n"); }
开发者ID:davidheryanto,项目名称:sc14,代码行数:12,
示例9: setValvoid OrbLB::quicksort(int x){ int y = (x+1)%3; int z = (x+2)%3; setVal(x, y, z); qsort(x, 0, nObjs-1);#if 0 CmiPrintf("result for :%d/n", x); for (int i=0; i<nObjs; i++) CmiPrintf("%d ", computeLoad[vArray[x][i].id].tv); CmiPrintf("/n");#endif}
开发者ID:davidheryanto,项目名称:sc14,代码行数:14,
示例10: CpdList_ccs_list_items_setstatic void CpdList_ccs_list_items_set(char *msg){ CpdListItemsRequest req; CpdListAccessor *acc=CpdListHeader_ccs_list_items(msg,req); if(acc == NULL) CmiPrintf("ccs-builtins> Null Accessor--bad list name (set)/n"); else { PUP_toNetwork_unpack p(req.extra); pupCpd(p,acc,req); if (p.size()!=req.extraLen) CmiPrintf("Size mismatch during ccs_list_items.set: client sent %d bytes, but %d bytes used!/n", req.extraLen,p.size()); } CmiFree(msg);}
开发者ID:quinoacomputing,项目名称:quinoa,代码行数:14,
示例11: mymainCmiStartFn mymain(int argc, char** argv){ if(CmiMyRank() == CmiMyNodeSize()) return 0; CpvInitialize(int,msgSize); CpvInitialize(int,cycleNum); CpvInitialize(int,sizeNum); CpvAccess(sizeNum) = 1; CpvAccess(msgSize)= CmiMsgHeaderSizeBytes + 8; CpvInitialize(int,exitHandler); CpvAccess(exitHandler) = CmiRegisterHandler((CmiHandler) exitHandlerFunc); CpvInitialize(int,node0Handler); CpvAccess(node0Handler) = CmiRegisterHandler((CmiHandler) node0HandlerFunc); CpvInitialize(int,node1Handler); CpvAccess(node1Handler) = CmiRegisterHandler((CmiHandler) node1HandlerFunc); CpvInitialize(int,ackHandler); CpvAccess(ackHandler) = CmiRegisterHandler((CmiHandler) ackHandlerFunc); CpvInitialize(double,startTime); CpvInitialize(double,endTime); CpvInitialize(double, IdleStartTime); CpvInitialize(double, IdleTime); CpvInitialize(int,ackCount); CpvAccess(ackCount) = 0; CpvInitialize(int,twoway); CpvAccess(twoway) = 0; CcdCallOnConditionKeep(CcdPROCESSOR_BEGIN_IDLE, ApplIdleStart, NULL); CcdCallOnConditionKeep(CcdPROCESSOR_END_IDLE, ApplIdleEnd, NULL); if(argc > 1) CpvAccess(twoway) = atoi(argv[1]); if(CmiMyPe() == 0) { if(!CpvAccess(twoway)) CmiPrintf("Starting Pingpong with oneway traffic /n"); else CmiPrintf("Starting Pingpong with twoway traffic/n"); } if ((CmiMyPe() < CmiNumPes()/2) || CpvAccess(twoway)) startPingpong(); return 0;}
开发者ID:quinoacomputing,项目名称:quinoa,代码行数:49,
示例12: cb_client// void cb_client(CkSectionInfo sid, void *param, int dataSize, void *data) void cb_client(CkReductionMsg *msg) { int dataSize = msg->getSize(); void *data = msg->getData(); CmiPrintf("RESULT [%d]: %d/n", cnt.reductionNo, *(int *)data); // check correctness int result; int redno = msg->getRedNo(); if (redno%3 == 0) { result = 0; for (int i=0; i<sectionSize; i++) result+=i; } else if (redno%3 == 2) { result = 1; for (int i=1; i<sectionSize+1; i++) result*=i; } else { result = sectionSize+1; } if (*(int *)data != result) { CmiPrintf("Expected: %d acual:%d/n", result, *(int *)data); CmiAbort("reduction result is wrong!"); } cnt.reductionsRemaining--; if (cnt.reductionsRemaining<=0) { CProxy_main mproxy(mid); mproxy.maindone(); cnt.reductionNo++; } else {#if 0 CkMulticastMgr *mg = CProxy_CkMulticastMgr(mCastGrpId).ckLocalBranch(); if (cnt->reductionNo % 32 == 0) mg->rebuild(mcp.ckGetSectionInfo());#endif if (cnt.reductionNo%3 == 0) { HiMsg *hiMsg = new (2, 0) HiMsg; //hiMsg->data[0] = 18+cnt.reductionNo; hiMsg->data[0] = 22; hiMsg->data[1] = 28; mcp.SayHi(hiMsg); } cnt.reductionNo++; } delete msg; }
开发者ID:quinoacomputing,项目名称:quinoa,代码行数:50,
示例13: CmiPrintfvoid OrbLB::setVal(int x, int y, int z){ int i; for (i=0; i<nObjs; i++) { computeLoad[i].tv = 1000000.0*computeLoad[i].v[x]+ 1000.0*computeLoad[i].v[y]+ computeLoad[i].v[z]; }#if 0 CmiPrintf("original:%d/n", x); for (i=0; i<numComputes; i++) CmiPrintf("%d ", computeLoad[i].tv); CmiPrintf("/n");#endif}
开发者ID:davidheryanto,项目名称:sc14,代码行数:15,
示例14: CmiPrintfvoid LBSimulation::PrintDifferences(LBSimulation *realSim, BaseLB::LDStats *stats){ LBRealType *peLoads = lbinfo.peLoads; LBRealType *realPeLoads = realSim->lbinfo.peLoads; // the number of procs during the simulation and the real execution must be checked by the caller! int i; // here to print the differences between the predicted (this) and the real (real) CmiPrintf("Differences between predicted and real balance:/n"); CmiPrintf("PE (Predicted Load) (Real Predicted) (Difference) (Real CPU) (Prediction Error)/n"); for(i = 0; i < numPes; ++i) { CmiPrintf("%-4d %13f %16f %15f %12f %14f/n", i, peLoads[i], realPeLoads[i], peLoads[i]-realPeLoads[i], stats->procs[i].total_walltime-stats->procs[i].idletime, realPeLoads[i]-(stats->procs[i].total_walltime-stats->procs[i].idletime)); }}
开发者ID:luyukunphy,项目名称:namd,代码行数:15,
示例15: DEBUGF//! turn trace on/off, note that charm will automatically call traceBegin()//! at the beginning of every run unless the command line option "+traceoff"//! is specifiedvoid TraceCounter::traceEnd() { DEBUGF(("%d/%d traceEnd called/n", CmiMyPe(), CmiNumPes())); if (!traceOn_) { static bool print = true; if (print) { print = false; if (CmiMyPe()==0) { CmiPrintf("%d/%d WARN: traceEnd called but trace not on!/n" " Sure you didn't mean to use +traceoff?/n", CmiMyPe(), CmiNumPes()); } } } else { traceOn_ = false; dirty_ = false; if (overview_) { endOverview(); } // overview switches counters automatic else if (switchByPhase_) { switchCounters(); }; if (!noLog_ && writeByPhase_) { if (CmiMyPe()==0) { CpvAccess(_logPool)->writeSts(phase_); } CpvAccess(_logPool)->write(phase_); } reductionPhase_++; CpvAccess(_logPool)->doReduction(reductionPhase_, idleTime_); if (writeByPhase_) { idleTime_ = 0.0; CpvAccess(_logPool)->clearEps(); } // setTrace must go after the writes otherwise the writes won't go through DEBUGF(("%d/%d DEBUG: Created _logPool at %08x/n", CmiMyPe(), CmiNumPes(), CpvAccess(_logPool))); }}
开发者ID:quinoacomputing,项目名称:quinoa,代码行数:37,
示例16: CmiPrintf//! print out usage argumentvoid TraceCounter::usage() { CmiPrintf( "ERROR: You've linked with '-tracemode counter', so you must specify/n" " the +counters <counters> option followed by any of the /n" " following optional command line options./n" "/n" "REQUIRED: +counters <counter>/n" "/n" " +counters <counters>: Where <counters> is comma delimited list/n" " of valid counters. Type '+count-help' to/n" " get a list of valid counters./n" "/n" "OPTIONAL: [+count-overview] [+count-switchrandom] [+switchbyphase]/n" "/n" " +count-overview: Collect counter values between start/stop/n" " of the program (or traceBegin/traceEnd if/n" " user marked events are on [see Performance/n" " Counter section of the Charm++ manual])./n" " Normal operation collects counter values/n" " between the stop/start of Charm++ entry/n" " points./n" " +count-switchrandom: Counters will switch randomly between/n" " each event instead of in the order/n" " specified by the <counters> arg./n" " +count-switchbyphase: Counters will switch not every EP call,/n" " but only in between phases (between each/n" " traceBegin/traceEnd call)./n" " +count-nolog: Don't write any log files./n" "/n" "See the Performance Counter section of the Charm++ manual for/n" "examples of different options./n" "/n");}
开发者ID:quinoacomputing,项目名称:quinoa,代码行数:34,
示例17: strlen//! add the argument parameters to the linked list of args choicesvoid TraceCounter::registerArg(CounterArg* arg){ if (firstArg_ == NULL) { firstArg_ = lastArg_ = arg; argStrSize_ = strlen(arg->arg); } else { // check to see if any redundancy CounterArg* check = firstArg_; while (check != NULL) { if (strcmp(check->arg, arg->arg)==0 || check->code == arg->code) { if (CmiMyPe()==0) { CmiPrintf("Two args with same name %s or code %d/n", arg->arg, arg->code); } CmiAbort("TraceCounter::registerArg()/n"); } check = check->next; } lastArg_->next = arg; lastArg_ = arg; int len = strlen(arg->arg); if (len > argStrSize_) { argStrSize_ = len; } }}
开发者ID:quinoacomputing,项目名称:quinoa,代码行数:27,
示例18: CmiPrintfmain::main(CkArgMsg *msg){ CmiPrintf("Megatest is running on %d nodes %d processors. /n", CkNumNodes(), CkNumPes()); int argc = msg->argc; char **argv = msg->argv; int numtests, i; delete msg; mainhandle = thishandle; if (nTests<=0) CkAbort("Megatest: No tests registered-- is MEGATEST_REGISTER_TEST malfunctioning?"); for (i=0; i<nTests; i++) (tests[i].initializer)(); test_bank_size = nTests; next_test_index = 0; next_test_number = 0; test_negate_skip=0; test_repeat = 0; for (i=1; i<argc; i++) { if (strcmp(argv[i],"-only")==0) test_negate_skip = 1; if (strcmp(argv[i],"-repeat")==0) test_repeat = 1; } num_tests_to_skip = argc; tests_to_skip = argv; CProxy_main(thishandle).start();}
开发者ID:davidheryanto,项目名称:sc14,代码行数:27,
示例19: CmiMyPestatic void *meta_valloc(size_t size){ void *ret=mm_valloc(size); if (memInit) CmiPrintf("CMI_MEMORY(%d)> valloc(%d) => %p/n", CmiMyPe(),size,ret); return ret;}
开发者ID:quinoacomputing,项目名称:quinoa,代码行数:7,
示例20: print_thread_affinityint print_thread_affinity() { unsigned long mask; size_t len = sizeof(mask);#if CMK_HAS_PTHREAD_SETAFFINITY int j; cpu_set_t cpuset; pthread_t thread; char str[256], pe[16]; thread = pthread_self(); if (errno = pthread_getaffinity_np(thread, sizeof(cpu_set_t), &cpuset)) { perror("pthread_getaffinity"); return -1; } sprintf(str, "[%d] %s affinity is: ", CmiMyPe(), CmiMyPe()>=CmiNumPes()?"communication pthread":"pthread"); for (j = 0; j < CPU_SETSIZE; j++) if (CPU_ISSET(j, &cpuset)) { sprintf(pe, " %d ", j); strcat(str, pe); } CmiPrintf("%s/n", str);#endif return 0;}
开发者ID:gitter-badger,项目名称:quinoa,代码行数:27,
示例21: meta_freestatic void meta_free(void *mem){ if (memInit) CmiPrintf("CMI_MEMORY(%d)> free(%p)/n", CmiMyPe(),mem); if (memInit>1) {int memBack=memInit; memInit=0; CmiPrintStackTrace(0); memInit=memBack;} mm_free(mem);}
开发者ID:davidheryanto,项目名称:sc14,代码行数:7,
示例22: getNUMANidByRankstatic int getNUMANidByRank(int coreid) { int i; /*int totalCores = CmiNumCores();*/ int totalNUMANodes = CmiNumNUMANodes(); /*The core id array is viewed as 2D array but in form of 1D array*/ /*int *coreids=(int *)malloc(sizeof(int)*totalCores);*/ /*Assume each NUMA node has the same number of cores*/ /*int nCoresPerNode = totalCores/totalNUMANodes;*/ /*CmiAssert(totalCores%totalNUMANodes==0);*/ char command[256]; for (i=0; i<totalNUMANodes; i++) { FILE *cmd; int cpuid; sprintf(command, "ls -1d /sys/devices/system/node/node%d/cpu[0-9]* | cut -d'u' -f2", i); cmd = popen(command, "r"); while (1) { int ret=fscanf(cmd, "%d/n", &cpuid); if (ret==EOF) break; if (cpuid == coreid) { pclose(cmd); /*free(coreids);*/ return i; } } pclose(cmd); } /*free(coreids);*/ CmiPrintf("%d: the corresponding NUMA node for cpu id %d is not found!/n", CmiMyPe(), coreid); CmiAssert(0); return -1;}
开发者ID:davidheryanto,项目名称:sc14,代码行数:31,
示例23: CmiExitPxshmvoid CmiExitPxshm(){ if (pxshmContext == NULL) return; if(pxshmContext->nodesize != 1){ int i; if (!pxshm_freed) tearDownSharedBuffers(); for(i=0;i<pxshmContext->nodesize;i++){ if(i != pxshmContext->noderank){ break; } } free(pxshmContext->recvBufNames[i]); free(pxshmContext->sendBufNames[i]); free(pxshmContext->recvBufNames); free(pxshmContext->sendBufNames); free(pxshmContext->recvBufs); free(pxshmContext->sendBufs); }#if PXSHM_STATSCmiPrintf("[%d] sendCount %d sendTime %6lf validCheckCount %d validCheckTime %.6lf commServerTime %6lf lockRecvCount %d /n",_Cmi_mynode,pxshmContext->sendCount,pxshmContext->sendTime,pxshmContext->validCheckCount,pxshmContext->validCheckTime,pxshmContext->commServerTime,pxshmContext->lockRecvCount);#endif free(pxshmContext); pxshmContext = NULL;}
开发者ID:gitter-badger,项目名称:quinoa,代码行数:28,
示例24: initConvComlibManager/** At startup on each processor, this method is called. This sets up the converse level comlib strategies. This is called before any mainchare main functions. */void initConvComlibManager(){ if(!CkpvInitialized(conv_com_object)) CkpvInitialize(ConvComlibManager, conv_com_object); if(CkpvAccess(conv_com_object).getInitialized()) { CmiPrintf("Comlib initialized more than once!/n"); return; } CkpvInitialize(int, RecvdummyHandle); CkpvAccess(RecvdummyHandle) = CkRegisterHandler((CmiHandler)recv_dummy); CkpvInitialize(int, comlib_receive_table); CkpvAccess(comlib_receive_table) = CkRegisterHandler((CmiHandler)comlibReceiveTableHandler); CkpvInitialize(int, comlib_table_received); CkpvAccess(comlib_table_received) = CkRegisterHandler((CmiHandler)comlibTableReceivedHandler); CkpvInitialize(int, comlib_ready); CkpvAccess(comlib_ready) = CkRegisterHandler((CmiHandler)comlibReadyHandler); // init strategy specific variables // router strategy CkpvInitialize(int, RouterRecvHandle); CkpvAccess(RouterRecvHandle) = CkRegisterHandler((CmiHandler)routerRecvManyCombinedMsg); CkpvInitialize(int, RouterProcHandle); CkpvAccess(RouterProcHandle) = CkRegisterHandler((CmiHandler)routerProcManyCombinedMsg); CkpvInitialize(int, RouterDummyHandle); CkpvAccess(RouterDummyHandle) = CkRegisterHandler((CmiHandler)routerDummyMsg); // streaming strategy CpvInitialize(int, streaming_handler_id); CpvAccess(streaming_handler_id) = CmiRegisterHandler(StreamingHandlerFn); // mesh streaming strategy CkpvInitialize(int, streaming_column_handler_id); CkpvAccess(streaming_column_handler_id) = CkRegisterHandler(streaming_column_handler); // pipelined broadcast CkpvInitialize(int, pipeline_handler); CkpvInitialize(int, pipeline_frag_handler); CkpvAccess(pipeline_handler) = CkRegisterHandler((CmiHandler)PipelineHandler); CkpvAccess(pipeline_frag_handler) = CkRegisterHandler((CmiHandler)PipelineFragmentHandler); // general handler CkpvInitialize(int, comlib_handler); CkpvAccess(comlib_handler) = CkRegisterHandler((CmiHandler) strategyHandler); //PUPable_reg(Strategy); ABSTRACT //PUPable_reg(ConvComlibInstanceHandle); if (CmiMyRank() == 0) { PUPable_reg(RouterStrategy); PUPable_reg(StreamingStrategy); PUPable_reg(MeshStreamingStrategy); PUPable_reg(PipeBroadcastConverse); PUPable_reg(MessageHolder); } CkpvAccess(conv_com_object).setInitialized();}
开发者ID:davidheryanto,项目名称:sc14,代码行数:65,
示例25: CqsRemoveSpecificvoid CqsRemoveSpecific(Queue q, const void *msgPtr) { if( CqsRemoveSpecificPrioq(&(q->negprioq), msgPtr) == 0 ) if( CqsRemoveSpecificDeq(&(q->zeroprio), msgPtr) == 0 ) if(CqsRemoveSpecificPrioq(&(q->posprioq), msgPtr) == 0) { CmiPrintf("Didn't remove the specified entry because it was not found/n"); }}
开发者ID:luyukunphy,项目名称:namd,代码行数:7,
示例26: createLoadBalancer// mainchareLBDBInit::LBDBInit(CkArgMsg *m){#if CMK_LBDB_ON _lbdb = CProxy_LBDatabase::ckNew(); // runtime specified load balancer if (lbRegistry.runtime_lbs.size() > 0) { for (int i=0; i<lbRegistry.runtime_lbs.size(); i++) { const char *balancer = lbRegistry.runtime_lbs[i]; createLoadBalancer(balancer); } } else if (lbRegistry.compile_lbs.size() > 0) { for (int i=0; i<lbRegistry.compile_lbs.size(); i++) { const char* balancer = lbRegistry.compile_lbs[i]; createLoadBalancer(balancer); } } else { // NullLB is the default when none of above lb created // note user may create his own load balancer in his code manually like // in NAMD, but never mind NullLB can disable itself if there is // a non NULL LB. createLoadBalancer("NullLB"); } // simulation mode if (LBSimulation::doSimulation) { CmiPrintf("Charm++> Entering Load Balancer Simulation Mode ... /n"); CProxy_LBDatabase(_lbdb).ckLocalBranch()->StartLB(); }#endif delete m;}
开发者ID:davidheryanto,项目名称:sc14,代码行数:35,
示例27: liveViz0Init//Startup routine-- must be called on processor 0void liveViz0Init(const liveVizConfig &cfg) { config=cfg; CcsRegisterHandler("lvConfig",(CmiHandler)getImageConfigHandler); CcsRegisterHandler("lvImage", (CmiHandler)getImageHandler); if (config.getVerbose(1)) CmiPrintf("CCS getImage handlers registered. Waiting for clients.../n");}
开发者ID:davidheryanto,项目名称:sc14,代码行数:8,
注:本文中的CmiPrintf函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CoCreateGuid函数代码示例 C++ CmiMyPe函数代码示例 |