Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use what was previously added, and fix broken tests
[simgrid.git] / src / smpi / mpi / smpi_file.cpp
index 56b0edc..79d8bcb 100644 (file)
@@ -171,7 +171,7 @@ namespace smpi{
     MPI_Offset movesize = datatype->get_extent()*count;
     MPI_Offset writesize = datatype->size()*count;
     XBT_DEBUG("Position before write in MPI_File %s : %llu",fh->file_->get_path(),fh->file_->tell());
-    MPI_Offset write = fh->file_->write(writesize);
+    MPI_Offset write = fh->file_->write(writesize, 1);
     XBT_VERB("Write in MPI_File %s, %lld bytes written, readsize %lld bytes, movesize %lld", fh->file_->get_path(), write, writesize, movesize);
     if(writesize!=movesize){
       fh->file_->seek(position+movesize, SEEK_SET);
@@ -225,18 +225,21 @@ namespace smpi{
     return simgrid::smpi::Colls::barrier(comm_);
   }
 
-MPI_Info File::info(){
-  if(info_== MPI_INFO_NULL)
-    info_ = new Info();
-  info_->ref();
-  return info_;
-}
+  MPI_Info File::info(){
+    if(info_== MPI_INFO_NULL)
+      info_ = new Info();
+    info_->ref();
+    return info_;
+  }
 
-void File::set_info(MPI_Info info){
-  if(info_!= MPI_INFO_NULL)
-    info->ref();
-  info_=info;
-}
+  void File::set_info(MPI_Info info){
+    if(info_!= MPI_INFO_NULL)
+      info->ref();
+    info_=info;
+  }
 
+  MPI_Comm File::comm(){
+    return comm_;
+  }
 }
 }