X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9a9302e741ebc4b518302371273060cf18793917..b130b354872c90b8103859b2bcaa1f1bcb7f0967:/src/smpi/include/smpi_file.hpp diff --git a/src/smpi/include/smpi_file.hpp b/src/smpi/include/smpi_file.hpp index bd495001b0..3feb57f696 100644 --- a/src/smpi/include/smpi_file.hpp +++ b/src/smpi/include/smpi_file.hpp @@ -10,6 +10,7 @@ #include "smpi_comm.hpp" #include "smpi_coll.hpp" #include "smpi_datatype.hpp" +#include "smpi_errhandler.hpp" #include "smpi_info.hpp" #include @@ -26,8 +27,10 @@ class File{ s4u::MutexPtr shared_mutex_; MPI_Win win_; char* list_; + MPI_Errhandler errhandler_; + 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(); @@ -35,6 +38,7 @@ class File{ int get_position(MPI_Offset* offset); int get_position_shared(MPI_Offset* offset); int flags(); + MPI_Comm comm(); int sync(); int seek(MPI_Offset offset, int whence); int seek_shared(MPI_Offset offset, int whence); @@ -44,11 +48,13 @@ 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); + MPI_Errhandler errhandler(); + void set_errhandler( MPI_Errhandler errhandler); }; /* Read_all, Write_all : loosely based on */ @@ -159,7 +165,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);