summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-03-22 13:50:05 (GMT)
committerGitHub <noreply@github.com>2022-03-22 13:50:05 (GMT)
commit772d2e498e085d57a7fb5368ebaaa51363823ba1 (patch)
tree7cf0939f3ff226a204f12a2a85ced2f70f89495d /examples
parent2ad70782bea62091e25d64c39405b15d3dddef21 (diff)
downloadhdf5-772d2e498e085d57a7fb5368ebaaa51363823ba1.zip
hdf5-772d2e498e085d57a7fb5368ebaaa51363823ba1.tar.gz
hdf5-772d2e498e085d57a7fb5368ebaaa51363823ba1.tar.bz2
Merge free an MPI communicator #1503 (#1510)
Diffstat (limited to 'examples')
-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)