PML/UCX: create convertor clone instead of stack reset
Signed-off-by: Sergey Oblomov <sergeyo@mellanox.com>
Этот коммит содержится в:
родитель
7c5de01c57
Коммит
19607daa32
@ -81,20 +81,32 @@ static ucs_status_t pml_ucx_generic_datatype_unpack(void *state, size_t offset,
|
|||||||
|
|
||||||
uint32_t iov_count;
|
uint32_t iov_count;
|
||||||
struct iovec iov;
|
struct iovec iov;
|
||||||
|
opal_convertor_t conv;
|
||||||
|
|
||||||
iov_count = 1;
|
iov_count = 1;
|
||||||
iov.iov_base = (void*)src;
|
iov.iov_base = (void*)src;
|
||||||
iov.iov_len = length;
|
iov.iov_len = length;
|
||||||
|
|
||||||
/* if we detected out-of-order message - apply hack: reset datatype stack
|
/* in case if unordered message arrived - create separate convertor to
|
||||||
* of convertor to allow re-build it on set_position call */
|
* unpack data. */
|
||||||
if ((offset != convertor->offset) &&
|
if (offset != convertor->offset) {
|
||||||
!(convertor->opal_conv.flags & OPAL_DATATYPE_FLAG_CONTIGUOUS) ) {
|
OBJ_CONSTRUCT(&conv, opal_convertor_t);
|
||||||
opal_convertor_reset_stack_at_beginning(&convertor->opal_conv);
|
opal_convertor_copy_and_prepare_for_recv(ompi_proc_local_proc->super.proc_convertor,
|
||||||
}
|
&convertor->datatype->super,
|
||||||
|
convertor->opal_conv.count,
|
||||||
|
convertor->opal_conv.pBaseBuf, 0,
|
||||||
|
&conv);
|
||||||
|
opal_convertor_set_position(&conv, &offset);
|
||||||
|
opal_convertor_unpack(&conv, &iov, &iov_count, &length);
|
||||||
|
opal_convertor_cleanup(&conv);
|
||||||
|
OBJ_DESTRUCT(&conv);
|
||||||
|
/* permanently switch to un-ordered mode */
|
||||||
|
convertor->offset = 0;
|
||||||
|
} else {
|
||||||
opal_convertor_set_position(&convertor->opal_conv, &offset);
|
opal_convertor_set_position(&convertor->opal_conv, &offset);
|
||||||
opal_convertor_unpack(&convertor->opal_conv, &iov, &iov_count, &length);
|
opal_convertor_unpack(&convertor->opal_conv, &iov, &iov_count, &length);
|
||||||
convertor->offset = offset + length;
|
convertor->offset += length;
|
||||||
|
}
|
||||||
return UCS_OK;
|
return UCS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -409,12 +409,6 @@ int opal_convertor_create_stack_at_begining( opal_convertor_t* convertor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int32_t opal_convertor_reset_stack_at_beginning( opal_convertor_t* convertor )
|
|
||||||
{
|
|
||||||
return opal_convertor_create_stack_at_begining( convertor, opal_datatype_local_sizes );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int32_t opal_convertor_set_position_nocheck( opal_convertor_t* convertor,
|
int32_t opal_convertor_set_position_nocheck( opal_convertor_t* convertor,
|
||||||
size_t* position )
|
size_t* position )
|
||||||
{
|
{
|
||||||
|
@ -339,11 +339,6 @@ opal_convertor_set_position( opal_convertor_t* convertor,
|
|||||||
return opal_convertor_set_position_nocheck( convertor, position );
|
return opal_convertor_set_position_nocheck( convertor, position );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
OPAL_DECLSPEC int32_t
|
|
||||||
opal_convertor_reset_stack_at_beginning( opal_convertor_t* convertor );
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user