io/ompio: fix seek position calculation for SEEK_CUR
This commit fixes the calculation of the position where to seek to, in case SEEK_CUR is used. Signed-off-by: Edgar Gabriel <egabriel@central.uh.edu>
Этот коммит содержится в:
родитель
e74443a8b8
Коммит
c65dda6f5f
@ -400,8 +400,9 @@ int mca_io_ompio_file_seek (ompi_file_t *fh,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MPI_SEEK_CUR:
|
case MPI_SEEK_CUR:
|
||||||
offset += data->ompio_fh.f_position_in_file_view;
|
ret = mca_common_ompio_file_get_position (&data->ompio_fh,
|
||||||
offset += data->ompio_fh.f_disp;
|
&temp_offset);
|
||||||
|
offset += temp_offset;
|
||||||
if (offset < 0) {
|
if (offset < 0) {
|
||||||
OPAL_THREAD_UNLOCK(&fh->f_lock);
|
OPAL_THREAD_UNLOCK(&fh->f_lock);
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user