Commit 492db4bf authored by Jonathan Jenkins's avatar Jonathan Jenkins
Browse files

make the global rank queue application ID aware

parent f859fa6b
...@@ -60,6 +60,7 @@ struct rc_op ...@@ -60,6 +60,7 @@ struct rc_op
/* tracks lifo queue of reversed operations for a given rank */ /* tracks lifo queue of reversed operations for a given rank */
struct rank_queue struct rank_queue
{ {
int app;
int rank; int rank;
struct rc_op *lifo; struct rc_op *lifo;
struct rank_queue *next; struct rank_queue *next;
...@@ -92,7 +93,7 @@ int codes_workload_load( ...@@ -92,7 +93,7 @@ int codes_workload_load(
tmp = ranks; tmp = ranks;
while(tmp) while(tmp)
{ {
if(tmp->rank == rank) if(tmp->rank == rank && tmp->app == app_id)
break; break;
tmp = tmp->next; tmp = tmp->next;
} }
...@@ -100,6 +101,7 @@ int codes_workload_load( ...@@ -100,6 +101,7 @@ int codes_workload_load(
{ {
tmp = (struct rank_queue*)malloc(sizeof(*tmp)); tmp = (struct rank_queue*)malloc(sizeof(*tmp));
assert(tmp); assert(tmp);
tmp->app = app_id;
tmp->rank = rank; tmp->rank = rank;
tmp->lifo = NULL; tmp->lifo = NULL;
tmp->next = ranks; tmp->next = ranks;
...@@ -129,7 +131,7 @@ void codes_workload_get_next( ...@@ -129,7 +131,7 @@ void codes_workload_get_next(
tmp = ranks; tmp = ranks;
while(tmp) while(tmp)
{ {
if(tmp->rank == rank) if(tmp->rank == rank && tmp->app == app_id)
break; break;
tmp = tmp->next; tmp = tmp->next;
} }
...@@ -145,7 +147,7 @@ void codes_workload_get_next( ...@@ -145,7 +147,7 @@ void codes_workload_get_next(
} }
/* ask generator for the next operation */ /* ask generator for the next operation */
method_array[wkld_id]->codes_workload_get_next(rank, app_id, op); method_array[wkld_id]->codes_workload_get_next(app_id, rank, op);
return; return;
} }
...@@ -162,7 +164,7 @@ void codes_workload_get_next_rc( ...@@ -162,7 +164,7 @@ void codes_workload_get_next_rc(
tmp = ranks; tmp = ranks;
while(tmp) while(tmp)
{ {
if(tmp->rank == rank) if(tmp->rank == rank && tmp->app == app_id)
break; break;
tmp = tmp->next; tmp = tmp->next;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment