3 int MC_request_depend(smx_req_t r1, smx_req_t r2)
5 if (r1->issuer == r2->issuer)
8 if (r1->call != r2->call)
11 if (r1->call == REQ_COMM_ISEND && r2->call == REQ_COMM_ISEND
12 && r1->comm_isend.rdv != r2->comm_isend.rdv)
15 if (r1->call == REQ_COMM_IRECV && r2->call == REQ_COMM_IRECV
16 && r1->comm_irecv.rdv != r2->comm_irecv.rdv)
19 if (r1->call == REQ_COMM_WAIT && r2->call == REQ_COMM_WAIT
20 && r1->comm_wait.comm == r2->comm_wait.comm)
23 if (r1->call == REQ_COMM_WAIT && r2->call == REQ_COMM_WAIT
24 && r1->comm_wait.comm->comm.src_buff != NULL
25 && r1->comm_wait.comm->comm.dst_buff != NULL
26 && r2->comm_wait.comm->comm.src_buff != NULL
27 && r2->comm_wait.comm->comm.dst_buff != NULL
28 && r1->comm_wait.comm->comm.dst_buff != r2->comm_wait.comm->comm.src_buff
29 && r1->comm_wait.comm->comm.dst_buff != r2->comm_wait.comm->comm.dst_buff
30 && r2->comm_wait.comm->comm.dst_buff != r1->comm_wait.comm->comm.src_buff)
36 char *MC_request_to_string(smx_req_t req)
38 char *type = NULL, *args = NULL, *str = NULL;
39 smx_action_t act = NULL;
44 type = bprintf("iSend");
45 args = bprintf("src=%s, buff=%p, size=%zu", req->issuer->name,
46 req->comm_isend.src_buff, req->comm_isend.src_buff_size);
49 size = req->comm_irecv.dst_buff_size ? *req->comm_irecv.dst_buff_size : 0;
50 type = bprintf("iRecv");
51 args = bprintf("dst=%s, buff=%p, size=%zu", req->issuer->name,
52 req->comm_irecv.dst_buff, size);
55 act = req->comm_wait.comm;
56 type = bprintf("Wait");
57 args = bprintf("%p [%s -> %s]", act,
58 act->comm.src_proc ? act->comm.src_proc->name : "",
59 act->comm.dst_proc ? act->comm.dst_proc->name : "");
62 act = req->comm_test.comm;
63 type = bprintf("Test");
64 args = bprintf("%p [%s -> %s]", act,
65 act->comm.src_proc ? act->comm.src_proc->name : "",
66 act->comm.dst_proc ? act->comm.dst_proc->name : "");
71 str = bprintf("[%s] %s (%s)", req->issuer->name, type, args);