diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-10-01 16:47:45 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-10-01 16:47:45 (GMT) |
commit | 1ba1f2f3222cbe8df0bf601929a4bffd478d7e02 (patch) | |
tree | ae51dfc33cf40432dad25a5088767115a98f195e /testpar/t_init_term.c | |
parent | 8eef7d295cc3dd134aef0a826f1de4287629996d (diff) | |
download | hdf5-1ba1f2f3222cbe8df0bf601929a4bffd478d7e02.zip hdf5-1ba1f2f3222cbe8df0bf601929a4bffd478d7e02.tar.gz hdf5-1ba1f2f3222cbe8df0bf601929a4bffd478d7e02.tar.bz2 |
Source formatted
Diffstat (limited to 'testpar/t_init_term.c')
-rw-r--r-- | testpar/t_init_term.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/testpar/t_init_term.c b/testpar/t_init_term.c index 933fbd2..8492af9 100644 --- a/testpar/t_init_term.c +++ b/testpar/t_init_term.c @@ -21,26 +21,23 @@ #include "testphdf5.h" -int nerrors = 0; /* errors count */ +int nerrors = 0; /* errors count */ -const char *FILENAME[] = { - "after_mpi_fin", - NULL -}; +const char *FILENAME[] = {"after_mpi_fin", NULL}; int -main (int argc, char **argv) +main(int argc, char **argv) { - int mpi_size, mpi_rank; - MPI_Comm comm = MPI_COMM_WORLD; + int mpi_size, mpi_rank; + MPI_Comm comm = MPI_COMM_WORLD; /* Initialize and finalize MPI */ MPI_Init(&argc, &argv); MPI_Comm_size(comm, &mpi_size); - MPI_Comm_rank(comm, &mpi_rank); + MPI_Comm_rank(comm, &mpi_rank); - if(MAINPROCESS) - TESTING("Usage of Serial HDF5 after MPI_Finalize() is called"); + if (MAINPROCESS) + TESTING("Usage of Serial HDF5 after MPI_Finalize() is called"); MPI_Finalize(); @@ -50,9 +47,9 @@ main (int argc, char **argv) and create a file serially */ H5open(); - if(mpi_rank == 0) { - char filename[1024]; - hid_t file_id; + if (mpi_rank == 0) { + char filename[1024]; + hid_t file_id; h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof filename); file_id = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -63,12 +60,12 @@ main (int argc, char **argv) H5close(); - if(MAINPROCESS) { - if(0 == nerrors) + if (MAINPROCESS) { + if (0 == nerrors) PASSED() else - H5_FAILED() + H5_FAILED() } - return (nerrors!=0); + return (nerrors != 0); } |