From dca04fef2a06a962c9e46ac94fe1fed32b8298b9 Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Mon, 21 Mar 2022 09:51:42 -0500 Subject: Merge free an MPI communicator #1503 (#1511) --- examples/ph5example.c | 15 ++++++++------- 1 file 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 ] [-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) -- cgit v0.12