Skip to content

Commit

Permalink
adding _c to write_at functions
Browse files Browse the repository at this point in the history
  • Loading branch information
pengfej committed May 26, 2022
1 parent 85f986e commit a3d729f
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions source/base/data_out_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7719,14 +7719,13 @@ DataOutInterface<dim, spacedim>::write_vtu_in_parallel(
DataOutBase::write_vtu_header(ss, vtk_flags);
header_size = ss.str().size();
// Write the header on rank 0 at the starting of a file, i.e., offset 0.
ierr = MPI_File_write_at(
ierr = Utilities::MPI::LargeCount::MPI_File_write_at_c(
fh, 0, ss.str().c_str(), header_size, MPI_CHAR, MPI_STATUS_IGNORE);
AssertThrowMPI(ierr);

header_size = Utilities::MPI::broadcast(comm, header_size, 0);
}


ierr = MPI_Bcast(&header_size, 1, MPI_UNSIGNED, 0, comm);
AssertThrowMPI(ierr);

{
const auto &patches = get_patches();
Expand Down Expand Up @@ -7792,12 +7791,12 @@ DataOutInterface<dim, spacedim>::write_vtu_in_parallel(
AssertThrowMPI(ierr);

// Writing Footer.
ierr = MPI_File_write_at(fh,
footer_offset,
ss.str().c_str(),
footer_size,
MPI_CHAR,
MPI_STATUS_IGNORE);
ierr = Utilities::MPI::LargeCount::MPI_File_write_at_c(fh,
footer_offset,
ss.str().c_str(),
footer_size,
MPI_CHAR,
MPI_STATUS_IGNORE);
AssertThrowMPI(ierr);
}
ierr = MPI_File_close(&fh);
Expand Down

0 comments on commit a3d729f

Please sign in to comment.