这篇教程C++ CkPrintf函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CkPrintf函数的典型用法代码示例。如果您正苦于以下问题:C++ CkPrintf函数的具体用法?C++ CkPrintf怎么用?C++ CkPrintf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CkPrintf函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: _printStatsstatic inline void _printStats(void){ DEBUGF(("[%d] _printStats/n", CkMyPe())); int i; if(_printSS || _printCS) { Stats *total = new Stats(); _MEMCHECK(total); for(i=0;i<CkNumPes();i++) total->combine(_allStats[i]); CkPrintf("Charm Kernel Summary Statistics:/n"); for(i=0;i<CkNumPes();i++) { CkPrintf("Proc %d: [%d created, %d processed]/n", i, _allStats[i]->getCharesCreated(), _allStats[i]->getCharesProcessed()); } CkPrintf("Total Chares: [%d created, %d processed]/n", total->getCharesCreated(), total->getCharesProcessed()); } if(_printCS) { CkPrintf("Charm Kernel Detailed Statistics (R=requested P=processed):/n/n"); CkPrintf(" Create Mesgs Create Mesgs Create Mesgs/n"); CkPrintf(" Chare for Group for Nodegroup for/n"); CkPrintf("PE R/P Mesgs Chares Mesgs Groups Mesgs Nodegroups/n"); CkPrintf("---- --- --------- --------- --------- --------- --------- ----------/n"); for(i=0;i<CkNumPes();i++) { CkPrintf("%4d R %9d %9d %9d %9d %9d %9d/n P %9d %9d %9d %9d %9d %9d/n",i, _allStats[i]->getCharesCreated(), _allStats[i]->getForCharesCreated(), _allStats[i]->getGroupsCreated(), _allStats[i]->getGroupMsgsCreated(), _allStats[i]->getNodeGroupsCreated(), _allStats[i]->getNodeGroupMsgsCreated(), _allStats[i]->getCharesProcessed(), _allStats[i]->getForCharesProcessed(), _allStats[i]->getGroupsProcessed(), _allStats[i]->getGroupMsgsProcessed(), _allStats[i]->getNodeGroupsProcessed(), _allStats[i]->getNodeGroupMsgsProcessed()); } }}
开发者ID:gitter-badger,项目名称:quinoa,代码行数:43,
示例2: CkPrintf/** Extract elements adjacent to edge [n1,n2] along with element-local node numberings and nodes opposite input edge **/int FEM_Adapt::findAdjData(int n1, int n2, int *e1, int *e2, int *e1n1, int *e1n2, int *e1n3, int *e2n1, int *e2n2, int *e2n3, int *n3, int *n4){ // Set some default values in case e1 is not there (*e1n1) = (*e1n2) = (*e1n3) = (*n3) = -1; //if n1,n2 is not an edge return if(n1<0 || n2<0) return -1; if(theMesh->node.is_valid(n1)==0 || theMesh->node.is_valid(n2)==0) return -1; if(theMesh->n2n_exists(n1,n2)!=1 || theMesh->n2n_exists(n2,n1)!=1) return -1; (*e1) = theMesh->getElementOnEdge(n1, n2); // assumed to return local element if ((*e1) == -1) { CkPrintf("[%d]Warning: No Element on edge %d->%d/n",theMod->idx,n1,n2); return -1; } (*e1n1) = find_local_node_index((*e1), n1); (*e1n2) = find_local_node_index((*e1), n2); (*e1n3) = 3 - (*e1n1) - (*e1n2); (*n3) = theMesh->e2n_getNode((*e1), (*e1n3)); (*e2) = theMesh->e2e_getNbr((*e1), get_edge_index((*e1n1), (*e1n2))); // Set some default values in case e2 is not there (*e2n1) = (*e2n2) = (*e2n3) = (*n4) = -1; if ((*e2) != -1) { // e2 exists (*e2n1) = find_local_node_index((*e2), n1); (*e2n2) = find_local_node_index((*e2), n2); (*e2n3) = 3 - (*e2n1) - (*e2n2); //if ((*e2) > -1) { // if e2 is a ghost, there is no e2n data (*n4) = theMesh->e2n_getNode((*e2), (*e2n3)); //} } if(*n3 == *n4) { CkPrintf("[%d]Warning: Identical elements %d:(%d,%d,%d) & %d:(%d,%d,%d)/n",theMod->idx,*e1,n1,n2,*n3,*e2,n1,n2,*n4); return -1; } return 1;}
开发者ID:davidheryanto,项目名称:sc14,代码行数:40,
示例3: TestDriver TestDriver(CkArgMsg *m) { delete m; CProxy_Destination destinationChare = CProxy_Destination::ckNew(CkNumPes() - 1); CkPrintf("Size of Converse envelope: %d bytes/n", CmiReservedHeaderSize); CkPrintf("Size of Charm++ envelope: %d bytes/n", sizeof(envelope)); CkPrintf("Default alignment: %d bytes/n", ALIGN_BYTES); int msgSizes[] = {varSize1, varSize2}; std::vector<TestMessage *> allMsgs; int prio = 1234; for (int i = 0; i < nCheck; i++) { TestMessage *msg = new (msgSizes, prio) TestMessage(); allMsgs.push_back(msg); } alignmentTest(allMsgs, "source"); for (int i = 0; i < allMsgs.size(); i++) { destinationChare.receiveMessage(allMsgs[i]); } }
开发者ID:gitter-badger,项目名称:quinoa,代码行数:23,
示例4: BFSGraph BFSGraph(CmiUInt8 nVertex, bool directed = true) : directed(directed), GraphLib::Graph< BFSMultiVertex, BFSEdge, CProxy_BFSMultiVertex, GraphLib::TransportType::Charm >(CmiNumPes()) { int dims[2] = {CkNumNodes(), CkNumPes() / CkNumNodes()}; CkPrintf("Aggregation topology: %d %d/n", dims[0], dims[1]); aggregator = CProxy_ArrayMeshStreamer<dtype, long long, BFSMultiVertex, SimpleMeshRouter> ::ckNew(numMsgsBuffered, 2, dims, g, 1); }
开发者ID:DISLab,项目名称:xcharm,代码行数:14,
示例5: doublevoid Main::ready() { int i; readyCount += 1; int BLOCK_SIZE = matrix_size*matrix_size/CkNumPes(); double (*split_y)[BLOCK_SIZE] = (double (*)[BLOCK_SIZE]) split_bycol; if (readyCount == CkNumPes()) { // calculate CkPrintf("Start calculation/n"); for (i = 0; i < CkNumPes(); i++) { object_array[i].multiply(matrix_size * matrix_size/CkNumPes(), split_y[i],i); } }}
开发者ID:ogbash,项目名称:charm_tests,代码行数:14,
示例6: allDone void allDone() { double elapsedTime = CkWallTimer() - startTime; CkPrintf("Elapsed time for all-to-all of %8d bytes sent in %6d %10s" " of %2d bytes each (%3s using TRAM): %.6f seconds/n", iters * DATA_ITEM_SIZE, iters, iters == 1 ? "iteration" : "iterations", DATA_ITEM_SIZE, testType == directSends ? "not" : "", elapsedTime); if (iters == dataSizeMax / DATA_ITEM_SIZE) { ++testType; if (testType == finishedTests) { CkExit(); } else { CkPrintf("/nTEST 2: Using point to point sends/n"); iters = dataSizeMin / DATA_ITEM_SIZE; prepare(); } } else { iters *= 2; prepare(); } }
开发者ID:quinoacomputing,项目名称:quinoa,代码行数:23,
示例7: Main Main(CkArgMsg *m) { CkPrintf("running SDAG migration test/n"); CProxy_Test testProxy = CProxy_Test::ckNew(NUM_ELEMS); testProxy.wrapper(100, 200); for (int i = 0; i < NUM_ELEMS; i++) { char str[100]; sprintf(str, "test %d", i); Msg* m = new (strlen(str) + 1) Msg(i, str); testProxy[i].method2(i * 2, i * 2 + 1); testProxy[i].method3(m); testProxy[i].methodA(); } CkStartQD(CkCallback(CkIndex_Main::finished(), thisProxy)); }
开发者ID:gitter-badger,项目名称:quinoa,代码行数:14,
示例8: SayHi void SayHi(int hiNo) { if(hiNo <2 ) startTimer = CkWallTimer(); else if(hiNo >= numIterations) { double time = CkWallTimer() - startTimer; CkPrintf(" migration cost total : %f sec single migration cost: %f us/n", time, time/(hiNo-1)*1000000); CkExit(); } //CkPrintf("executing %d %d/n", CkMyPe(), hiNo); thisProxy[thisIndex].SayHi(hiNo+1); migrateMe(1-CkMyPe()); }
开发者ID:gitter-badger,项目名称:quinoa,代码行数:14,
示例9: CkAssertint FEM_Adapt::get_edge_index(int local_node1, int local_node2) { int sum = local_node1 + local_node2; CkAssert(local_node1 != local_node2); if (sum == 1) return 0; else if (sum == 3) return 1; else if (sum == 2) return 2; else { CkPrintf("ERROR: local node pair is strange: [%d,%d]/n", local_node1, local_node2); CkAbort("ERROR: local node pair is strange/n"); return -1; }}
开发者ID:davidheryanto,项目名称:sc14,代码行数:14,
示例10: Pingping Pingping(std::size_t index, uChareSet<Pingping, CProxy_Pingping, CBase_Pingping> *uchareset) : uChare<Pingping, CProxy_Pingping, CBase_Pingping>(index, uchareset) { CkPrintf("[uchare=%d, chare=%d,pe=%d]: created /n", getId(), getuChareSet()->getId(), getuChareSet()->getPe()); pingDone = pongDone = false; pingCounters.resize(N_uChares); pingCounters.assign(N_uChares, -1); pongCounters.resize(N_uChares); pongCounters.assign(N_uChares, 999); contribute(CkCallback(CkReductionTarget(Main, start), mainProxy)); }
开发者ID:DISLab,项目名称:xcharm,代码行数:14,
示例11: CkPrintfmain::main(CkArgMsg* m) { //Process command-line arguments //Start the computation mainProxy = thishandle; if(m->argc<2) { CkPrintf("Needs number of array elements and allreduce data size/n"); CkExit(); } units=atoi(m->argv[1]); allredSize=atoi(m->argv[2]); arr = CProxy_AllReduce::ckNew(thisProxy, units); CkPrintf("AllReduce for %d pes on %d units for %d size/n", CkNumPes(),units,allredSize); arr.init(); startTime = CkWallTimer(); arr.dowork(); }
开发者ID:brog2610,项目名称:quinoa,代码行数:23,
示例12: report // One worker reports back to here when it completes the workload void report(double result) { double totalTime, flops, diff; double ref_norm = (COEFX+COEFY)*(maxiterations+1); result /= (n-2.0*RADIUS)*(n-2.0*RADIUS); totalTime = endTime - startTime; flops = (double) (2*(4*RADIUS+1)+1) * (n-2*RADIUS)*(double)(n-2*RADIUS)*maxiterations; diff = ABS(result-ref_norm); if (diff < EPSILON) { CkPrintf("Solution validates/n");#if VERBOSE printf("Reference L1 norm = "FSTR", L1 norm = "FSTR"/n", ref_norm, result);#endif CkPrintf("Rate (MFlops): %lf Avg time (s) %lf/n", flops/totalTime/1.e6, totalTime/maxiterations); } else { CkPrintf("Solution does not validate/n"); CkPrintf("Reference norm: %lf, norm: %lf, |diff|: %e/n", ref_norm, result, diff); } CkExit(); }
开发者ID:ParRes,项目名称:Kernels,代码行数:24,
示例13: CkPrintf/** Allocate both the FEM_ELEM_ELEM_ADJACENCY and FEM_ELEM_ELEM_ADJ_TYPES attributes The values in these two attributes will be generated by */void FEM_Elem::allocateElemAdjacency(){ if(elemAdjacency){ CkPrintf("FEM> WARNING: Deleting previously allocated(?) elemAdjacency array. allocateElemAdjacency() should probably only be called once./n"); delete elemAdjacency; } if(elemAdjacencyTypes){ CkPrintf("FEM> WARNING: Deleting previously allocated(?) elemAdjacencyTypes array. allocateElemAdjacency() should probably only be called once./n"); delete elemAdjacencyTypes; } elemAdjacency = new FEM_IndexAttribute(this,FEM_ELEM_ELEM_ADJACENCY); elemAdjacencyTypes = new FEM_IndexAttribute(this,FEM_ELEM_ELEM_ADJ_TYPES); elemAdjacency->setLength(size()); elemAdjacency->setWidth(conn->getWidth()); elemAdjacencyTypes->setLength(size()); elemAdjacencyTypes->setWidth(conn->getWidth()); add(elemAdjacency); add(elemAdjacencyTypes);}
开发者ID:davidheryanto,项目名称:sc14,代码行数:26,
示例14: Main Main(CkArgMsg* msg) { int n = atoi(msg->argv[1]); mainProxy = thisProxy; CkPrintf("n = %d/n",n); BProxy = CProxy_B::ckNew(n); AProxy = CProxy_A::ckNew(2); AProxy.F(); CkCallback cb = CkCallback(CkReductionTarget(Main, done), thisProxy); CkStartQD(cb); }
开发者ID:sdasgup3,项目名称:parallel-programming,代码行数:14,
示例15: mcastPing void mcastPing(pingMsg *msg) { // Say hello world CkPrintf("Array %d, Element %d received ping number %d/n", aNum, thisIndex, msg->hiNo); // Save the section cookie, the first time you get it if (! isCookieSet) { sectionCookie = msg->_cookie; isCookieSet = true; } // Contribute to the section reduction mcastMgr->contribute(sizeof(int), &(msg->hiNo), CkReduction::sum_int, sectionCookie); delete msg; }
开发者ID:brog2610,项目名称:quinoa,代码行数:14,
示例16: Main Main(CkArgMsg *m) { CkPrintf("%d:Hallo: argv[1] = %d, argv[2] = %d!/n", CmiMyPe(), atoi(m->argv[1]), atoi(m->argv[2])); nElements = CkNumPes() * atoi(m->argv[1]); nChares = CkNumPes() * atoi(m->argv[2]); mainProxy = thisProxy; //!! alltoall_proxy = new Pingping_uChareArray(nElements, nChares); alltoall_proxy->init(); //thisProxy.init(); delete m; }
开发者ID:DISLab,项目名称:xcharm,代码行数:14,
示例17: POSE_prepExit/// Exit simulation program after terminus reductionvoid POSE_prepExit(void *param, void *msg){ CkReductionMsg *m = (CkReductionMsg *)msg; long long *finalBasicStats = ((long long*)m->getData()); CkPrintf("Final basic stats: Commits: %lld Rollbacks: %lld/n", finalBasicStats[0], finalBasicStats[1]); delete m;#ifdef SEQUENTIAL_POSE CProxy_pose POSE_Coordinator(POSE_Coordinator_ID); POSE_Coordinator.prepExit();#else CProxy_GVT g(TheGVT); g.sumGVTIterationCounts();#endif}
开发者ID:davidheryanto,项目名称:sc14,代码行数:15,
示例18: BaseLBWSLB::WSLB(const CkLBOptions &opt) : BaseLB(opt) {#if CMK_LBDB_ON thisProxy = CProxy_WSLB(thisgroup); lbname = "WSLB"; if (CkMyPe() == 0) CkPrintf("[%d] WSLB created/n",CkMyPe()); mystep = 0; theLbdb-> AddLocalBarrierReceiver((LDBarrierFn)(staticAtSync),(void*)(this)); notifier = theLbdb->getLBDB()-> NotifyMigrated((LDMigratedFn)(staticMigrated),(void*)(this)); LBtopoFn topofn = LBTopoLookup(_lbtopo); if (topofn == NULL) { if (CkMyPe()==0) CmiPrintf("LB> Fatal error: Unknown topology: %s./n", _lbtopo); CmiAbort(""); } topo = topofn(CkNumPes()); // I had to move neighbor initialization outside the constructor // in order to get the virtual functions of any derived classes // so I'll just set them to illegal values here. neighbor_pes = NULL; stats_msg_count = 0; statsMsgsList = NULL; statsDataList = NULL; migrates_completed = 0; migrates_expected = -1; mig_msgs_received = 0; mig_msgs = NULL; myStats.proc_speed = theLbdb->ProcessorSpeed();// char hostname[80];// gethostname(hostname,79);// CkPrintf("[%d] host %s speed %d/n",CkMyPe(),hostname,myStats.proc_speed); myStats.obj_data_sz = 0; myStats.comm_data_sz = 0; receive_stats_ready = 0; vacate = false; usage = 1.0; usage_int_err = 0.; theLbdb->CollectStatsOn();#endif}
开发者ID:gitter-badger,项目名称:quinoa,代码行数:49,
示例19: CBase_HybridBaseLBHybridBaseLB::HybridBaseLB(const CkLBOptions &opt): CBase_HybridBaseLB(opt){#if CMK_LBDB_ON lbname = (char *)"HybridBaseLB"; thisProxy = CProxy_HybridBaseLB(thisgroup); receiver = theLbdb-> AddLocalBarrierReceiver((LDBarrierFn)(staticAtSync), (void*)(this)); notifier = theLbdb->getLBDB()-> NotifyMigrated((LDMigratedFn)(staticMigrated), (void*)(this)); statsStrategy = FULL; // defines topology if (CkNumPes() <= 4) { tree = new TwoLevelTree; } else { tree = new ThreeLevelTree; if (CkNumPes() >= 4096) statsStrategy = SHRINK; //statsStrategy = SHRINK; } //tree = new FourLevelTree; if (CkMyPe() == 0) CkPrintf("%s: %s is created./n", lbname, tree->name()); // decide which load balancer to call// greedy = (CentralLB *)AllocateGreedyLB();// refine = (CentralLB *)AllocateRefineLB(); currentLevel = 0; foundNeighbors = 0; future_migrates_expected = -1; vector_n_moves = 0; maxLoad = 0.0; maxCpuLoad = 0.0; totalLoad = 0.0; maxCommCount = 0; maxCommBytes = 0.0; maxMem = 0.0; if (_lb_args.statsOn()) theLbdb->CollectStatsOn(); group1_created = 0; // base class need to call initTree()#endif}
开发者ID:quinoacomputing,项目名称:quinoa,代码行数:49,
示例20: sanitize/// Commit (delete) all events that are done (used in sequential mode)void eventQueue::CommitDoneEvents(sim *obj) {#ifdef EQ_SANITIZE sanitize();#endif Event *commitPtr = frontPtr->next; // commit calls for done events while (commitPtr != backPtr) { if (commitPtr->done) { obj->ResolveCommitFn(commitPtr->fnIdx, commitPtr->msg); obj->basicStats[0]++; CommitStatsHelper(obj, commitPtr); if (commitPtr->commitBfrLen > 0) { // print buffered output CkPrintf("%s", commitPtr->commitBfr); if (commitPtr->commitErr) CmiAbort("Commit ERROR"); } } commitPtr = commitPtr->next; } // now free up the memory (only delete events that are done) Event *link = commitPtr; commitPtr = commitPtr->prev; while (commitPtr != frontPtr) { if (commitPtr->done == 1) {#ifdef MEM_TEMPORAL if (commitPtr->serialCPdata) { localTimePool->tmp_free(commitPtr->timestamp, commitPtr->serialCPdata); }#else if (commitPtr->cpData) { delete commitPtr->cpData; }#endif } commitPtr = commitPtr->prev; if (commitPtr->next->done == 1) { mem_usage--; delete commitPtr->next; } else { link = commitPtr->next; } } frontPtr->next = link; link->prev = frontPtr; #ifdef EQ_SANITIZE sanitize();#endif}
开发者ID:quinoacomputing,项目名称:quinoa,代码行数:50,
示例21: sprintfvoid ComputeMap::saveComputeMap(const char *fname){ static int count = 0; char f[128]; sprintf(f, "%s.%d", fname, count++); FILE *fp = fopen(f, "w"); CmiAssert(fp != NULL); fprintf(fp, "%d/n", nComputes); for(int i=0; i < nComputes; i++) { fprintf(fp, "%d/n", computeData[i].node); } fclose(fp); CkPrintf("ComputeMap has been stored in %s./n", f);}
开发者ID:luyukunphy,项目名称:namd,代码行数:15,
示例22: ping void ping(int callee, int order) { CkPrintf("[chare=%d,pe=%d]: %d: ping #%d called by %d/n", getuChareSet()->getId(), getuChareSet()->getPe(), getId(), order, callee); getProxy()[callee]->pong(getId(), order+1000); if ((pingCounters[callee] + 1) != order) { CkError("Ping order failure: callee = %d, counter = %d, order = %d/n", callee, pingCounters[callee], order); CkAbort("Ping order failure"); } else pingCounters[callee]++; //doPong(callee); }
开发者ID:DISLab,项目名称:xcharm,代码行数:15,
示例23: Tcl_EvalFilevoid ScriptTcl::load(char *scriptFile) {#ifdef NAMD_TCL int code = Tcl_EvalFile(interp,scriptFile); const char *result = Tcl_GetStringResult(interp); if (*result != 0) CkPrintf("TCL: %s/n",result); if (code != TCL_OK) { const char *errorInfo = Tcl_GetVar(interp,"errorInfo",0); NAMD_die(errorInfo); }#else NAMD_bug("ScriptTcl::load called without Tcl.");#endif}
开发者ID:sunhwan,项目名称:NAMD-mini,代码行数:15,
示例24: F void F() { std::vector<CkFuture> arr; CkPrintf("Sending F/n"); for(int i = 0 ; i < PER_A_ELEMS; i ++) { CkFuture f = CkCreateFuture(); BProxy[Q[i]/PER_B_ELEMS].G(Q[i], f); arr.push_back(f); } CkPrintf("Receiving F/n"); for(int i = 0 ; i < PER_A_ELEMS; i ++) { CkFuture f = arr[i]; myMsg* m = (myMsg*)CkWaitFuture(f); T[i] = m->val; delete m; } CkPrintf("T[%d] Contents/n", thisIndex); for(int i = 0 ; i < PER_A_ELEMS; i ++) { CkPrintf("%d ", T[i]); } CkPrintf("/n"); }
开发者ID:sdasgup3,项目名称:parallel-programming,代码行数:24,
示例25: sendComputeEwaldData/* * Begin Ewald messages */void ComputeMgr:: sendComputeEwaldData(ComputeEwaldMsg *msg){ if (computeEwaldObject) { int node = computeEwaldObject->getMasterNode(); CProxy_ComputeMgr cm(CkpvAccess(BOCclass_group).computeMgr); cm[node].recvComputeEwaldData(msg); } else if (!PatchMap::Object()->numHomePatches()) { CkPrintf("skipping message on Pe(%d)/n", CkMyPe()); delete msg; } else NAMD_die("ComputeMgr::computeEwaldObject is NULL!");}
开发者ID:luyukunphy,项目名称:namd,代码行数:18,
示例26: CkWallTimervoid WSLB::MigrationDone(){#if CMK_LBDB_ON if (CkMyPe() == 0) { double end_lb_time = CkWallTimer(); CkPrintf("Load balancing step %d finished at %f duration %f/n", step(),end_lb_time,end_lb_time - start_lb_time); } migrates_completed = 0; migrates_expected = -1; // Increment to next step mystep++; thisProxy [CkMyPe()].ResumeClients();#endif}
开发者ID:gitter-badger,项目名称:quinoa,代码行数:15,
示例27: CkPrintfvoid GridCommLB::Map_NonMigratable_Objects_To_PEs (){ int i; for (i = 0; i < Num_Objects; i++) { if (!((&Object_Data[i])->migratable)) { if (_lb_args.debug() > 1) { CkPrintf ("[%d] GridCommLB identifies object %d as non-migratable./n", CkMyPe(), i); } Assign_Object_To_PE (i, (&Object_Data[i])->from_pe); } }}
开发者ID:gitter-badger,项目名称:quinoa,代码行数:15,
示例28: CkPrintfvoid chunk::refiningElements(){ int i; CkPrintf("[tmr] Chunk %d: refiningElements/n", cid); while (modified) { // continue trying to refine elements until nothing changes during // a refinement cycle i = 0; modified = 0; CkPrintf("[tmr] Chunk %d: Entering internal refinement loop.../n", cid); while (i < numElements) { // loop through the elements if (theElements[i].getCachedArea() < 0.0) // no cached area yet theElements[i].calculateArea(); if ((!theElements[i].hasDependency() && (((theElements[i].getTargetArea() <= theElements[i].getCachedArea()) && (theElements[i].getTargetArea() >= 0.0)) || theElements[i].isSpecialRequest() || theElements[i].isPendingRequest())) || theElements[i].isRequestResponse()) { // the element either needs refining or has been asked to // refine or has asked someone else to refine //CkPrintf("[tmr] Chunk %d: Element %d: hasdep? %c target=%f current=%f spcReq? %c pend? %c reqResp? %c/n", cid, i, (theElements[i].hasDependency() ? 'y' : 'n'), theElements[i].getTargetArea(), theElements[i].getCachedArea(), (theElements[i].isSpecialRequest() ? 'y' : 'n'), (theElements[i].isPendingRequest() ? 'y' : 'n'), (theElements[i].isRequestResponse() ? 'y' : 'n')); modified = 1; // something's bound to change theElements[i].refine(); // refine the element } i++; } //if (CkMyPe() == 0) for (int j=0; j<numChunks; j++) mesh[j].print(); adjustMesh(); CthYield(); // give other chunks on the same PE a chance } // nothing is in need of refinement; turn refine loop off refineInProgress = 0; CkPrintf("[tmr] Chunk %d: DONE refiningElements/n", cid);}
开发者ID:davidheryanto,项目名称:sc14,代码行数:36,
示例29: saneFreqNormLdsbool saneFreqNormLds(double *loads, int numProcs){ double tot=0.0; for(int i=0;i<numProcs;i++) { tot+=loads[i]; } double r=numProcs-tot; if(r>0.01 || r<-0.01) { CkPrintf("THere is a problem with LOADs!!! r=%f procs=%d loadSum=%f/n",r,numProcs,tot); return false; } else return true;}
开发者ID:gitter-badger,项目名称:quinoa,代码行数:15,
注:本文中的CkPrintf函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CkpvAccess函数代码示例 C++ CkNumPes函数代码示例 |