From 36a8b3cc4251392a7874fa11d3ca30aeddb3c969 Mon Sep 17 00:00:00 2001 From: josh Date: Wed, 27 Jun 2007 20:01:37 +0000 Subject: [PATCH] FIX: fixed bug with generic consumable floating resources and typos in MPBSI.c Description: The fixes for these bugs were submitted in a patch by Jeffery B. Reed. git-svn-id: svn://opensvn.adaptivecomputing.com/maui/trunk@88 3f5042e3-fb1d-0410-be18-d6ca2573e517 --- src/moab/MPBSI.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/moab/MPBSI.c b/src/moab/MPBSI.c index a961746..f3a2e77 100644 --- a/src/moab/MPBSI.c +++ b/src/moab/MPBSI.c @@ -4139,9 +4139,9 @@ int MPBSJobUpdate( CPUTime = 1; } - /* adjust 'per task limits */ + /* adjust per task limits */ - if (MaxJobMem > 0) + if ((MaxJobMem > 0) && (RQ->DRes.Procs > 0)) { /* set job wide dedicated resources */ @@ -4153,7 +4153,7 @@ int MPBSJobUpdate( RQ->URes.Mem /= RQ->TaskCount; } - if (MaxJobSwap > 0) + if ((MaxJobSwap > 0) && (RQ->DRes.Procs > 0)) { /* set both dedicated resources AND node requirements */ @@ -5944,10 +5944,10 @@ int MPBSJobAdjustResources( if (TA != NULL) { - if (TA->JobMemLimit > 0) + if ((TA->JobMemLimit > 0) && (RQ->DRes.Procs > 0)) RQ->DRes.Mem = MAX(RQ->DRes.Mem,TA->JobMemLimit / RQ->TaskCount); - if (TA->JobSwapLimit > 0) + if ((TA->JobSwapLimit > 0) && (RQ->DRes.Procs > 0)) RQ->DRes.Swap = MAX(RQ->DRes.Swap,TA->JobSwapLimit / RQ->TaskCount); } /* END if (TA != NULL) */ @@ -5964,9 +5964,9 @@ int MPBSJobAdjustResources( 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; }