[Mauiusers] maui-3.2.6p19 patch correcting Generic Consumable Floating Resources issues

Jeffrey B. Reed jeff.reed at intrinsity.com
Wed Jun 27 07:33:08 MDT 2007


The enclosed patch addresses two separate issues:

1.  Generic Consumable Floating Resources do not work properly when
     a job also requests the `mem' resource.

2.  Typos found in the initialization of the RQ data structure in the
     MPBSJobAdjustResources subroutine.

Generic Consumable Floating Resources Issue Description
-------------------------------------------------------

We configured maui to have a Generic Consumable Floating Resource

NODECFG[GLOBAL] GRES=hsimplus:1

We then attempted to request this resource, see following example, the job was
promptly submitted and the hsimplus resource was allocated.

% qsub -l software=hsimplus test_job

However, when we also requested a particular memory size, see following example,
the job would never get submitted due to lack of memory resource of the GLOBAL node.

% qsub -l software=hsimplus,mem=2G test_job
-------------- next part --------------
--- /export/home/tomr/maui-3.2.6p19.orig/src/moab/MPBSI.c	2007-03-28 15:05:39.000000000 -0500
+++ /export/home/tomr/src/rpm/SOURCES/maui-3.2.6p19/src/moab/MPBSI.c	2007-06-26 11:35:14.000000000 -0500
@@ -4249,7 +4249,7 @@
 
     /* adjust 'per task limits */
 
-    if (MaxJobMem > 0)
+    if ((MaxJobMem > 0) && (RQ->DRes.Procs))
       {
       /* set job wide dedicated resources */
 
@@ -4261,7 +4261,7 @@
       RQ->URes.Mem /= RQ->TaskCount;
       }
 
-    if (MaxJobSwap > 0)
+    if ((MaxJobSwap > 0) && (RQ->DRes.Procs))
       {
       /* set both dedicated resources AND node requirements */
 
@@ -6034,10 +6034,11 @@
 
     if (TA != NULL)
       {
-      if (TA->JobMemLimit > 0)
+	if ((TA->JobMemLimit > 0) && (RQ->DRes.Procs)) {
         RQ->DRes.Mem = MAX(RQ->DRes.Mem,TA->JobMemLimit / RQ->TaskCount);
+	}
 
-      if (TA->JobSwapLimit > 0)
+	if ((TA->JobSwapLimit > 0) && (RQ->DRes.Procs))
         RQ->DRes.Swap = MAX(RQ->DRes.Swap,TA->JobSwapLimit / RQ->TaskCount);
       }  /* END if (TA != NULL) */
  
@@ -6054,9 +6055,9 @@
 
         RQ->RequiredMemory = J->Req[0]->RequiredMemory;
         RQ->MemCmp         = J->Req[0]->MemCmp;
-        RQ->RequiredSwap   = J->Req[0]->RequiredMemory;
+        RQ->RequiredSwap   = J->Req[0]->RequiredSwap;
         RQ->SwapCmp        = J->Req[0]->SwapCmp;
-        RQ->RequiredDisk   = J->Req[0]->RequiredMemory;
+        RQ->RequiredDisk   = J->Req[0]->RequiredDisk;
         RQ->DiskCmp        = J->Req[0]->DiskCmp;
         }
  


More information about the mauiusers mailing list