Skip to content

Commit

Permalink
save_ext: Initialize file in all cases
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-griesbach committed Mar 28, 2024
1 parent ea50aee commit 94478cc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/p4est.c
Original file line number Diff line number Diff line change
Expand Up @@ -3589,6 +3589,9 @@ p4est_save_ext (const char *filename, p4est_t * p4est,
file = fopen (filename, "rb+");
SC_CHECK_ABORT (file != NULL, "file open");
}
else {
file = NULL;
}
#else
/* Every core opens the file in append mode -- file must exist */
mpiret = sc_MPI_Barrier (p4est->mpicomm);
Expand Down

0 comments on commit 94478cc

Please sign in to comment.