Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
seek and other calls must use number of elements and not bytes displacement
[simgrid.git] / src / smpi / mpi / smpi_file.cpp
index 4c1a6cb..45a63ab 100644 (file)
@@ -111,14 +111,14 @@ int File::del(const char* filename, const Info*)
 
 int File::get_position(MPI_Offset* offset) const
 {
-  *offset = file_->tell();
+  *offset = file_->tell()/etype_->get_extent();
   return MPI_SUCCESS;
 }
 
 int File::get_position_shared(MPI_Offset* offset) const
 {
   shared_mutex_->lock();
-  *offset = *shared_file_pointer_;
+  *offset = *shared_file_pointer_/etype_->get_extent();
   shared_mutex_->unlock();
   return MPI_SUCCESS;
 }