Skip to content

Commit

Permalink
Check return values from HDF5 API calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoklee committed Sep 20, 2023
1 parent 95907ba commit 3deef67
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions testpar/t_init_term.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ main(int argc, char **argv)

MPI_Finalize();

nerrors += GetTestNumErrs();

/* test if we can initialize the library with MPI being finalized
and create a file serially */
H5open();
if (H5open() < 0) {
nerrors = nerrors + 1;
}

if (mpi_rank == 0) {
char filename[1024];
Expand All @@ -54,7 +54,9 @@ main(int argc, char **argv)
file_id = -1;
}

H5close();
if (H5close() < 0) {
nerrors = nerrors + 1;
}

if (MAINPROCESS) {
if (0 == nerrors)
Expand Down

0 comments on commit 3deef67

Please sign in to comment.