Commit c4150297 authored by Dmitriy Morozov's avatar Dmitriy Morozov

Pull utils/diy/io/bov.hpp from upstream DIY

parent c1ea0dc2
Pipeline #12782 skipped
...@@ -99,7 +99,7 @@ read(const DiscreteBounds& bounds, T* buffer, bool collective, int chunk) const ...@@ -99,7 +99,7 @@ read(const DiscreteBounds& bounds, T* buffer, bool collective, int chunk) const
MPI_Type_create_subarray(dim, (int*) &shape_[0], &subsizes[0], (int*) &bounds.min[0], MPI_ORDER_C, T_type, &fileblk); MPI_Type_create_subarray(dim, (int*) &shape_[0], &subsizes[0], (int*) &bounds.min[0], MPI_ORDER_C, T_type, &fileblk);
MPI_Type_commit(&fileblk); MPI_Type_commit(&fileblk);
MPI_File_set_view(f_.handle(), offset_, T_type, fileblk, "native", MPI_INFO_NULL); MPI_File_set_view(f_.handle(), offset_, T_type, fileblk, (char*)"native", MPI_INFO_NULL);
mpi::status s; mpi::status s;
if (!collective) if (!collective)
...@@ -154,13 +154,13 @@ write(const DiscreteBounds& bounds, const T* buffer, const DiscreteBounds& core, ...@@ -154,13 +154,13 @@ write(const DiscreteBounds& bounds, const T* buffer, const DiscreteBounds& core,
MPI_Type_commit(&fileblk); MPI_Type_commit(&fileblk);
MPI_Type_commit(&subbuffer); MPI_Type_commit(&subbuffer);
MPI_File_set_view(f_.handle(), offset_, T_type, fileblk, "native", MPI_INFO_NULL); MPI_File_set_view(f_.handle(), offset_, T_type, fileblk, (char*)"native", MPI_INFO_NULL);
mpi::status s; mpi::status s;
if (!collective) if (!collective)
MPI_File_write(f_.handle(), buffer, 1, subbuffer, &s.s); MPI_File_write(f_.handle(), (void*)buffer, 1, subbuffer, &s.s);
else else
MPI_File_write_all(f_.handle(), buffer, 1, subbuffer, &s.s); MPI_File_write_all(f_.handle(), (void*)buffer, 1, subbuffer, &s.s);
if (chunk != 1) if (chunk != 1)
MPI_Type_free(&T_type); MPI_Type_free(&T_type);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment