Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

Commit

Permalink
removed compile warnings
Browse files Browse the repository at this point in the history
added comments for ROSS hack: sometimes event->dest_lp is a tw_lpid
(and not always an tw_lp pointer).
  • Loading branch information
gonsie committed Jun 29, 2016
1 parent 9f6ee39 commit dbca8da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion io-mpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ void io_load_events(tw_pe * me) {
me->cur_event->caused_by_me = NULL;

tw_event *e = tw_eventq_pop(&g_io_buffered_events);
tw_event *n = tw_event_new(e->dest_lp, e->recv_ts, e->src_lp);
// e->dest_lp will be a GID after being loaded from checkpoint
tw_event *n = tw_event_new((tw_lpid)e->dest_lp, e->recv_ts, e->src_lp);
void *emsg = tw_event_data(e);
void *nmsg = tw_event_data(n);
memcpy(&(n->cv), &(e->cv), sizeof(tw_bf));
Expand Down
4 changes: 2 additions & 2 deletions io-serialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ size_t io_event_serialize (tw_event *e, void *buffer) {
io_event_store tmp;

memcpy(&(tmp.cv), &(e->cv), sizeof(tw_bf));
tmp.dest_lp = e->dest_lp; // dest_lp is gid
tmp.dest_lp = (tw_lpid)e->dest_lp; // ROSS HACK: dest_lp is gid
tmp.src_lp = e->src_lp->gid;
tmp.recv_ts = e->recv_ts - g_tw_ts_end;

Expand All @@ -69,7 +69,7 @@ size_t io_event_deserialize (tw_event *e, void *buffer) {
memcpy(&tmp, buffer, sizeof(io_event_store));

memcpy(&(e->cv), &(tmp.cv), sizeof(tw_bf));
e->dest_lp = tmp.dest_lp;
e->dest_lp = (tw_lp *) tmp.dest_lp; // ROSS HACK: e->dest_lp is GID for a bit
//undo pointer to GID conversion
if (g_tw_mapping == LINEAR) {
e->src_lp = g_tw_lp[((tw_lpid)tmp.src_lp) - g_tw_lp_offset];
Expand Down

0 comments on commit dbca8da

Please sign in to comment.