1
1

- 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.
Этот коммит содержится в:
Edgar Gabriel 2013-05-30 21:33:13 +00:00
родитель e61a1aa865
Коммит 9daec82f17
4 изменённых файлов: 26 добавлений и 4 удалений

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

@ -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");
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;
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;
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){
printf("Improper use of FILE Mode, Using WRONLY for Read!\n");
ret = OMPI_ERROR;
goto exit;
return ret;
}
ompi_io_ompio_decode_datatype (fh,
@ -218,7 +224,6 @@ mca_io_ompio_file_read (ompi_file_t *fp,
status->_ucount = max_data;
}
exit:
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;
}
fh->f_comm->c_coll.coll_allreduce (&avg,
&global_avg,
1,

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

@ -9,7 +9,7 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2008-2012 University of Houston. All rights reserved.
* Copyright (c) 2008-2013 University of Houston. All rights reserved.
* $COPYRIGHT$
*
* 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_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;
fh = &data->ompio_fh;