summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-03-24 00:26:43 (GMT)
committerGitHub <noreply@github.com>2022-03-24 00:26:43 (GMT)
commitc3f26408a9e0191b8095ea76611cb8d279f945b7 (patch)
tree54bd913a22096f0ceceee4b42953f3d4261fef06
parent65a13a3b73dd403acb0ba15a0666579b906a6fee (diff)
downloadhdf5-c3f26408a9e0191b8095ea76611cb8d279f945b7.zip
hdf5-c3f26408a9e0191b8095ea76611cb8d279f945b7.tar.gz
hdf5-c3f26408a9e0191b8095ea76611cb8d279f945b7.tar.bz2
Merge free an MPI communicator #1503 (#1512)
-rw-r--r--examples/ph5example.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/examples/ph5example.c b/examples/ph5example.c
index a5f3c75..f16b055 100644
--- a/examples/ph5example.c
+++ b/examples/ph5example.c
@@ -30,7 +30,7 @@
* for parallel I/O and there is no standard pathname for parallel file
* systems. In some cases, the parallel file name may even needs some
* parallel file type prefix such as: "pfs:/GF/...". Therefore, this
- * example requires an explicite parallel file prefix. See the usage
+ * example requires an explicit parallel file prefix. See the usage
* for more detail.
*/
@@ -888,6 +888,7 @@ test_split_comm_access(char filenames[][PATH_MAX])
mrc = MPI_File_delete(filenames[color], info);
assert(mrc == MPI_SUCCESS);
}
+ MPI_Comm_free(&comm);
}
/*
@@ -898,7 +899,7 @@ usage(void)
{
printf("Usage: testphdf5 [-f <prefix>] [-r] [-w] [-v]\n");
printf("\t-f\tfile prefix for parallel test files.\n");
- printf("\t \te.g. pfs:/PFS/myname\n");
+ printf("\t \t e.g. pfs:/PFS/myname\n");
printf("\t \tcan be set via $" PARAPREFIX ".\n");
printf("\t \tDefault is current directory.\n");
printf("\t-c\tno cleanup\n");
@@ -934,7 +935,7 @@ mkfilenames(char *prefix)
"Need to adjust the code to accommodate the large size.\n");
}
for (i = 0; i < n; i++) {
- sprintf(testfiles[i], "%s/ParaEg%d.h5", prefix, i);
+ snprintf(testfiles[i], PATH_MAX, "%s/ParaEg%d.h5", prefix, i);
}
return (0);
}
@@ -1073,11 +1074,11 @@ main(int argc, char **argv)
finish:
if (mpi_rank == 0) { /* only process 0 reports */
if (nerrors)
- printf("***PHDF5 tests detected %d errors***\n", nerrors);
+ printf("***PHDF5 example detected %d errors***\n", nerrors);
else {
- printf("===================================\n");
- printf("PHDF5 tests finished with no errors\n");
- printf("===================================\n");
+ printf("=====================================\n");
+ printf("PHDF5 example finished with no errors\n");
+ printf("=====================================\n");
}
}
if (docleanup)