int PMPI_File_seek(MPI_File fh, MPI_Offset offset, int whence){
CHECK_FILE(1, fh)
const SmpiBenchGuard suspend_bench;
- int ret = fh->seek(offset,whence);
+ int ret = fh->seek(offset*fh->etype()->get_extent(),whence);
return ret;
}
CHECK_FILE(1, fh)
CHECK_COLLECTIVE(fh->comm(), __func__)
const SmpiBenchGuard suspend_bench;
- int ret = fh->seek_shared(offset,whence);
+ int ret = fh->seek_shared(offset*fh->etype()->get_extent(),whence);
return ret;
}
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;
}