X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/49609678d7329f0824ca7d5c6d5421fc9d358cbb..b88656d61473b580ea70c4b83bcadca3caa09072:/src/smpi/mpi/smpi_file.cpp diff --git a/src/smpi/mpi/smpi_file.cpp b/src/smpi/mpi/smpi_file.cpp index c743cf9b89..7f1d69bf29 100644 --- a/src/smpi/mpi/smpi_file.cpp +++ b/src/smpi/mpi/smpi_file.cpp @@ -41,6 +41,7 @@ namespace smpi{ else mount = disk->extension()->get_mount_point(); XBT_DEBUG("No absolute path given for file opening, use '%s'", mount.c_str()); + mount.append("/"); fullname.insert(0, mount); } @@ -143,7 +144,8 @@ namespace smpi{ fh->file_->seek(position+movesize, SEEK_SET); } XBT_VERB("Position after read in MPI_File %s : %llu",fh->file_->get_path(), fh->file_->tell()); - status->count=count*datatype->size(); + if(status != MPI_STATUS_IGNORE) + status->count=count*datatype->size(); return MPI_SUCCESS; } @@ -202,7 +204,8 @@ namespace smpi{ fh->file_->seek(position+movesize, SEEK_SET); } XBT_VERB("Position after write in MPI_File %s : %llu",fh->file_->get_path(), fh->file_->tell()); - status->count=count*datatype->size(); + if(status != MPI_STATUS_IGNORE) + status->count=count*datatype->size(); return MPI_SUCCESS; } @@ -237,6 +240,23 @@ namespace smpi{ return ret; } + int File::set_view(MPI_Offset /*disp*/, MPI_Datatype etype, MPI_Datatype filetype, const char* datarep, MPI_Info) + { + etype_=etype; + filetype_=filetype; + datarep_=std::string(datarep); + seek_shared(0,MPI_SEEK_SET); + return MPI_SUCCESS; + } + + int File::get_view(MPI_Offset* /*disp*/, MPI_Datatype* etype, MPI_Datatype* filetype, char* datarep) + { + *etype=etype_; + *filetype=filetype_; + snprintf(datarep, MPI_MAX_NAME_STRING+1, "%s", datarep_.c_str()); + return MPI_SUCCESS; + } + int File::size(){ return file_->size(); }