[Mauiusers] Patch for nodeaccespolicy SINGLEJOB and MAXPS for SMPmachines

Bas van der Vlies basv at sara.nl
Fri Sep 1 08:10:52 MDT 2006


will this patch be rejected or must i change something? Any comments 
will  be welcome.

Regards

Bas van der Vlies wrote:
> I have just installed maui 3.2.6p16 and i have still have the same
> problem. I could apply the patch without any problems ;-)
> 
> My question is will the patch be applied, changed or rejected? See 
> explanation below
> 
> Regards and Thanks
> 
> -------- Original Message --------
> Subject:     [Mauiusers] Patch for nodeaccespolicy SINGLEJOB and MAXPS for
> SMPmachines
> Date:     Mon, 14 Feb 2005 17:45:06 +0100
> From:     Bas van der Vlies <basv at sara.nl>
> To:     Maui Users <mauiusers at supercluster.org>
> 
> 
> 
> At our side we run one job per nodes and have an MAXPS setting of 600
> hours and max walltime 120 hours. Our nodes have 2 processors. When the
> user submits
> an job for eg:
>     1) qsub -I -lnodes=60:ppn=1 -lwalltime=10:00:00 ( will run )
>     2) qsub -I -lnodes=60:ppn=2 -lwalltime=10:00:00 ( wil not run MAXPS
>                                                       violation)
> 
> Now when job 1 runs is allocates the whole node and maui sees that it
> oocupies 4 task ( 2 nodes and each node two cpu's = 4 tasks). So the
> used tme will becalculated as 60 * 2 * 10 = 1200 hours. What is far more
> then allowed!
> 
> The next example will only run one job instead of 2:
>     qsub -I -lnodes=30:ppn=1 -lwalltime=10:00:00 ( will run )
>     qsub -I -lnodes=30:ppn=1 -lwalltime=10:00:00 ( will not  run MAXPS
>                                                    violation )
> 
> I have an patch that checks if NODEACCESSPOLICY SINGLEJOB is set. If so
> then it forgets the cpu's per node.
> 
> --- PATCH attached --
> 
> -- 
> -- 
> ********************************************************************
> *                                                                  *
> *  Bas van der Vlies                     e-mail: basv at sara.nl      *
> *  SARA - Academic Computing Services    phone:  +31 20 592 8012   *
> *  Kruislaan 415                         fax:    +31 20 6683167    *
> *  1098 SJ Amsterdam                                               *
> *                                                                  *
> ********************************************************************
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: src/moab/MStats.c
> ===================================================================
> --- src/moab/MStats.c	(revision 2)
> +++ src/moab/MStats.c	(working copy)
> @@ -913,8 +913,20 @@
>       called from:         MQueueAddAJob()
>    */
>  
> -  TotalProcs = MJobGetProcCount(J);
>  
> +  /* 
> +   * HvB  Calculation fix for SINGLEJOB nodes
> +  */ 
> +  RQ = J->Req[0];
> +  if ( RQ->NAccessPolicy == mnacSingleJob )
> +    {
> +    TotalProcs = J->NodesRequested;
> +    }
> +  else
> +    {
> +    TotalProcs = MJobGetProcCount(J);
> +    }
> +
>    if (TotalProcs == 0)
>      {
>      DBG(3,fSTAT) DPrint("INFO:     no tasks associated with job '%s' (no statistics available)\n",
> @@ -929,7 +941,14 @@
>      (double)MSched.Interval / 100.0,
>      (double)MSched.Time - J->StartTime);
>  
> -  pesdedicated = PE * interval;
> +  if ( RQ->NAccessPolicy == mnacSingleJob )
> +    {
> +    pesdedicated = TotalProcs * interval;
> +    }
> +  else
> +    {
> +    pesdedicated = PE * interval;
> +    }
>  
>    for (rqindex = 0;J->Req[rqindex] != NULL;rqindex++)
>      { 
> @@ -947,10 +966,10 @@
>        psremaining = TotalProcs * (J->StartTime + J->WCLimit - MSched.Time);
>      else
>        psremaining = 0;
> - 
> +
>      if ((J->StartTime != MSched.Time) && (J->CTime != MSched.Time))
>        { 
> -      psdedicated = interval * MJobGetProcCount(J);
> +      psdedicated = interval * TotalProcs;
>  
>        for (nindex = 0;nindex < MAX_MNODE_PER_JOB;nindex++)
>          {
> Index: src/moab/MPolicy.c
> ===================================================================
> --- src/moab/MPolicy.c	(revision 2)
> +++ src/moab/MPolicy.c	(working copy)
> @@ -1518,6 +1518,11 @@
>  
>    double PE;
>  
> +  /*
> +   * HvB
> +  */
> +  mreq_t *RQ;
> +
>    const char *FName = "MPolicyAdjustUsage";
>  
>    DBG(4,fSCHED) DPrint("%s(%s,%s,%s,%s,%s,%s,%d,%s)\n",
> @@ -1553,8 +1558,18 @@
>      PConsumed[mptMaxJob]  = 1;    
>      PConsumed[mptMaxProc] = MJobGetProcCount(J);
>      PConsumed[mptMaxNode] = J->Request.NC;
> -    PConsumed[mptMaxPS]   = PConsumed[mptMaxProc] * PConsumed[mptMaxWC];
>  
> +    /*
> +     *  HvB Calculation fix for NODEACCESSPOLICY SINGLEJOB
> +    */
> +    RQ = J->Req[0];
> +    if ( RQ->NAccessPolicy == mnacSingleJob )
> +      {
> +      PConsumed[mptMaxPS]   = J->NodesRequested * PConsumed[mptMaxWC];
> +      }
> +    else
> +      PConsumed[mptMaxPS]   = PConsumed[mptMaxProc] * PConsumed[mptMaxWC];
> +
>      MJobGetPE(J,&MPar[0],&PE);
>  
>      PConsumed[mptMaxPE] = (int)PE;
> @@ -1571,7 +1586,17 @@
>      PConsumed[mptMaxNode] = R->NodeCount;
>      PConsumed[mptMaxWC]   = R->EndTime - R->StartTime;
>      PConsumed[mptMaxPE]   = R->AllocPC;
> -    PConsumed[mptMaxPS]   = PConsumed[mptMaxProc] * PConsumed[mptMaxWC];       
> +
> +    /*
> +     *  HvB Calculation fix for NODEACCESSPOLICY SINGLEJOB
> +    */
> +    RQ = J->Req[0];
> +    if ( RQ->NAccessPolicy == mnacSingleJob )
> +      {
> +      PConsumed[mptMaxPS]   = J->NodesRequested * PConsumed[mptMaxWC];
> +      }
> +    else
> +      PConsumed[mptMaxPS]   = PConsumed[mptMaxProc] * PConsumed[mptMaxWC];
>      }
>    else
>      {
> Index: src/moab/MJob.c
> ===================================================================
> --- src/moab/MJob.c	(revision 2)
> +++ src/moab/MJob.c	(working copy)
> @@ -2639,6 +2639,11 @@
>  
>    double PE;
>  
> +  /*
> +   * HvB
> +  */
> +  mreq_t *RQ;
> +
>    /* Modes:  active, system, queue */
>  
>    const char *FName = "MJobCheckLimits";
> @@ -2670,8 +2675,20 @@
>    JUsage[mptMaxProc] = MJobGetProcCount(J);
>    JUsage[mptMaxNode] = J->Request.NC;
>    JUsage[mptMaxWC]   = J->WCLimit;
> -  JUsage[mptMaxPS]   = JUsage[mptMaxProc] * JUsage[mptMaxWC];
>  
> +  /* 
> +   * HvB Calculation fix for NODEACCESSPOLICY SINGLEJOB  
> +  */
> +  RQ = J->Req[0];
> +  if ( RQ->NAccessPolicy == mnacSingleJob )
> +    {
> +    JUsage[mptMaxPS] = J->NodesRequested * JUsage[mptMaxWC];
> +    }
> +  else
> +    {
> +    JUsage[mptMaxPS] = JUsage[mptMaxProc] * JUsage[mptMaxWC];
> +    }
> +
>    MJobGetPE(J,&MPar[0],&PE);      
>  
>    JUsage[mptMaxPE] = (int)PE;
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> mauiusers mailing list
> mauiusers at supercluster.org
> http://www.supercluster.org/mailman/listinfo/mauiusers


-- 
--
********************************************************************
*                                                                  *
*  Bas van der Vlies                     e-mail: basv at sara.nl      *
*  SARA - Academic Computing Services    phone:  +31 20 592 8012   *
*  Kruislaan 415                         fax:    +31 20 6683167    *
*  1098 SJ Amsterdam                                               *
*                                                                  *
********************************************************************


More information about the mauiusers mailing list