Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Unused parameters.
[simgrid.git] / src / smpi / mpi / smpi_file.cpp
index 966a5fc..7f1d69b 100644 (file)
@@ -41,6 +41,7 @@ namespace smpi{
       else
         mount = disk->extension<simgrid::s4u::FileSystemDiskExt>()->get_mount_point();
       XBT_DEBUG("No absolute path given for file opening, use '%s'", mount.c_str());
+      mount.append("/");
       fullname.insert(0, mount);
     }
 
@@ -239,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();
   }