summaryrefslogtreecommitdiffstats
path: root/testpar/t_init_term.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-10-01 14:04:36 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-10-01 14:04:36 (GMT)
commitf1ba03cea5b82699a984c80bd2deac14fdc8df18 (patch)
treeebe777c3e0b83f4c4cec9212731da9ebe0a0cfd3 /testpar/t_init_term.c
parent10343c197906415388f2a4c8d292e21d25cf7381 (diff)
downloadhdf5-f1ba03cea5b82699a984c80bd2deac14fdc8df18.zip
hdf5-f1ba03cea5b82699a984c80bd2deac14fdc8df18.tar.gz
hdf5-f1ba03cea5b82699a984c80bd2deac14fdc8df18.tar.bz2
Source formatted
Diffstat (limited to 'testpar/t_init_term.c')
-rw-r--r--testpar/t_init_term.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/testpar/t_init_term.c b/testpar/t_init_term.c
index 0e40fe4..e2157ba 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);
- 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);
}