Skip to content
Snippets Groups Projects
Commit 66aca9b4 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Correct pick_logs prototype and call

parent e209be90
No related branches found
No related tags found
No related merge requests found
...@@ -48,11 +48,8 @@ static void *inject_thread(void *arg) { ...@@ -48,11 +48,8 @@ static void *inject_thread(void *arg) {
while (ind_req < nr_reqs) { while (ind_req < nr_reqs) {
struct mpiuse_log_entry *log = reqs_queue[ind_req]; struct mpiuse_log_entry *log = reqs_queue[ind_req];
// Differences here, MPI_COMM_WORLD, which will break as tags will not // Differences to SWIFT: MPI_BYTE might overflow, should use MPI_Type(?)
// be unique, MPI_BYTE might overflow, should use MPI_Type(?). // injections not timed.
// Need to use the tic information to time our injections.
int err = 0; int err = 0;
if (log->type == task_type_send) { if (log->type == task_type_send) {
err = MPI_Isend(log->data, log->size, MPI_BYTE, log->otherrank, err = MPI_Isend(log->data, log->size, MPI_BYTE, log->otherrank,
...@@ -161,7 +158,7 @@ static int cmp_logs(const void *p1, const void *p2) { ...@@ -161,7 +158,7 @@ static int cmp_logs(const void *p1, const void *p2) {
/* Pick out the relevant logging data for our rank, i.e. all activations of /* Pick out the relevant logging data for our rank, i.e. all activations of
* sends and recvs. */ * sends and recvs. */
static void pick_logs() { static void pick_logs(void) {
size_t nlogs = mpiuse_nr_logs(); size_t nlogs = mpiuse_nr_logs();
int nranks = mpiuse_nr_ranks(); int nranks = mpiuse_nr_ranks();
...@@ -203,7 +200,7 @@ int main(int argc, char *argv[]) { ...@@ -203,7 +200,7 @@ int main(int argc, char *argv[]) {
/* First we read the SWIFT MPI logger output that defines the communcations /* First we read the SWIFT MPI logger output that defines the communcations
* we will undertake and the time differences between injections into the * we will undertake and the time differences between injections into the
* queues. */ * queues. */
mpiuse_log_restore("testdata/mpiuse_report-step2.dat"); mpiuse_log_restore("testdata/mpiuse_report-step1.dat");
int nranks = mpiuse_nr_ranks(); int nranks = mpiuse_nr_ranks();
/* Initiate MPI. */ /* Initiate MPI. */
...@@ -233,7 +230,7 @@ int main(int argc, char *argv[]) { ...@@ -233,7 +230,7 @@ int main(int argc, char *argv[]) {
message("Starts"); message("Starts");
/* Each rank requires its own queue, so extract them. */ /* Each rank requires its own queue, so extract them. */
pick_logs(myrank); pick_logs();
/* Make three threads, one for injecting tasks and two to check for /* Make three threads, one for injecting tasks and two to check for
* completions of the sends and recv independently. */ * completions of the sends and recv independently. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment