void mdlPrintTimer(MDL mdl,char *message, mdlTimer *t0) { mdlTimer lt; if (mdl->bDiag) { mdlGetTimer(mdl,t0,<); mdlprintf(mdl,"%s %f %f %f\n",message,lt.wallclock,lt.cpu,lt.system); } }
static void main_io(MDL mdl) { IO io; ioInitialize(&io,mdl); ioAddServices(io,mdl); if ( mdlSelf(mdl) == 0 ) { mdlSetComm(mdl,1); } mdlprintf( mdl, "I/O thread %d started\n", mdlSelf(mdl) ); mdlHandler(mdl); mdlprintf( mdl, "I/O thread %d terminated\n", mdlSelf(mdl) ); if ( mdlSelf(mdl) == 0 ) { int id; mdlSetComm(mdl,0); for ( id=1; id<mdlIO(mdl); ++id ) { mdlReqService(mdl,id,SRV_STOP,NULL,0); mdlGetReply(mdl,id,NULL,NULL); } } }