X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e3fd4ced0204c7d9334a68482e1b9730c8293a35..8fe7143ac15490fc64aaf5f88c08bcf489a1e9f1:/src/smpi/include/smpi_file.hpp diff --git a/src/smpi/include/smpi_file.hpp b/src/smpi/include/smpi_file.hpp index cf97e82abe..97ef812ab9 100644 --- a/src/smpi/include/smpi_file.hpp +++ b/src/smpi/include/smpi_file.hpp @@ -27,7 +27,7 @@ class File{ MPI_Win win_; char* list_; public: - File(MPI_Comm comm, char *filename, int amode, MPI_Info info); + File(MPI_Comm comm, const char *filename, int amode, MPI_Info info); File(const File&) = delete; File& operator=(const File&) = delete; ~File(); @@ -45,11 +45,11 @@ class File{ static int read_shared(MPI_File fh, void *buf, int count,MPI_Datatype datatype, MPI_Status *status); static int read_ordered(MPI_File fh, void *buf, int count,MPI_Datatype datatype, MPI_Status *status); static int write(MPI_File fh, void *buf, int count,MPI_Datatype datatype, MPI_Status *status); - static int write_shared(MPI_File fh, void *buf, int count,MPI_Datatype datatype, MPI_Status *status); - static int write_ordered(MPI_File fh, void *buf, int count,MPI_Datatype datatype, MPI_Status *status); + static int write_shared(MPI_File fh, const void *buf, int count,MPI_Datatype datatype, MPI_Status *status); + static int write_ordered(MPI_File fh, const void *buf, int count,MPI_Datatype datatype, MPI_Status *status); template int op_all(void *buf, int count,MPI_Datatype datatype, MPI_Status *status); static int close(MPI_File *fh); - static int del(char *filename, MPI_Info info); + static int del(const char *filename, MPI_Info info); }; /* Read_all, Write_all : loosely based on */ @@ -160,7 +160,7 @@ class File{ } XBT_CDEBUG(smpi_pmpi, "will have to access %lld from my chunk", totreads); - char* sendbuf= static_cast(smpi_get_tmp_sendbuffer(total_sent)); + unsigned char* sendbuf = smpi_get_tmp_sendbuffer(total_sent); if(totreads>0){ seek(min_offset, MPI_SEEK_SET);