diff --git a/include/moab-proto.h b/include/moab-proto.h index d9c710b..2eddcc3 100644 --- a/include/moab-proto.h +++ b/include/moab-proto.h @@ -380,7 +380,7 @@ int MQueuePrioritizeJobs(mjob_t **,int *); int MQueueGetBestRQTime(int *,long *); int MQueueScheduleRJobs(int *); int MQueueScheduleSJobs(int *); -int MQueueDiagnose(mjob_t **,int *,int,mpar_t *,char *); +int MQueueDiagnose(mjob_t **,int *,int,mpar_t *,char *,int); int MQueueCheckStatus(void); int MQueueGetRequeueValue(int *,long,long,double *); int MQueueSelectAllJobs(mjob_t **,int,mpar_t *,int *,int,int,int,char *); diff --git a/include/msched-version.h b/include/msched-version.h index 1d5601b..ba0d247 100644 --- a/include/msched-version.h +++ b/include/msched-version.h @@ -1 +1 @@ -#define MSCHED_VERSION "maui-3.2.6p14-snap.1125680408" +#define MSCHED_VERSION "maui-3.2.6p14-snap.1126543721" diff --git a/src/moab/MQueue.c b/src/moab/MQueue.c index 5656447..5e45dae 100644 --- a/src/moab/MQueue.c +++ b/src/moab/MQueue.c @@ -925,7 +925,8 @@ int MQueueDiagnose( int *NBJobList, int PLevel, mpar_t *PS, - char *Buffer) + char *Buffer, + int BufSize) { int pindex; @@ -977,6 +978,9 @@ int MQueueDiagnose( for (J = FullQ[0]->Next;J != FullQ[0];J = J->Next) { + if (strlen(Buffer) + 256 >= BufSize) + break; + if ((PS->Index > 0) && (MUBMCheck(PS->Index,J->PAL) == FAILURE)) continue; @@ -1183,7 +1187,7 @@ int MQueueDiagnose( if (IsBlocked == FALSE) { - switch(J->BlockReason) + switch (J->BlockReason) { case mjneIdlePolicy: @@ -1205,7 +1209,12 @@ int MQueueDiagnose( break; } /* END switch(J->BlockReason) */ } - } /* END for (jindex) */ + } + + if (J != FullQ[0]) + { + strcat(Buffer,"\nlist truncated\n"); + } return(SUCCESS); } /* END MQueueDiagnose() */ diff --git a/src/server/UserI.c b/src/server/UserI.c index 5010d03..767c2e0 100644 --- a/src/server/UserI.c +++ b/src/server/UserI.c @@ -3739,7 +3739,7 @@ int UIQueueDiagnose( MPolicyMode[PLevel], MAList[ePartition][PIndex]); - if (MQueueDiagnose(MJob,MUIQ,PLevel,&MPar[PIndex],Buffer) == FAILURE) + if (MQueueDiagnose(MJob,MUIQ,PLevel,&MPar[PIndex],Buffer,*BufSize) == FAILURE) { sprintf(Buffer,"cannot evaluate blocked jobs\n");