Skip to content

Commit

Permalink
fix const char error in File_open/File_delete
Browse files Browse the repository at this point in the history
  • Loading branch information
patflick committed Dec 26, 2018
1 parent f46f7af commit 56df6f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/mxx/file.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ struct file {

void open(const std::string& filename, int mode) {
this->filename = filename;
MPI_File_open(MPI_COMM_SELF, filename.c_str(), mode, MPI_INFO_NULL, &handle);
MPI_File_open(MPI_COMM_SELF, &filename[0], mode, MPI_INFO_NULL, &handle);
this->isopen = true;
}

Expand All @@ -122,7 +122,7 @@ struct file {
}

static void delete_file(const std::string& filename) {
MPI_File_delete(filename.c_str(), MPI_INFO_NULL);
MPI_File_delete(&filename[0], MPI_INFO_NULL);
}


Expand Down

0 comments on commit 56df6f6

Please sign in to comment.