You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// MAJOR TO-DOs: Initialize engine on Rank 0 only and broadcast to others. Currently each rank initializes its own engine which is inefficient for large datasets.
141
+
// Process all queries in one rank (must be serial), then scatter results to other ranks for printing. Currently each rank processes its own queries which may lead to unbalanced workloads.
142
+
// GATHER results from all ranks to Rank 0 for unified output. Currently each rank prints its own results which may be disorganized.
143
+
139
144
intmain(intargc, char*argv[]) {
140
145
141
146
// Initialize MPI Environment
@@ -199,7 +204,6 @@ int main(int argc, char *argv[]) {
199
204
doubleloadTimeTaken=MPI_Wtime() -totalStart;
200
205
201
206
// Split queries into an array
202
-
#defineMAX_QUERIES 1000
203
207
char*queries[MAX_QUERIES];
204
208
intquery_count=0;
205
209
@@ -211,6 +215,10 @@ int main(int argc, char *argv[]) {
0 commit comments