Commit 51acfe14 authored by Misbah Mubarak's avatar Misbah Mubarak
Browse files

Updating network trace code to use the combined workload API

parent e2ded66e
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <ross.h> #include <ross.h>
#include <inttypes.h> #include <inttypes.h>
#include "codes/codes-nw-workload.h" #include "codes/codes-workload.h"
#include "codes/codes.h" #include "codes/codes.h"
#include "codes/configuration.h" #include "codes/configuration.h"
#include "codes/codes_mapping.h" #include "codes/codes_mapping.h"
...@@ -95,7 +95,7 @@ struct nw_state ...@@ -95,7 +95,7 @@ struct nw_state
struct nw_message struct nw_message
{ {
int msg_type; int msg_type;
struct mpi_event_list op; struct codes_workload_op op;
}; };
/* initialize queues, get next operation */ /* initialize queues, get next operation */
...@@ -163,7 +163,7 @@ void nw_test_init(nw_state* s, tw_lp* lp) ...@@ -163,7 +163,7 @@ void nw_test_init(nw_state* s, tw_lp* lp)
//printf("\n network LP not generating events %d ", (int)s->nw_id); //printf("\n network LP not generating events %d ", (int)s->nw_id);
return; return;
} }
wrkld_id = codes_nw_workload_load("dumpi-trace-workload", params, (int)s->nw_id); wrkld_id = codes_workload_load("dumpi-trace-workload", params, (int)s->nw_id);
/* clock starts ticking */ /* clock starts ticking */
s->elapsed_time = tw_now(lp); s->elapsed_time = tw_now(lp);
...@@ -188,15 +188,15 @@ void nw_test_event_handler(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * lp) ...@@ -188,15 +188,15 @@ void nw_test_event_handler(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * lp)
void nw_test_event_handler_rc(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * lp) void nw_test_event_handler_rc(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * lp)
{ {
codes_nw_workload_get_next_rc(wrkld_id, (int)s->nw_id, &m->op); codes_workload_get_next_rc(wrkld_id, (int)s->nw_id, &m->op);
if(m->op.op_type == CODES_NW_END) if(m->op.op_type == CODES_WK_END)
return; return;
s->total_time -= (m->op.end_time - m->op.start_time); s->total_time -= (m->op.end_time - m->op.start_time);
switch(m->op.op_type) switch(m->op.op_type)
{ {
case CODES_NW_SEND: case CODES_WK_SEND:
case CODES_NW_ISEND: case CODES_WK_ISEND:
{ {
s->num_sends--; s->num_sends--;
s->send_time -= (m->op.end_time - m->op.start_time); s->send_time -= (m->op.end_time - m->op.start_time);
...@@ -204,8 +204,8 @@ void nw_test_event_handler_rc(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * l ...@@ -204,8 +204,8 @@ void nw_test_event_handler_rc(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * l
}; };
break; break;
case CODES_NW_RECV: case CODES_WK_RECV:
case CODES_NW_IRECV: case CODES_WK_IRECV:
{ {
s->num_recvs--; s->num_recvs--;
s->recv_time -= (m->op.end_time - m->op.start_time); s->recv_time -= (m->op.end_time - m->op.start_time);
...@@ -213,49 +213,49 @@ void nw_test_event_handler_rc(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * l ...@@ -213,49 +213,49 @@ void nw_test_event_handler_rc(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * l
} }
break; break;
case CODES_NW_DELAY: case CODES_WK_DELAY:
{ {
s->num_delays--; s->num_delays--;
s->compute_time -= (m->op.end_time - m->op.start_time); s->compute_time -= (m->op.end_time - m->op.start_time);
} }
break; break;
case CODES_NW_BCAST: case CODES_WK_BCAST:
case CODES_NW_ALLGATHER: case CODES_WK_ALLGATHER:
case CODES_NW_ALLGATHERV: case CODES_WK_ALLGATHERV:
case CODES_NW_ALLTOALL: case CODES_WK_ALLTOALL:
case CODES_NW_ALLTOALLV: case CODES_WK_ALLTOALLV:
case CODES_NW_REDUCE: case CODES_WK_REDUCE:
case CODES_NW_ALLREDUCE: case CODES_WK_ALLREDUCE:
case CODES_NW_COL: case CODES_WK_COL:
{ {
s->num_cols--; s->num_cols--;
s->col_time -= (m->op.end_time - m->op.start_time); s->col_time -= (m->op.end_time - m->op.start_time);
} }
break; break;
case CODES_NW_WAIT: case CODES_WK_WAIT:
{ {
s->num_wait--; s->num_wait--;
s->wait_time -= (m->op.end_time - m->op.start_time); s->wait_time -= (m->op.end_time - m->op.start_time);
} }
break; break;
case CODES_NW_WAITALL: case CODES_WK_WAITALL:
{ {
s->num_waitall--; s->num_waitall--;
s->wait_time -= (m->op.end_time - m->op.start_time); s->wait_time -= (m->op.end_time - m->op.start_time);
} }
break; break;
case CODES_NW_WAITSOME: case CODES_WK_WAITSOME:
{ {
s->num_waitsome--; s->num_waitsome--;
s->wait_time -= (m->op.end_time - m->op.start_time); s->wait_time -= (m->op.end_time - m->op.start_time);
} }
break; break;
case CODES_NW_WAITANY: case CODES_WK_WAITANY:
{ {
s->num_waitany--; s->num_waitany--;
s->wait_time -= (m->op.end_time - m->op.start_time); s->wait_time -= (m->op.end_time - m->op.start_time);
...@@ -273,12 +273,13 @@ void nw_test_event_handler_rc(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * l ...@@ -273,12 +273,13 @@ void nw_test_event_handler_rc(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * l
static void get_next_mpi_operation(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * lp) static void get_next_mpi_operation(nw_state* s, tw_bf * bf, nw_message * m, tw_lp * lp)
{ {
mpi_event_list mpi_op; struct codes_workload_op mpi_op;
codes_nw_workload_get_next(wrkld_id, (int)s->nw_id, &mpi_op); codes_workload_get_next(wrkld_id, (int)s->nw_id, &mpi_op);
memcpy(&m->op, &mpi_op, sizeof(struct mpi_event_list)); memcpy(&m->op, &mpi_op, sizeof(struct codes_workload_op));
if(mpi_op.op_type == CODES_NW_END) if(mpi_op.op_type == CODES_WK_END)
{ {
//printf("\n workload ending!!! ");
return; return;
} }
...@@ -286,8 +287,8 @@ static void get_next_mpi_operation(nw_state* s, tw_bf * bf, nw_message * m, tw_l ...@@ -286,8 +287,8 @@ static void get_next_mpi_operation(nw_state* s, tw_bf * bf, nw_message * m, tw_l
switch(mpi_op.op_type) switch(mpi_op.op_type)
{ {
case CODES_NW_SEND: case CODES_WK_SEND:
case CODES_NW_ISEND: case CODES_WK_ISEND:
{ {
s->num_sends++; s->num_sends++;
s->send_time += (mpi_op.end_time - mpi_op.start_time); s->send_time += (mpi_op.end_time - mpi_op.start_time);
...@@ -295,8 +296,8 @@ static void get_next_mpi_operation(nw_state* s, tw_bf * bf, nw_message * m, tw_l ...@@ -295,8 +296,8 @@ static void get_next_mpi_operation(nw_state* s, tw_bf * bf, nw_message * m, tw_l
} }
break; break;
case CODES_NW_RECV: case CODES_WK_RECV:
case CODES_NW_IRECV: case CODES_WK_IRECV:
{ {
s->num_recvs++; s->num_recvs++;
s->recv_time += (mpi_op.end_time - mpi_op.start_time); s->recv_time += (mpi_op.end_time - mpi_op.start_time);
...@@ -304,46 +305,46 @@ static void get_next_mpi_operation(nw_state* s, tw_bf * bf, nw_message * m, tw_l ...@@ -304,46 +305,46 @@ static void get_next_mpi_operation(nw_state* s, tw_bf * bf, nw_message * m, tw_l
} }
break; break;
case CODES_NW_DELAY: case CODES_WK_DELAY:
{ {
s->num_delays++; s->num_delays++;
s->compute_time += (mpi_op.end_time - mpi_op.start_time); s->compute_time += (mpi_op.end_time - mpi_op.start_time);
} }
break; break;
case CODES_NW_BCAST: case CODES_WK_BCAST:
case CODES_NW_ALLGATHER: case CODES_WK_ALLGATHER:
case CODES_NW_ALLGATHERV: case CODES_WK_ALLGATHERV:
case CODES_NW_ALLTOALL: case CODES_WK_ALLTOALL:
case CODES_NW_ALLTOALLV: case CODES_WK_ALLTOALLV:
case CODES_NW_REDUCE: case CODES_WK_REDUCE:
case CODES_NW_ALLREDUCE: case CODES_WK_ALLREDUCE:
case CODES_NW_COL: case CODES_WK_COL:
{ {
s->num_cols++; s->num_cols++;
s->col_time += (mpi_op.end_time - mpi_op.start_time); s->col_time += (mpi_op.end_time - mpi_op.start_time);
} }
break; break;
case CODES_NW_WAIT: case CODES_WK_WAIT:
{ {
s->num_wait++; s->num_wait++;
s->wait_time += (mpi_op.end_time - mpi_op.start_time); s->wait_time += (mpi_op.end_time - mpi_op.start_time);
} }
break; break;
case CODES_NW_WAITALL: case CODES_WK_WAITALL:
{ {
s->num_waitall++; s->num_waitall++;
s->wait_time += (mpi_op.end_time - mpi_op.start_time); s->wait_time += (mpi_op.end_time - mpi_op.start_time);
} }
break; break;
case CODES_NW_WAITSOME: case CODES_WK_WAITSOME:
{ {
s->num_waitsome++; s->num_waitsome++;
s->wait_time += (mpi_op.end_time - mpi_op.start_time); s->wait_time += (mpi_op.end_time - mpi_op.start_time);
} }
break; break;
case CODES_NW_WAITANY: case CODES_WK_WAITANY:
{ {
s->num_waitany++; s->num_waitany++;
s->wait_time += (mpi_op.end_time - mpi_op.start_time); s->wait_time += (mpi_op.end_time - mpi_op.start_time);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <ross.h> #include <ross.h>
#include <inttypes.h> #include <inttypes.h>
#include "codes/codes-nw-workload.h" #include "codes/codes-workload.h"
#include "codes/codes.h" #include "codes/codes.h"
#include "codes/configuration.h" #include "codes/configuration.h"
#include "codes/codes_mapping.h" #include "codes/codes_mapping.h"
...@@ -49,7 +49,7 @@ enum MPI_NW_EVENTS ...@@ -49,7 +49,7 @@ enum MPI_NW_EVENTS
/* stores pointers of pending MPI operations to be matched with their respective sends/receives. */ /* stores pointers of pending MPI operations to be matched with their respective sends/receives. */
struct mpi_msgs_queue struct mpi_msgs_queue
{ {
mpi_event_list* mpi_op; struct codes_workload_op* mpi_op;
struct mpi_msgs_queue* next; struct mpi_msgs_queue* next;
}; };
...@@ -63,7 +63,7 @@ struct completed_requests ...@@ -63,7 +63,7 @@ struct completed_requests
/* for wait operations, store the pending operation and number of completed waits so far. */ /* for wait operations, store the pending operation and number of completed waits so far. */
struct pending_waits struct pending_waits
{ {
mpi_event_list* mpi_op; struct codes_workload_op* mpi_op;
int num_completed; int num_completed;
tw_stime start_time; tw_stime start_time;
}; };
...@@ -130,13 +130,13 @@ struct nw_state ...@@ -130,13 +130,13 @@ struct nw_state
struct nw_message struct nw_message
{ {
int msg_type; int msg_type;
struct mpi_event_list op; struct codes_workload_op op;
/* for reverse computation*/ /* for reverse computation*/
int found_match; int found_match;
short matched_op; short matched_op;
dumpi_req_id saved_matched_req; dumpi_req_id saved_matched_req;
struct mpi_event_list* ptr_match_op; struct codes_workload_op* ptr_match_op;
struct pending_waits* saved_pending_wait; struct pending_waits* saved_pending_wait;
double saved_send_time; double saved_send_time;
...@@ -188,7 +188,7 @@ static void update_arrival_queue(nw_state*s, tw_bf* bf, nw_message* m, tw_lp * l ...@@ -188,7 +188,7 @@ static void update_arrival_queue(nw_state*s, tw_bf* bf, nw_message* m, tw_lp * l
static void update_arrival_queue_rc(nw_state*s, tw_bf* bf, nw_message* m, tw_lp * lp); static void update_arrival_queue_rc(nw_state*s, tw_bf* bf, nw_message* m, tw_lp * lp);
/* insert MPI operation in the waiting queue*/ /* insert MPI operation in the waiting queue*/
static void mpi_pending_queue_insert_op(struct mpi_queue_ptrs* mpi_queue, mpi_event_list* mpi_op); static void mpi_pending_queue_insert_op(struct mpi_queue_ptrs* mpi_queue, struct codes_workload_op* mpi_op);
/* remove completed request IDs from the queue for reuse. Reverse of above function. */ /* remove completed request IDs from the queue for reuse. Reverse of above function. */
static void remove_req_id(struct completed_requests** requests, int16_t req_id); static void remove_req_id(struct completed_requests** requests, int16_t req_id);
...@@ -197,7 +197,7 @@ static void remove_req_id(struct completed_requests** requests, int16_t req_id); ...@@ -197,7 +197,7 @@ static void remove_req_id(struct completed_requests** requests, int16_t req_id);
static int mpi_queue_remove_matching_op(nw_state* s, tw_lp* lp, struct mpi_queue_ptrs* mpi_queue, nw_message* msg); static int mpi_queue_remove_matching_op(nw_state* s, tw_lp* lp, struct mpi_queue_ptrs* mpi_queue, nw_message* msg);
/* remove the tail of the MPI operation from waiting queue */ /* remove the tail of the MPI operation from waiting queue */
static int mpi_queue_remove_tail(tw_lpid lpid, struct mpi_queue_ptrs* mpi_queue, mpi_event_list* mpi_op); static int mpi_queue_remove_tail(tw_lpid lpid, struct mpi_queue_ptrs* mpi_queue, struct codes_workload_op* mpi_op);
/* insert completed MPI requests in the queue. */ /* insert completed MPI requests in the queue. */
static void mpi_completed_queue_insert_op(struct completed_requests** mpi_completed_queue, dumpi_req_id req_id); static void mpi_completed_queue_insert_op(struct completed_requests** mpi_completed_queue, dumpi_req_id req_id);
...@@ -253,11 +253,11 @@ static void printQueue(tw_lpid lpid, struct mpi_queue_ptrs* mpi_queue, char* msg ...@@ -253,11 +253,11 @@ static void printQueue(tw_lpid lpid, struct mpi_queue_ptrs* mpi_queue, char* msg
while(tmp) while(tmp)
{ {
if(tmp->mpi_op->op_type == CODES_NW_SEND || tmp->mpi_op->op_type == CODES_NW_ISEND) if(tmp->mpi_op->op_type == CODES_WK_SEND || tmp->mpi_op->op_type == CODES_WK_ISEND)
printf("\n lpid %ld send operation data type %d count %d tag %d source %d", printf("\n lpid %ld send operation data type %d count %d tag %d source %d",
lpid, tmp->mpi_op->u.send.data_type, tmp->mpi_op->u.send.count, lpid, tmp->mpi_op->u.send.data_type, tmp->mpi_op->u.send.count,
tmp->mpi_op->u.send.tag, tmp->mpi_op->u.send.source_rank); tmp->mpi_op->u.send.tag, tmp->mpi_op->u.send.source_rank);
else if(tmp->mpi_op->op_type == CODES_NW_IRECV || tmp->mpi_op->op_type == CODES_NW_RECV) else if(tmp->mpi_op->op_type == CODES_WK_IRECV || tmp->mpi_op->op_type == CODES_WK_RECV)
printf("\n lpid %ld recv operation data type %d count %d tag %d source %d", printf("\n lpid %ld recv operation data type %d count %d tag %d source %d",
lpid, tmp->mpi_op->u.recv.data_type, tmp->mpi_op->u.recv.count, lpid, tmp->mpi_op->u.recv.data_type, tmp->mpi_op->u.recv.count,
tmp->mpi_op->u.recv.tag, tmp->mpi_op->u.recv.source_rank ); tmp->mpi_op->u.recv.tag, tmp->mpi_op->u.recv.source_rank );
...@@ -269,7 +269,7 @@ static void printQueue(tw_lpid lpid, struct mpi_queue_ptrs* mpi_queue, char* msg ...@@ -269,7 +269,7 @@ static void printQueue(tw_lpid lpid, struct mpi_queue_ptrs* mpi_queue, char* msg
} }
/* re-insert element in the queue at the index --- maintained for reverse computation */ /* re-insert element in the queue at the index --- maintained for reverse computation */
static void mpi_queue_update(struct mpi_queue_ptrs* mpi_queue, mpi_event_list* mpi_op, int pos) static void mpi_queue_update(struct mpi_queue_ptrs* mpi_queue, struct codes_workload_op* mpi_op, int pos)
{ {
struct mpi_msgs_queue* elem = malloc(sizeof(struct mpi_msgs_queue)); struct mpi_msgs_queue* elem = malloc(sizeof(struct mpi_msgs_queue));
assert(elem); assert(elem);
...@@ -381,7 +381,7 @@ static int notify_waits(nw_state* s, tw_bf* bf, tw_lp* lp, nw_message* m, dumpi_ ...@@ -381,7 +381,7 @@ static int notify_waits(nw_state* s, tw_bf* bf, tw_lp* lp, nw_message* m, dumpi_
int op_type = wait_elem->mpi_op->op_type; int op_type = wait_elem->mpi_op->op_type;
if(op_type == CODES_NW_WAIT) if(op_type == CODES_WK_WAIT)
{ {
if(wait_elem->mpi_op->u.wait.req_id == completed_req) if(wait_elem->mpi_op->u.wait.req_id == completed_req)
{ {
...@@ -396,7 +396,7 @@ static int notify_waits(nw_state* s, tw_bf* bf, tw_lp* lp, nw_message* m, dumpi_ ...@@ -396,7 +396,7 @@ static int notify_waits(nw_state* s, tw_bf* bf, tw_lp* lp, nw_message* m, dumpi_
} }
} }
else else
if(op_type == CODES_NW_WAITALL) if(op_type == CODES_WK_WAITALL)
{ {
int required_count = wait_elem->mpi_op->u.waits.count; int required_count = wait_elem->mpi_op->u.waits.count;
for(i = 0; i < required_count; i++) for(i = 0; i < required_count; i++)
...@@ -622,7 +622,7 @@ static void mpi_completed_queue_insert_op(struct completed_requests** mpi_comple ...@@ -622,7 +622,7 @@ static void mpi_completed_queue_insert_op(struct completed_requests** mpi_comple
} }
/* insert MPI send or receive operation in the queues starting from tail. Unmatched sends go to arrival queue and unmatched receives go to pending receives queues. */ /* insert MPI send or receive operation in the queues starting from tail. Unmatched sends go to arrival queue and unmatched receives go to pending receives queues. */
static void mpi_pending_queue_insert_op(struct mpi_queue_ptrs* mpi_queue, mpi_event_list* mpi_op) static void mpi_pending_queue_insert_op(struct mpi_queue_ptrs* mpi_queue, struct codes_workload_op* mpi_op)
{ {
/* insert mpi operation */ /* insert mpi operation */
struct mpi_msgs_queue* elem = malloc(sizeof(struct mpi_msgs_queue)); struct mpi_msgs_queue* elem = malloc(sizeof(struct mpi_msgs_queue));
...@@ -644,10 +644,10 @@ static void mpi_pending_queue_insert_op(struct mpi_queue_ptrs* mpi_queue, mpi_ev ...@@ -644,10 +644,10 @@ static void mpi_pending_queue_insert_op(struct mpi_queue_ptrs* mpi_queue, mpi_ev
} }
/* match the send/recv operations */ /* match the send/recv operations */
static int match_receive(nw_state* s, tw_lp* lp, tw_lpid lpid, mpi_event_list* op1, mpi_event_list* op2) static int match_receive(nw_state* s, tw_lp* lp, tw_lpid lpid, struct codes_workload_op* op1, struct codes_workload_op* op2)
{ {
assert(op1->op_type == CODES_NW_IRECV || op1->op_type == CODES_NW_RECV); assert(op1->op_type == CODES_WK_IRECV || op1->op_type == CODES_WK_RECV);
assert(op2->op_type == CODES_NW_SEND || op2->op_type == CODES_NW_ISEND); assert(op2->op_type == CODES_WK_SEND || op2->op_type == CODES_WK_ISEND);
if((op1->u.recv.num_bytes >= op2->u.send.num_bytes) && if((op1->u.recv.num_bytes >= op2->u.send.num_bytes) &&
((op1->u.recv.tag == op2->u.send.tag) || op1->u.recv.tag == -1) && ((op1->u.recv.tag == op2->u.send.tag) || op1->u.recv.tag == -1) &&
...@@ -661,7 +661,7 @@ static int match_receive(nw_state* s, tw_lp* lp, tw_lpid lpid, mpi_event_list* o ...@@ -661,7 +661,7 @@ static int match_receive(nw_state* s, tw_lp* lp, tw_lpid lpid, mpi_event_list* o
} }
/* used for reverse computation. removes the tail of the queue */ /* used for reverse computation. removes the tail of the queue */
static int mpi_queue_remove_tail(tw_lpid lpid, struct mpi_queue_ptrs* mpi_queue, mpi_event_list* mpi_op) static int mpi_queue_remove_tail(tw_lpid lpid, struct mpi_queue_ptrs* mpi_queue, struct codes_workload_op* mpi_op)
{ {
assert(mpi_queue->queue_tail); assert(mpi_queue->queue_tail);
if(mpi_queue->queue_tail == NULL) if(mpi_queue->queue_tail == NULL)
...@@ -701,7 +701,7 @@ static int mpi_queue_remove_matching_op(nw_state* s, tw_lp* lp, struct mpi_queue ...@@ -701,7 +701,7 @@ static int mpi_queue_remove_matching_op(nw_state* s, tw_lp* lp, struct mpi_queue
if(mpi_queue->queue_head == NULL) if(mpi_queue->queue_head == NULL)
return -1; return -1;
mpi_event_list* mpi_op = &(m->op); struct codes_workload_op* mpi_op = &(m->op);
/* remove mpi operation */ /* remove mpi operation */
struct mpi_msgs_queue* tmp = mpi_queue->queue_head; struct mpi_msgs_queue* tmp = mpi_queue->queue_head;
...@@ -709,22 +709,22 @@ static int mpi_queue_remove_matching_op(nw_state* s, tw_lp* lp, struct mpi_queue ...@@ -709,22 +709,22 @@ static int mpi_queue_remove_matching_op(nw_state* s, tw_lp* lp, struct mpi_queue
/* if head of the list has the required mpi op to be deleted */ /* if head of the list has the required mpi op to be deleted */
int rcv_val = 0; int rcv_val = 0;
if(mpi_op->op_type == CODES_NW_SEND || mpi_op->op_type == CODES_NW_ISEND) if(mpi_op->op_type == CODES_WK_SEND || mpi_op->op_type == CODES_WK_ISEND)
{ {
rcv_val = match_receive(s, lp, lp->gid, tmp->mpi_op, mpi_op); rcv_val = match_receive(s, lp, lp->gid, tmp->mpi_op, mpi_op);
m->saved_matched_req = tmp->mpi_op->u.recv.req_id; m->saved_matched_req = tmp->mpi_op->u.recv.req_id;
} }
else if(mpi_op->op_type == CODES_NW_RECV || mpi_op->op_type == CODES_NW_IRECV) else if(mpi_op->op_type == CODES_WK_RECV || mpi_op->op_type == CODES_WK_IRECV)
{ {
rcv_val = match_receive(s, lp, lp->gid, mpi_op, tmp->mpi_op); rcv_val = match_receive(s, lp, lp->gid, mpi_op, tmp->mpi_op);
m->saved_matched_req = mpi_op->u.recv.req_id; m->saved_matched_req = mpi_op->u.recv.req_id;
} }
if(rcv_val >= 0) if(rcv_val >= 0)
{ {
//if(tmp->mpi_op->op_type == CODES_NW_RECV) //if(tmp->mpi_op->op_type == CODES_WK_RECV)
// *is_blocking = 1; // *is_blocking = 1;
memcpy(&m->ptr_match_op, &tmp->mpi_op, sizeof(struct mpi_event_list)); memcpy(&m->ptr_match_op, &tmp->mpi_op, sizeof(struct codes_workload_op));
if(mpi_queue->queue_head == mpi_queue->queue_tail) if(mpi_queue->queue_head == mpi_queue->queue_tail)
{ {
mpi_queue->queue_tail = NULL; mpi_queue->queue_tail = NULL;
...@@ -748,19 +748,19 @@ static int mpi_queue_remove_matching_op(nw_state* s, tw_lp* lp, struct mpi_queue ...@@ -748,19 +748,19 @@ static int mpi_queue_remove_matching_op(nw_state* s, tw_lp* lp, struct mpi_queue
indx++; indx++;
elem = tmp->next; elem = tmp->next;
if(mpi_op->op_type == CODES_NW_SEND || mpi_op->op_type == CODES_NW_ISEND) if(mpi_op->op_type == CODES_WK_SEND || mpi_op->op_type == CODES_WK_ISEND)
{ {
rcv_val = match_receive(s, lp, lp->gid, elem->mpi_op, mpi_op); rcv_val = match_receive(s, lp, lp->gid, elem->mpi_op, mpi_op);
m->saved_matched_req = elem->mpi_op->u.recv.req_id; m->saved_matched_req = elem->mpi_op->u.recv.req_id;
} }
else if(mpi_op->op_type == CODES_NW_RECV || mpi_op->op_type == CODES_NW_IRECV) else if(mpi_op->op_type == CODES_WK_RECV || mpi_op->op_type == CODES_WK_IRECV)
{ {
rcv_val = match_receive(s, lp, lp->gid, mpi_op, elem->mpi_op); rcv_val = match_receive(s, lp, lp->gid, mpi_op, elem->mpi_op);
m->saved_matched_req = mpi_op->u.recv.req_id; m->saved_matched_req = mpi_op->u.recv.req_id;
} }
if(rcv_val >= 0) if(rcv_val >= 0)
{ {
memcpy(&m->ptr_match_op, &elem->mpi_op, sizeof(struct mpi_event_list)); memcpy(&m->ptr_match_op, &elem->mpi_op, sizeof(struct codes_workload_op));
if(elem == mpi_queue->queue_tail) if(elem == mpi_queue->queue_tail)
mpi_queue->queue_tail = tmp; mpi_queue<