[torqueusers] reported cpu time during running parallel jobs in torque 2.1.3...

Garrick Staples garrick at clusterresources.com
Thu Oct 19 16:55:55 MDT 2006


On Thu, Oct 19, 2006 at 09:17:42AM -0600, Garrick Staples alleged:
> On Thu, Oct 19, 2006 at 01:57:42PM +0100, David Golden alleged:
> > On Thursday 19 October 2006 02:35, Garrick Staples wrote:
> > 
> > 
> > > I think this fixes both problems.  Initial tests are good, but I want to
> > > bang at it some more.
> > >
> > 
> > Thanks!   
> > 
> > Looks like that SVFLG_HERE check was introduced in 2.1 series ?  2.0.0p8 
> > doesn't seem to have it. 
> 
> Looks like it, but I think I have a much better way to do it now.

This is what I am committing to trunk and 2.1-fixes:

Index: src/resmom/mom_comm.c
===================================================================
--- src/resmom/mom_comm.c       (revision 1057)
+++ src/resmom/mom_comm.c       (revision 1058)
@@ -3019,6 +3019,9 @@
       if (ret != DIS_SUCCESS)
         break;
 
+      /* get fresh resource usage */
+      mom_set_use(pjob);
+
       /* ** Send the information tallied for the job.  */
 
       ret = diswul(stream,resc_used(pjob,"cput",gettime));
Index: src/server/req_jobobit.c
===================================================================
--- src/server/req_jobobit.c    (revision 1057)
+++ src/server/req_jobobit.c    (revision 1058)
@@ -1626,6 +1626,13 @@
   pjob->ji_wattr[(int)JOB_ATR_exitstat].at_flags |=ATR_VFLAG_SET;
 
   patlist = (svrattrl *)GET_NEXT(preq->rq_ind.rq_jobobit.rq_attr);
+ 
+  /* Encode the final resources_used into the job (useful for keep_completed) */
+  modify_job_attr(
+    pjob,
+    patlist,
+    ATR_DFLAG_MGWR | ATR_DFLAG_SvWR,
+    &bad);
 
   sprintf(acctbuf,msg_job_end_stat, 
     pjob->ji_qs.ji_un.ji_exect.ji_exitstat);



More information about the torqueusers mailing list