force reservations with feature list to be locked down to initially allocated node list
git-svn-id: svn://opensvn.adaptivecomputing.com/maui/trunk@11 3f5042e3-fb1d-0410-be18-d6ca2573e517
This commit is contained in:
parent
02e6eefd2b
commit
8e156981cb
@ -1237,7 +1237,7 @@ int MResToXML(
|
||||
|
||||
int *AList;
|
||||
|
||||
char tmpString[MAX_MLINE];
|
||||
char tmpString[MAX_MBUFFER];
|
||||
|
||||
if ((R == NULL) || (E == NULL))
|
||||
{
|
||||
|
@ -6295,6 +6295,8 @@ int UIResCreate(
|
||||
int index;
|
||||
|
||||
char Pattern[MAX_MBUFFER];
|
||||
char *PatPtr;
|
||||
int PatSize;
|
||||
|
||||
char *ptr;
|
||||
char *TokPtr;
|
||||
@ -6657,6 +6659,38 @@ int UIResCreate(
|
||||
NodeCount = NIndex;
|
||||
}
|
||||
|
||||
/* When the feature list is set, and a HOST_REGEX or "ALL"
|
||||
* is used, we replace the Pattern with the resulting nodelist.
|
||||
* This ensures the reservation is checkpointed properly */
|
||||
|
||||
if ((strcmp(FeatureList,NONE) != 0) && (strstr(Pattern,"TASKS") == NULL))
|
||||
{
|
||||
PatPtr = Pattern;
|
||||
PatSize = sizeof(Pattern);
|
||||
PatPtr[0] = '\0';
|
||||
|
||||
for (nindex = 0;nindex < NodeCount;nindex++)
|
||||
{
|
||||
if (PatSize < 100)
|
||||
{
|
||||
DBG(0,fSCHED) DPrint("ERROR: regex buffer overflow creating reservation '%s'\n", ResID);
|
||||
|
||||
return(FAILURE);
|
||||
}
|
||||
|
||||
if (nindex != 0)
|
||||
{
|
||||
MUSNPrintF(&PatPtr,&PatSize,"|%s",
|
||||
NodeList[nindex].N->Name);
|
||||
}
|
||||
else
|
||||
{
|
||||
MUSNPrintF(&PatPtr,&PatSize,"%s",
|
||||
NodeList[nindex].N->Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* translate dedicated proc request to per node proc request */
|
||||
|
||||
SPC = tmpRQ.DRes.Procs;
|
||||
|
Loading…
Reference in New Issue
Block a user