- make a fileview of 0 bytes work in ompio
- fixes the bug reported in ticket 3619 (which is already closed) also for ompio This commit was SVN r28575.
Этот коммит содержится в:
родитель
e61a1aa865
Коммит
9daec82f17
@ -491,6 +491,14 @@ int ompi_io_ompio_decode_datatype (mca_io_ompio_file_t *fh,
|
|||||||
opal_output (1, "Cannot attach the datatype to a convertor\n");
|
opal_output (1, "Cannot attach the datatype to a convertor\n");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( 0 == datatype->super.size ) {
|
||||||
|
*max_data = 0;
|
||||||
|
*iovec_count = 0;
|
||||||
|
*iov = NULL;
|
||||||
|
return OMPI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
remaining_length = count * datatype->super.size;
|
remaining_length = count * datatype->super.size;
|
||||||
|
|
||||||
temp_count = OMPIO_IOVEC_INITIAL_SIZE;
|
temp_count = OMPIO_IOVEC_INITIAL_SIZE;
|
||||||
|
@ -62,11 +62,17 @@ mca_io_ompio_file_read (ompi_file_t *fp,
|
|||||||
data = (mca_io_ompio_data_t *) fp->f_io_selected_data;
|
data = (mca_io_ompio_data_t *) fp->f_io_selected_data;
|
||||||
fh = &data->ompio_fh;
|
fh = &data->ompio_fh;
|
||||||
|
|
||||||
|
if ( 0 == count ) {
|
||||||
|
if ( MPI_STATUS_IGNORE != status ) {
|
||||||
|
status->_ucount = max_data;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
if (fh->f_amode & MPI_MODE_WRONLY){
|
if (fh->f_amode & MPI_MODE_WRONLY){
|
||||||
printf("Improper use of FILE Mode, Using WRONLY for Read!\n");
|
printf("Improper use of FILE Mode, Using WRONLY for Read!\n");
|
||||||
ret = OMPI_ERROR;
|
ret = OMPI_ERROR;
|
||||||
goto exit;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ompi_io_ompio_decode_datatype (fh,
|
ompi_io_ompio_decode_datatype (fh,
|
||||||
@ -218,7 +224,6 @@ mca_io_ompio_file_read (ompi_file_t *fp,
|
|||||||
status->_ucount = max_data;
|
status->_ucount = max_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +167,9 @@ OMPI_MPI_OFFSET_TYPE get_contiguous_chunk_size (mca_io_ompio_file_t *fh)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( 0 != fh->f_iov_count ) {
|
||||||
avg = avg/fh->f_iov_count;
|
avg = avg/fh->f_iov_count;
|
||||||
|
}
|
||||||
fh->f_comm->c_coll.coll_allreduce (&avg,
|
fh->f_comm->c_coll.coll_allreduce (&avg,
|
||||||
&global_avg,
|
&global_avg,
|
||||||
1,
|
1,
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* University of Stuttgart. All rights reserved.
|
* University of Stuttgart. All rights reserved.
|
||||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
* Copyright (c) 2008-2012 University of Houston. All rights reserved.
|
* Copyright (c) 2008-2013 University of Houston. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -59,6 +59,13 @@ mca_io_ompio_file_write (ompi_file_t *fp,
|
|||||||
size_t sum_previous_counts = 0;
|
size_t sum_previous_counts = 0;
|
||||||
size_t sum_previous_length = 0;
|
size_t sum_previous_length = 0;
|
||||||
|
|
||||||
|
if ( 0 == count ) {
|
||||||
|
if ( MPI_STATUS_IGNORE != status ) {
|
||||||
|
status->_ucount = 0;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
data = (mca_io_ompio_data_t *) fp->f_io_selected_data;
|
data = (mca_io_ompio_data_t *) fp->f_io_selected_data;
|
||||||
fh = &data->ompio_fh;
|
fh = &data->ompio_fh;
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user