1
1
This commit was SVN r14314.
Этот коммит содержится в:
Galen Shipman 2007-04-11 22:07:19 +00:00
родитель d7e428909e
Коммит ebca0bb34e

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

@ -15,7 +15,8 @@
/* prototypes of functions used for collective writes only. */
static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype
datatype, int nprocs, int myrank, ADIOI_Access
datatype, int nprocs, int myrank,
int interleave_count, ADIOI_Access
*others_req, ADIO_Offset *offset_list,
int *len_list, int contig_access_count, ADIO_Offset
min_st_offset, ADIO_Offset fd_size,
@ -271,6 +272,7 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, void *buf, int count,
/* exchange data and write in sizes of no more than coll_bufsize. */
ADIOI_Exch_and_write(fd, buf, datatype, nprocs, myrank,
interleave_count,
others_req, offset_list,
len_list, contig_access_count, min_st_offset,
fd_size, fd_start, fd_end, buf_idx, error_code);
@ -346,7 +348,8 @@ void ADIOI_GEN_WriteStridedColl(ADIO_File fd, void *buf, int count,
*/
static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype
datatype, int nprocs, int myrank,
ADIOI_Access
int interleave_count,
ADIOI_Access
*others_req, ADIO_Offset *offset_list,
int *len_list, int contig_access_count,
ADIO_Offset
@ -580,12 +583,21 @@ static void ADIOI_Exch_and_write(ADIO_File fd, void *buf, MPI_Datatype
if (count[i]) flag = 1;
if (flag) {
/* no interleaving means we might have to recompute size in the
* case where hints have steered us into this path even though we
* are non-overlapped. However, if there is a "hole" inbetween
* regions, we'll do a read-modify-write and W_Exchange_data will
* have read in excess data */
if(!interleave_count && !hole) {
for (size=0, i=0; i<contig_access_count; i++)
size += len_list[i];
}
ADIO_WriteContig(fd, write_buf, size, MPI_BYTE, ADIO_EXPLICIT_OFFSET,
off, &status, error_code);
if (*error_code != MPI_SUCCESS) return;
}
off += size;
off += (int) (ADIOI_MIN(coll_bufsize, end_loc-st_loc+1-done));
done += size;
}