1
1

bring the lockedfile component up to date with the fileview changes.

Этот коммит содержится в:
Edgar Gabriel 2015-08-20 09:26:30 -05:00
родитель b0461f8d3c
Коммит 8b84da5e35
5 изменённых файлов: 24 добавлений и 1 удалений

Просмотреть файл

@ -44,7 +44,8 @@ int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm,
int handle, rank;
struct mca_sharedfp_lockedfile_data * module_data = NULL;
struct mca_sharedfp_base_data_t* sh;
mca_io_ompio_file_t * shfileHandle;
mca_io_ompio_file_t * shfileHandle, *ompio_fh;
mca_io_ompio_data_t *data;
/*------------------------------------------------------------*/
/*Open the same file again without shared file pointer support*/
@ -56,6 +57,16 @@ int mca_sharedfp_lockedfile_file_open (struct ompi_communicator_t *comm,
return err;
}
shfileHandle->f_fh = fh->f_fh;
data = (mca_io_ompio_data_t *) fh->f_fh->f_io_selected_data;
ompio_fh = &data->ompio_fh;
err = mca_io_ompio_set_view_internal (shfileHandle,
ompio_fh->f_disp,
ompio_fh->f_etype,
ompio_fh->f_orig_filetype,
ompio_fh->f_datarep,
MPI_INFO_NULL);
/*Memory is allocated here for the sh structure*/
sh = (struct mca_sharedfp_base_data_t*)malloc(sizeof(struct mca_sharedfp_base_data_t));

Просмотреть файл

@ -73,6 +73,8 @@ int mca_sharedfp_lockedfile_iread(mca_io_ompio_file_t *fh,
/*Request the offset to write bytesRequested bytes*/
ret = mca_sharedfp_lockedfile_request_position(sh,bytesRequested,&offset);
offset /= sh->sharedfh->f_etype_size;
if ( -1 != ret ) {
if ( mca_sharedfp_lockedfile_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
@ -196,6 +198,7 @@ int mca_sharedfp_lockedfile_read_ordered_begin(mca_io_ompio_file_t *fh,
/*Each process now has its own individual offset*/
offset = offsetBuff - sendBuff;
offset /= sh->sharedfh->f_etype_size;
if ( mca_sharedfp_lockedfile_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,

Просмотреть файл

@ -71,6 +71,8 @@ int mca_sharedfp_lockedfile_iwrite(mca_io_ompio_file_t *fh,
/*Request the offset to write bytesRequested bytes*/
ret = mca_sharedfp_lockedfile_request_position(sh,bytesRequested,&offset);
offset /= sh->sharedfh->f_etype_size;
if ( -1 != ret) {
if ( mca_sharedfp_lockedfile_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
@ -193,6 +195,7 @@ int mca_sharedfp_lockedfile_write_ordered_begin(mca_io_ompio_file_t *fh,
/*Each process now has its own individual offset*/
offset = offsetBuff - sendBuff;
offset /= sh->sharedfh->f_etype_size;
if ( mca_sharedfp_lockedfile_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,

Просмотреть файл

@ -68,6 +68,8 @@ int mca_sharedfp_lockedfile_read ( mca_io_ompio_file_t *fh,
/*Request the offset to write bytesRequested bytes*/
ret = mca_sharedfp_lockedfile_request_position(sh,bytesRequested,&offset);
offset /= sh->sharedfh->f_etype_size;
if (-1 != ret ) {
if ( mca_sharedfp_lockedfile_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
@ -182,6 +184,7 @@ int mca_sharedfp_lockedfile_read_ordered (mca_io_ompio_file_t *fh,
/*Each process now has its own individual offset in recvBUFF*/
offset = offsetBuff - sendBuff;
offset /= sh->sharedfh->f_etype_size;
if ( mca_sharedfp_lockedfile_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,

Просмотреть файл

@ -70,6 +70,8 @@ int mca_sharedfp_lockedfile_write (mca_io_ompio_file_t *fh,
/* Request the offset to write bytesRequested bytes */
ret = mca_sharedfp_lockedfile_request_position ( sh, bytesRequested, &offset);
offset /= sh->sharedfh->f_etype_size;
if (-1 != ret ) {
if ( mca_sharedfp_lockedfile_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,
@ -187,6 +189,7 @@ int mca_sharedfp_lockedfile_write_ordered (mca_io_ompio_file_t *fh,
/*Each process now has its own individual offset*/
offset = offsetBuff - sendBuff;
offset /= sh->sharedfh->f_etype_size;
if ( mca_sharedfp_lockedfile_verbose ) {
opal_output(ompi_sharedfp_base_framework.framework_output,