Skip to content

Commit

Permalink
Merge free an MPI communicator #1503 (#1511)
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF authored Mar 21, 2022
1 parent 3d9e1f0 commit dca04fe
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions examples/ph5example.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/

Expand Down Expand Up @@ -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);
}

/*
Expand All @@ -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");
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit dca04fe

Please sign in to comment.