1
1

Correctly report the length. Always update the total number of bytes returned in the iovec.

This commit was SVN r3994.
Этот коммит содержится в:
George Bosilca 2005-01-14 01:26:43 +00:00
родитель 4ec9581542
Коммит eb2db8d93c
3 изменённых файлов: 6 добавлений и 7 удалений

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

@ -258,6 +258,7 @@ static inline int32_t ompi_convertor_unpack( ompi_convertor_t* pConv,
if( iov[0].iov_len < length )
length = iov[0].iov_len;
iov[0].iov_len = length;
*max_data = length;
pConv->bConverted += length;
return (pConv->bConverted == (pData->size * pConv->count));
}

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

@ -585,8 +585,8 @@ ompi_convertor_pack_no_conv_contig( ompi_convertor_t* pConv,
for( iov_count = 0; iov_count < (*out_size); iov_count++ ) {
if( iov[iov_count].iov_base == NULL ) {
iov[iov_count].iov_base = pSrc;
if( (pConv->bConverted + iov[iov_count].iov_len) > length )
iov[iov_count].iov_len = length - pConv->bConverted;
if( iov[iov_count].iov_len > length )
iov[iov_count].iov_len = length;
} else {
/* contiguous data just memcpy the smallest data in the user buffer */
iov[iov_count].iov_len = IMIN( iov[iov_count].iov_len, length );

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

@ -55,12 +55,10 @@ int ompi_convertor_create_stack_with_pos_general( ompi_convertor_t* pConvertor,
if( starting_point == 0 ) {
return ompi_convertor_create_stack_at_begining( pConvertor, sizes );
}
/* if the convertor continue from the last position
* there is nothing to do.
*/
/* if the convertor continue from the last position there is nothing to do. */
if( pConvertor->bConverted == (unsigned long)starting_point ) return OMPI_SUCCESS;
/* do we provide more place than necessary for the data ? */
/* do we start after the end of the data ? */
if( starting_point >= (int)(pConvertor->count * pData->size) ) {
pConvertor->bConverted = pConvertor->count * pData->size;
return OMPI_SUCCESS;
@ -105,7 +103,7 @@ int ompi_convertor_create_stack_with_pos_general( ompi_convertor_t* pConvertor,
pStack[1].disp = pStack->disp + starting_point;
} else { /* each is contiguous but there are gaps inbetween */
pStack[1].disp = pStack->disp /* original place */
+ cnt * extent /* the completed elements with their extent */
+ pStack->count * extent /* the completed elements with their extent */ /* TODO check */
+ pStack[1].count; /* what we complete from the last begining of the data */
}
pConvertor->bConverted = starting_point;