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
This commit is contained in:
josh 2007-06-27 20:01:37 +00:00
parent 81fb762cff
commit 36a8b3cc42

View File

@ -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;
}