void elg_readcb_OMP_COLLEXIT(elg_ui4 lid, elg_d8 time, elg_ui1 metc, elg_ui8 metv[], void* userdata) { StackNode *n; lid = locmap[lid]; n = stk_pop(lid); if ( genompglop && is_glop(n->reg) ) { elg_d8 stime = (n->tim)*1.0e+10+1.0; elg_d8 etime = time*1.0e+10-1.0; if ( etime <= stime ) { stime = (n->tim)*1.0e+10; etime = time*1.0e+10; } wbytes += VTF3_WriteGlobalop(fcb, stime, n->reg, (unsigned int) lid, /*com*/ maxcomm + 1 + loctab[lid].proc->id, /*root*/ -1, /*sent*/ 0, /*recvd*/ 0, etime-stime, VTF3_SCLNONE); } if ( writeOMP ) { wbytes += VTF3_WriteOpenmpleave(fcb, time*1.0e+10, (unsigned int) lid, scl_of_state(n->reg)); } else { wbytes += VTF3_WriteUpfrom(fcb, time*1.0e+10, n->reg, (unsigned int) lid, VTF3_SCLNONE); } genWriteCOUNTER(lid, time, metc, metv); }
int handleCollectiveOperation( void* firsthandlerarg, uint64_t time, uint32_t process, uint32_t globaloptoken, uint32_t communicator, uint32_t rootprocess, uint32_t sent, uint32_t received, uint64_t duration, uint32_t scltoken ) { nodeT *node = treehash_searchnode(((fcbT*) firsthandlerarg)->p_hashtab, process); nodeT *root = treehash_searchnode(((fcbT*) firsthandlerarg)->p_hashtab, rootprocess); if ( 0 == node ) { fprintf( stderr, "otf2vtf WARNING: undefined process %u, record ignored\n", process ); return OTF_RETURN_OK; } FileIOEndQueue_check( &(((fcbT*) firsthandlerarg)->FileIOQueue), time, firsthandlerarg ); return ( 0 == VTF3_WriteGlobalop( ((fcbT*) firsthandlerarg)->fcb, time, globaloptoken, node->processi, communicator, root->processi, sent, received, duration, scltoken ) ) ? OTF_RETURN_ABORT : OTF_RETURN_OK; }
static void genWriteCOLLLEAVE(int w, elg_ui4 lid, elg_d8 time, elg_ui4 rlid, elg_ui4 cid, elg_ui4 sent, elg_ui4 recvd) { StackNode *n = stk_pop(lid); if ( rlid != ELG_NO_ID ) rlid = locmap[rlid]; if ( w ) { elg_d8 stime = (n->tim)*1.0e+10+1.0; elg_d8 etime = time*1.0e+10-1.0; if ( etime <= stime ) { stime = (n->tim)*1.0e+10; etime = time*1.0e+10; } wbytes += VTF3_WriteGlobalop(fcb, stime, n->reg, (unsigned int) lid, (int) cid, (unsigned int) rlid, (int) sent, (int) recvd, etime-stime, VTF3_SCLNONE); } wbytes += VTF3_WriteUpfrom(fcb, time*1.0e+10, n->reg, (unsigned int) lid, VTF3_SCLNONE); }