From: Timo Heister Date: Tue, 31 May 2022 20:19:24 +0000 (-0400) Subject: fix parallel .vtu missing footer X-Git-Tag: v9.4.0-rc1~94^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56a82ec469303bf1f32f920a55e5554ff8c65821;p=dealii.git fix parallel .vtu missing footer --- diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index bfa770c2eb..a7bbb7d98c 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -7786,6 +7786,11 @@ DataOutInterface::write_vtu_in_parallel( } } + // Make sure we sync to disk. This ensures that the change in file + // size caused by the write_at() for the footer is visible for all + // ranks. Otherwise, the footer is sometimes lost. + ierr = MPI_File_sync(fh); + AssertThrowMPI(ierr); ierr = MPI_File_close(&fh); AssertThrowMPI(ierr);