File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -1657,7 +1657,7 @@ void CsdSchedulerState_new(CsdSchedulerState_t *s)
16571657#if CMK_NODE_QUEUE_AVAILABLE
16581658 s -> nodeQ = CsvAccess (CsdNodeQueue );
16591659 s -> nodeLock = CsvAccess (CsdNodeQueueLock );
1660- s -> nodeGrpFreq = 2 ; // check node queue once in 4 (2^2) iterations.
1660+ s -> nodeGrpFreq = 4 ;
16611661#endif
16621662#if CMK_GRID_QUEUE_AVAILABLE
16631663 s -> gridQ = CpvAccess (CsdGridQueue );
@@ -1726,11 +1726,9 @@ void *CsdNextMessage(CsdSchedulerState_t *s) {
17261726 s -> iter ++ ;
17271727
17281728#if CMK_NODE_QUEUE_AVAILABLE
1729- if (1 == (s -> iter & (1 << s -> nodeGrpFreq ))) // since we use nodeGrpFreq == 0 to mean
1730- // don't check NodeQ with high priority, i
1731- // value of 1 serves well as when to check it.
1732- // note: s->nodeGrpFreq is raised to a power of 2, to avoid modulo operator
1733- //note: maybe nodeGrpFreq should be a global readonly (or member of some globalParams group), to avoid "s->"
1729+ // we use nodeGrpFreq == 0 to mean
1730+ // don't check NodeQ with high priority
1731+ if (s -> nodeGrpFreq && (0 == (s -> iter % s -> nodeGrpFreq )))
17341732 {
17351733 msg = CmiGetNonLocalNodeQ ();
17361734 if (NULL != msg ) return msg ;
Original file line number Diff line number Diff line change @@ -1130,7 +1130,7 @@ typedef struct {
11301130 Queue nodeQ;
11311131 Queue schedQ;
11321132 unsigned short iter; // counting number of sched iterations (hopefully of for it to roll over
1133- unsigned short nodeGrpFreq; // call nodegroup queue once every 2^ nodeGrpFreq iterations with high prio
1133+ unsigned short nodeGrpFreq; // call nodegroup queue once every nodeGrpFreq iterations with high prio
11341134 // should add a function to change this from the program for advanced users. One obstacle:
11351135 // it is inside a struct that is on stack, and so not accessible for standalone functions. Need to
11361136 // resolve this by making a schedule a c++ object, but even then we need a ptr to the currently-running scheduler
You can’t perform that action at this time.
0 commit comments