Fix a copy problem when using a drained message that has a NULL buffer. This often happens when draining a Barrier message which are sometimes point-to-point messages with count=0 and a NULL buffer.
This fixes a bug that can happen when checkpointing while one process is in such a routine. Previously a warning was thrown. This commit was SVN r21080.
Этот коммит содержится в:
родитель
84471e4bd4
Коммит
2e1fbc4c75
@ -4081,12 +4081,18 @@ static int drain_message_copy_remove(ompi_crcp_bkmrk_pml_drain_message_ref_t *dr
|
||||
memcpy(*status, &drain_content_ref->status, sizeof(ompi_status_public_t));
|
||||
}
|
||||
|
||||
if( 0 != (ret = ompi_ddt_copy_content_same_ddt(datatype, count,
|
||||
(void*)buf, drain_content_ref->buffer) ) ) {
|
||||
opal_output( mca_crcp_bkmrk_component.super.output_handle,
|
||||
"crcp:bkmrk: drain_message_copy_remove(): Datatype copy failed (%d)",
|
||||
ret);
|
||||
exit_status = ret;
|
||||
/* The buffer could be NULL - More likely when doing a count=0 type of message (e.g., Barrier) */
|
||||
if( NULL == buf ) {
|
||||
OPAL_OUTPUT_VERBOSE((20, mca_crcp_bkmrk_component.super.output_handle,
|
||||
"crcp:bkmrk: drain_message_copy_remove(): Skip copy - NULL buffer"));
|
||||
} else {
|
||||
if( 0 != (ret = ompi_ddt_copy_content_same_ddt(datatype, count,
|
||||
(void*)buf, drain_content_ref->buffer) ) ) {
|
||||
opal_output( mca_crcp_bkmrk_component.super.output_handle,
|
||||
"crcp:bkmrk: drain_message_copy_remove(): Datatype copy failed (%d)",
|
||||
ret);
|
||||
exit_status = ret;
|
||||
}
|
||||
}
|
||||
|
||||
/* Remove the message from the list */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user