Don't write more iovec than expected.
This commit was SVN r20375.
Этот коммит содержится в:
родитель
ecdcda9268
Коммит
2d4a668540
@ -85,17 +85,20 @@ ompi_convertor_raw( ompi_convertor_t* pConvertor,
|
|||||||
size_t blength = ompi_ddt_basicDatatypes[pElem->elem.common.type]->size;
|
size_t blength = ompi_ddt_basicDatatypes[pElem->elem.common.type]->size;
|
||||||
source_base += pElem->elem.disp;
|
source_base += pElem->elem.disp;
|
||||||
if( blength == pElem->elem.extent ) { /* no resized data */
|
if( blength == pElem->elem.extent ) { /* no resized data */
|
||||||
blength *= count_desc;
|
if( index < *iov_count ) {
|
||||||
/* now here we have a basic datatype */
|
blength *= count_desc;
|
||||||
OMPI_DDT_SAFEGUARD_POINTER( source_base, blength, pConvertor->pBaseBuf,
|
/* now here we have a basic datatype */
|
||||||
pConvertor->pDesc, pConvertor->count );
|
OMPI_DDT_SAFEGUARD_POINTER( source_base, blength, pConvertor->pBaseBuf,
|
||||||
DO_DEBUG( opal_output( 0, "raw 1. iov[%d] = {base %p, length %lu}\n",
|
pConvertor->pDesc, pConvertor->count );
|
||||||
index, source_base, (unsigned long)blength ); );
|
DO_DEBUG( opal_output( 0, "raw 1. iov[%d] = {base %p, length %lu}\n",
|
||||||
iov[index].iov_base = source_base;
|
index, source_base, (unsigned long)blength ); );
|
||||||
iov[index].iov_len = blength;
|
iov[index].iov_base = source_base;
|
||||||
source_base += blength;
|
iov[index].iov_len = blength;
|
||||||
raw_data += blength;
|
source_base += blength;
|
||||||
index++;
|
raw_data += blength;
|
||||||
|
index++;
|
||||||
|
count_desc = 0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
for( i = count_desc; (i > 0) && (index < *iov_count); i--, index++ ) {
|
for( i = count_desc; (i > 0) && (index < *iov_count); i--, index++ ) {
|
||||||
OMPI_DDT_SAFEGUARD_POINTER( source_base, blength, pConvertor->pBaseBuf,
|
OMPI_DDT_SAFEGUARD_POINTER( source_base, blength, pConvertor->pBaseBuf,
|
||||||
@ -172,7 +175,6 @@ ompi_convertor_raw( ompi_convertor_t* pConvertor,
|
|||||||
pos_desc += pElem->loop.items + 1;
|
pos_desc += pElem->loop.items + 1;
|
||||||
goto update_loop_description;
|
goto update_loop_description;
|
||||||
}
|
}
|
||||||
/* Save the stack with the correct last_count value. */
|
|
||||||
}
|
}
|
||||||
local_disp = (ptrdiff_t)source_base - local_disp;
|
local_disp = (ptrdiff_t)source_base - local_disp;
|
||||||
PUSH_STACK( pStack, pConvertor->stack_pos, pos_desc, DT_LOOP, count_desc,
|
PUSH_STACK( pStack, pConvertor->stack_pos, pos_desc, DT_LOOP, count_desc,
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user