summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2024-02-13 15:06:33 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2024-02-14 22:11:04 (GMT)
commit1ac9bd3afb9a3f19d1193d2eb97ebd06f462ffe3 (patch)
treec7365ba70a8cd66c0d2a6be4b371eb1e25af1a2c
parentca789406691d76d8c796ea05304a16a4aca4fa6f (diff)
downloadhdf5-1ac9bd3afb9a3f19d1193d2eb97ebd06f462ffe3.zip
hdf5-1ac9bd3afb9a3f19d1193d2eb97ebd06f462ffe3.tar.gz
hdf5-1ac9bd3afb9a3f19d1193d2eb97ebd06f462ffe3.tar.bz2
Fix some output issues with ph5diff (#4008)
-rw-r--r--tools/lib/h5diff.c11
-rw-r--r--tools/src/h5diff/ph5diff_main.c3
2 files changed, 8 insertions, 6 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c
index 15f2a14..bdbda6e 100644
--- a/tools/lib/h5diff.c
+++ b/tools/lib/h5diff.c
@@ -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);
}
@@ -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 */
@@ -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 */
@@ -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 */
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c
index f90bd48..98e0c1d 100644
--- a/tools/src/h5diff/ph5diff_main.c
+++ b/tools/src/h5diff/ph5diff_main.c
@@ -85,8 +85,9 @@ main(int argc, char *argv[])
MPI_Barrier(MPI_COMM_WORLD);
- print_info(&opts);
print_manager_output();
+
+ print_info(&opts);
}
/* All other tasks become workers and wait for assignments. */
else {