diff --git a/mpiuse.c b/mpiuse.c index 8f620625d5b6ce9c0485bb90779d5dd8f5c69ea8..25a7070e8ab32c43c03774832cb254c0f551ad73 100644 --- a/mpiuse.c +++ b/mpiuse.c @@ -442,11 +442,11 @@ void mpiuse_log_generate(int nr_nodes, int nr_logs, int size, int random, */ void mpiuse_shuffle_logs(struct mpiuse_log_entry **logs, int nlogs) { - struct mpiuse_log_entry tmp; + struct mpiuse_log_entry *tmp; for (int k = nlogs - 1; k > 0; k--) { unsigned int j = (unsigned int)(drand48() * (k + 1)); - memcpy(&tmp, &logs[j], sizeof(struct mpiuse_log_entry *)); - memcpy(&logs[j], &logs[k], sizeof(struct mpiuse_log_entry *)); - memcpy(&logs[k], &tmp, sizeof(struct mpiuse_log_entry *)); + tmp = logs[j]; + logs[j] = logs[k]; + logs[k] = tmp; } } diff --git a/swiftmpifakestepsim.c b/swiftmpifakestepsim.c index e73ab832dd73c87342c7d99b260d7b204a4417ce..efc67a422da9ed061b4a7d7a68792f9a2c7a13d8 100644 --- a/swiftmpifakestepsim.c +++ b/swiftmpifakestepsim.c @@ -51,11 +51,9 @@ static int volatile nr_reqs = 0; static int volatile injecting = 1; static struct mpiuse_log_entry **volatile recvs_queue; static int volatile nr_recvs = 0; -static int volatile ind_recv = 0; static int volatile todo_recv = 0; static struct mpiuse_log_entry **volatile sends_queue; static int volatile nr_sends = 0; -static int volatile ind_send = 0; static int volatile todo_send = 0; /** diff --git a/swiftmpistepsim.c b/swiftmpistepsim.c index 045372e94879296d48aaf6a40d65e780b1e79888..f42210131ab0ac6b5ebcd84a9d5cb458b977a724 100644 --- a/swiftmpistepsim.c +++ b/swiftmpistepsim.c @@ -63,11 +63,9 @@ static int volatile nr_reqs = 0; static int volatile injecting = 1; static struct mpiuse_log_entry **volatile recvs_queue; static int volatile nr_recvs = 0; -static int volatile ind_recv = 0; static int volatile todo_recv = 0; static struct mpiuse_log_entry **volatile sends_queue; static int volatile nr_sends = 0; -static int volatile ind_send = 0; static int volatile todo_send = 0; /* CPU frequency of the machine that created the MPI log. */