Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some output issues with ph5diff #4008

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions tools/lib/h5diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ print_incoming_data(void)
MPI_Recv(data, PRINT_DATA_MAX_SIZE, MPI_CHAR, Status.MPI_SOURCE, MPI_TAG_PRINT_DATA,
MPI_COMM_WORLD, &Status);

printf("%s", data);
parallel_print("%s", data);
}
} while (incomingMessage);
}
Expand Down Expand Up @@ -1247,7 +1247,8 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,

/*Set up args to pass to worker task. */
if (strlen(obj1_fullpath) > 255 || strlen(obj2_fullpath) > 255) {
printf("The parallel diff only supports object names up to 255 characters\n");
fprintf(stderr,
"The parallel diff only supports object names up to 255 characters\n");
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end if */

Expand Down Expand Up @@ -1392,7 +1393,7 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
MPI_COMM_WORLD);
} /* end else-if */
else {
printf("ERROR: Invalid tag (%d) received \n", Status.MPI_TAG);
fprintf(stderr, "ERROR: Invalid tag (%d) received \n", Status.MPI_TAG);
MPI_Abort(MPI_COMM_WORLD, 0);
MPI_Finalize();
} /* end else */
Expand Down Expand Up @@ -1477,10 +1478,10 @@ diff_match(hid_t file1_id, const char *grp1, trav_info_t *info1, hid_t file2_id,
MPI_Recv(data, PRINT_DATA_MAX_SIZE, MPI_CHAR, Status.MPI_SOURCE, MPI_TAG_PRINT_DATA,
MPI_COMM_WORLD, &Status);

printf("%s", data);
parallel_print("%s", data);
} /* end else-if */
else {
printf("ph5diff-manager: ERROR!! Invalid tag (%d) received \n", Status.MPI_TAG);
fprintf(stderr, "ph5diff-manager: ERROR!! Invalid tag (%d) received \n", Status.MPI_TAG);
MPI_Abort(MPI_COMM_WORLD, 0);
} /* end else */
} /* end while */
Expand Down
3 changes: 2 additions & 1 deletion tools/src/h5diff/ph5diff_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ main(int argc, char *argv[])

MPI_Barrier(MPI_COMM_WORLD);

print_info(&opts);
print_manager_output();

print_info(&opts);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the lines printed by print_info come at the bottom of output, similar to serial h5diff

}
/* All other tasks become workers and wait for assignments. */
else {
Expand Down
Loading