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) {
while (ind_req < nr_reqs) {
struct mpiuse_log_entry *log = reqs_queue[ind_req];
// Differences here, MPI_COMM_WORLD, which will break as tags will not
// be unique, MPI_BYTE might overflow, should use MPI_Type(?).
// Need to use the tic information to time our injections.
// Differences to SWIFT: MPI_BYTE might overflow, should use MPI_Type(?)
// injections not timed.
int err = 0;
if (log->type == task_type_send) {
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) {
/* Pick out the relevant logging data for our rank, i.e. all activations of
* sends and recvs. */
static void pick_logs() {
static void pick_logs(void) {
size_t nlogs = mpiuse_nr_logs();
int nranks = mpiuse_nr_ranks();
......@@ -203,7 +200,7 @@ int main(int argc, char *argv[]) {
/* First we read the SWIFT MPI logger output that defines the communcations
* we will undertake and the time differences between injections into the
* queues. */
mpiuse_log_restore("testdata/mpiuse_report-step2.dat");
mpiuse_log_restore("testdata/mpiuse_report-step1.dat");
int nranks = mpiuse_nr_ranks();
/* Initiate MPI. */
......@@ -233,7 +230,7 @@ int main(int argc, char *argv[]) {
message("Starts");
/* 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
* 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