Skip to content

Commit

Permalink
fixing const problem for older MPI
Browse files Browse the repository at this point in the history
  • Loading branch information
patflick committed Sep 10, 2018
1 parent 291113b commit 704f251
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/mxx/file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ std::string file_block_decompose(const char* filename, MPI_Comm comm = MPI_COMM_
template <typename T>
void write_ordered(const std::string& filename, const T* buf, size_t count, const mxx::comm& comm) {
MPI_File handle;
MPI_File_open(comm, &filename[0], MPI_MODE_CREATE | MPI_MODE_WRONLY, MPI_INFO_NULL, &handle);
MPI_File_open(comm, const_cast<char*>(&filename[0]), MPI_MODE_CREATE | MPI_MODE_WRONLY, MPI_INFO_NULL, &handle);
mxx::datatype dt = mxx::get_datatype<T>();
MPI_File_write_ordered(handle, const_cast<T*>(buf), count, dt.type(), MPI_STATUS_IGNORE);
MPI_File_close(&handle);
Expand Down

0 comments on commit 704f251

Please sign in to comment.