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)
1657
1657
#if CMK_NODE_QUEUE_AVAILABLE
1658
1658
s -> nodeQ = CsvAccess (CsdNodeQueue );
1659
1659
s -> nodeLock = CsvAccess (CsdNodeQueueLock );
1660
- s -> nodeGrpFreq = 2 ; // check node queue once in 4 (2^2) iterations.
1660
+ s -> nodeGrpFreq = 4 ;
1661
1661
#endif
1662
1662
#if CMK_GRID_QUEUE_AVAILABLE
1663
1663
s -> gridQ = CpvAccess (CsdGridQueue );
@@ -1726,11 +1726,9 @@ void *CsdNextMessage(CsdSchedulerState_t *s) {
1726
1726
s -> iter ++ ;
1727
1727
1728
1728
#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 )))
1734
1732
{
1735
1733
msg = CmiGetNonLocalNodeQ ();
1736
1734
if (NULL != msg ) return msg ;
Original file line number Diff line number Diff line change @@ -1130,7 +1130,7 @@ typedef struct {
1130
1130
Queue nodeQ;
1131
1131
Queue schedQ;
1132
1132
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
1134
1134
// should add a function to change this from the program for advanced users. One obstacle:
1135
1135
// it is inside a struct that is on stack, and so not accessible for standalone functions. Need to
1136
1136
// 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