Changes to io_ompio.c to support data-seiving in two-phase I/O.
This commit was SVN r27151.
Этот коммит содержится в:
родитель
6e8c97c77c
Коммит
960c47f604
@ -77,7 +77,9 @@ int ompi_io_ompio_set_file_defaults (mca_io_ompio_file_t *fh)
|
||||
|
||||
fh->f_procs_per_group = -1;
|
||||
|
||||
ompi_datatype_create_contiguous(1048576, &ompi_mpi_byte.dt, &default_file_view);
|
||||
ompi_datatype_create_contiguous(1048576,
|
||||
&ompi_mpi_byte.dt,
|
||||
&default_file_view);
|
||||
ompi_datatype_commit (&default_file_view);
|
||||
|
||||
fh->f_etype = &ompi_mpi_byte.dt;
|
||||
|
@ -52,6 +52,8 @@ mca_io_ompio_file_open (ompi_communicator_t *comm,
|
||||
((amode & MPI_MODE_CREATE) || (amode & MPI_MODE_EXCL))) {
|
||||
return MPI_ERR_AMODE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ((amode & MPI_MODE_RDWR) && (amode & MPI_MODE_SEQUENTIAL)) {
|
||||
return MPI_ERR_AMODE;
|
||||
@ -91,6 +93,13 @@ mca_io_ompio_file_open (ompi_communicator_t *comm,
|
||||
}
|
||||
}
|
||||
*/
|
||||
/* This fix is needed for data seiving to work with
|
||||
two-phase collective I/O */
|
||||
if ((amode & MPI_MODE_WRONLY)){
|
||||
amode -= MPI_MODE_WRONLY;
|
||||
amode += MPI_MODE_RDWR;
|
||||
}
|
||||
/*--------------------------------------------------*/
|
||||
|
||||
|
||||
if (OMPI_SUCCESS != (ret = mca_fs_base_file_select (&data->ompio_fh,
|
||||
@ -110,6 +119,7 @@ mca_io_ompio_file_open (ompi_communicator_t *comm,
|
||||
goto fn_fail;
|
||||
}
|
||||
|
||||
|
||||
ret = data->ompio_fh.f_fs->fs_file_open (comm,
|
||||
filename,
|
||||
amode,
|
||||
|
@ -62,6 +62,13 @@ mca_io_ompio_file_read (ompi_file_t *fp,
|
||||
data = (mca_io_ompio_data_t *) fp->f_io_selected_data;
|
||||
fh = &data->ompio_fh;
|
||||
|
||||
|
||||
if (fh->f_amode & MPI_MODE_WRONLY){
|
||||
printf("Improper use of FILE Mode, Using WRONLY for Read!\n");
|
||||
ret = OMPI_ERROR;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
ompi_io_ompio_decode_datatype (fh,
|
||||
datatype,
|
||||
count,
|
||||
@ -211,6 +218,7 @@ mca_io_ompio_file_read (ompi_file_t *fp,
|
||||
status->_ucount = max_data;
|
||||
}
|
||||
|
||||
exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user