Skip to content

Commit 88c9df0

Browse files
committed
Print some more stats on the input in TEST mode.
1 parent efa594f commit 88c9df0

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

src/graph_compute/numa_scheduling.h

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,17 +155,31 @@ static inline void calculateNodeDependenciesChunk(vertex_t * const nodes,
155155
}
156156
WHEN_TEST({
157157
vid_t syncLessVertices = 0;
158+
vid_t verticesWithNoDecrements = 0;
159+
vid_t verticesWithDepsSatisfiedByConstr = 0;
158160
for (vid_t i = 0; i < cntNodes; i++) {
159-
if (nodes[i].sched.cntDependentEdges == 0 &&
160-
nodes[i].sched.dependencies) {
161-
// cntDependentEdges is the number of neighbor decrements this vertex must do,
162-
// dependencies is the number of times this vertex must be decremented.
163-
// If both of these are zero, processing the vertex requires no synchronization.
161+
// cntDependentEdges is the number of neighbor decrements this vertex must do,
162+
// dependencies is the number of times this vertex must be decremented.
163+
// If both of these are zero, processing the vertex requires no synchronization.
164+
bool noDecrements = (nodes[i].sched.cntDependentEdges == 0);
165+
bool dependenciesSatisfiedByConstruction = (nodes[i].sched.dependencies == 0);
166+
167+
if (noDecrements && dependenciesSatisfiedByConstruction) {
168+
verticesWithNoDecrements++;
169+
verticesWithDepsSatisfiedByConstr++;
164170
syncLessVertices++;
171+
} else if (noDecrements) {
172+
verticesWithNoDecrements++;
173+
} else if (dependenciesSatisfiedByConstruction) {
174+
verticesWithDepsSatisfiedByConstr++;
165175
}
166176
}
167-
printf("InterChunkDependencies, syncLessVertices: %lu %lu\n",
177+
printf(
178+
"InterChunkDependencies, verticesWithNoDecrements, "
179+
"verticesWithDepsSatisfiedByConstr, syncLessVertices: %lu %lu %lu %lu\n",
168180
static_cast<uint64_t>(cntDependencies),
181+
static_cast<uint64_t>(verticesWithNoDecrements),
182+
static_cast<uint64_t>(verticesWithDepsSatisfiedByConstr),
169183
static_cast<uint64_t>(syncLessVertices));
170184
})
171185
numaInit_t numaInit(NUMA_WORKERS,

0 commit comments

Comments
 (0)