1
1

Merge pull request #6898 from bosilca/fix/convertor_raw

Fix/convertor raw
Этот коммит содержится в:
bosilca 2019-08-16 10:27:05 -04:00 коммит произвёл GitHub
родитель d58c59eb71 2930bd9d21
Коммит 190d5f1339
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
9 изменённых файлов: 50 добавлений и 45 удалений

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

@ -50,11 +50,6 @@ opal_convertor_master_t* opal_convertor_find_or_create_master( uint32_t remote_a
void opal_convertor_destroy_masters( void );
#if OPAL_ENABLE_DEBUG
extern bool opal_pack_debug;
extern bool opal_unpack_debug;
#endif /* OPAL_ENABLE_DEBUG */
END_C_DECLS
#endif /* OPAL_CONVERTOR_INTERNAL_HAS_BEEN_INCLUDED */

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

@ -25,7 +25,7 @@
#if OPAL_ENABLE_DEBUG
#include "opal/util/output.h"
#define DO_DEBUG(INST) if( opal_pack_debug ) { INST }
#define DO_DEBUG(INST) if( opal_ddt_raw_debug ) { INST }
#else
#define DO_DEBUG(INST)
#endif /* OPAL_ENABLE_DEBUG */
@ -126,8 +126,8 @@ opal_convertor_raw( opal_convertor_t* pConvertor,
const ddt_elem_desc_t* current = &(pElem->elem);
if( count_desc != (current->count * current->blocklen) ) { /* Not the full element description */
do_now = current->blocklen - (count_desc % current->blocklen); /* how much left in the block */
if( do_now ) {
if( (do_now = count_desc % current->blocklen) ) {
do_now = current->blocklen - do_now; /* how much left in the block */
source_base += current->disp;
blength = do_now * opal_datatype_basicDatatypes[current->common.type]->size;
OPAL_DATATYPE_SAFEGUARD_POINTER( source_base, blength, pConvertor->pBaseBuf,
@ -136,12 +136,12 @@ opal_convertor_raw( opal_convertor_t* pConvertor,
index, (void*)source_base, blength ); );
opal_convertor_merge_iov( iov, iov_count,
(IOVBASE_TYPE *) source_base, blength, &index );
/* not check the return value, we know there was at least one element in the iovec */
/* ignore the return value, we know there was at least one element in the iovec */
sum_iov_len += blength;
count_desc -= do_now;
source_base += (current->extent - current->disp +
(current->blocklen - do_now) * opal_datatype_basicDatatypes[current->common.type]->size);
source_base += (blength - current->blocklen * opal_datatype_basicDatatypes[current->common.type]->size +
current->extent - current->disp);
}
}
}
@ -258,7 +258,7 @@ opal_convertor_raw( opal_convertor_t* pConvertor,
}
/* I complete an element, next step I should go to the next one */
PUSH_STACK( pStack, pConvertor->stack_pos, pos_desc, OPAL_DATATYPE_UINT1, count_desc,
source_base - pStack->disp - pConvertor->pBaseBuf );
source_base - pConvertor->pBaseBuf );
DO_DEBUG( opal_output( 0, "raw save stack stack_pos %d pos_desc %d count_desc %" PRIsize_t " disp %ld\n",
pConvertor->stack_pos, pStack->index, pStack->count, (long)pStack->disp ); );
return 0;

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

@ -36,7 +36,7 @@
#if OPAL_ENABLE_DEBUG
#define DO_DEBUG(INST) if( opal_copy_debug ) { INST }
#define DO_DEBUG(INST) if( opal_ddt_copy_debug ) { INST }
#else
#define DO_DEBUG(INST)
#endif /* OPAL_ENABLE_DEBUG */

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

@ -514,10 +514,11 @@ OPAL_DECLSPEC int opal_datatype_contain_basic_datatypes( const struct opal_datat
OPAL_DECLSPEC int opal_datatype_dump_data_flags( unsigned short usflags, char* ptr, size_t length );
OPAL_DECLSPEC int opal_datatype_dump_data_desc( union dt_elem_desc* pDesc, int nbElems, char* ptr, size_t length );
extern bool opal_position_debug;
extern bool opal_copy_debug;
extern bool opal_unpack_debug;
extern bool opal_pack_debug;
extern bool opal_ddt_position_debug;
extern bool opal_ddt_copy_debug;
extern bool opal_ddt_unpack_debug;
extern bool opal_ddt_pack_debug;
extern bool opal_ddt_raw_debug;
END_C_DECLS
#endif /* OPAL_DATATYPE_INTERNAL_H_HAS_BEEN_INCLUDED */

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

@ -41,10 +41,11 @@
/* by default the debuging is turned off */
int opal_datatype_dfd = -1;
bool opal_unpack_debug = false;
bool opal_pack_debug = false;
bool opal_position_debug = false;
bool opal_copy_debug = false;
bool opal_ddt_unpack_debug = false;
bool opal_ddt_pack_debug = false;
bool opal_ddt_position_debug = false;
bool opal_ddt_copy_debug = false;
bool opal_ddt_raw_debug = false;
int opal_ddt_verbose = -1; /* Has the datatype verbose it's own output stream */
extern int opal_cuda_verbose;
@ -161,35 +162,43 @@ int opal_datatype_register_params(void)
int ret;
ret = mca_base_var_register ("opal", "mpi", NULL, "ddt_unpack_debug",
"Whether to output debugging information in the ddt unpack functions (nonzero = enabled)",
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3,
MCA_BASE_VAR_SCOPE_LOCAL, &opal_unpack_debug);
"Whether to output debugging information in the ddt unpack functions (nonzero = enabled)",
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3,
MCA_BASE_VAR_SCOPE_LOCAL, &opal_ddt_unpack_debug);
if (0 > ret) {
return ret;
return ret;
}
ret = mca_base_var_register ("opal", "mpi", NULL, "ddt_pack_debug",
"Whether to output debugging information in the ddt pack functions (nonzero = enabled)",
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3,
MCA_BASE_VAR_SCOPE_LOCAL, &opal_pack_debug);
"Whether to output debugging information in the ddt pack functions (nonzero = enabled)",
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3,
MCA_BASE_VAR_SCOPE_LOCAL, &opal_ddt_pack_debug);
if (0 > ret) {
return ret;
return ret;
}
ret = mca_base_var_register ("opal", "mpi", NULL, "ddt_raw_debug",
"Whether to output debugging information in the ddt raw functions (nonzero = enabled)",
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3,
MCA_BASE_VAR_SCOPE_LOCAL, &opal_ddt_raw_debug);
if (0 > ret) {
return ret;
}
ret = mca_base_var_register ("opal", "mpi", NULL, "ddt_position_debug",
"Non zero lead to output generated by the datatype position functions",
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3,
MCA_BASE_VAR_SCOPE_LOCAL, &opal_position_debug);
"Non zero lead to output generated by the datatype position functions",
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3,
MCA_BASE_VAR_SCOPE_LOCAL, &opal_ddt_position_debug);
if (0 > ret) {
return ret;
return ret;
}
ret = mca_base_var_register ("opal", "mpi", NULL, "ddt_copy_debug",
"Whether to output debugging information in the ddt copy functions (nonzero = enabled)",
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3,
MCA_BASE_VAR_SCOPE_LOCAL, &opal_copy_debug);
"Whether to output debugging information in the ddt copy functions (nonzero = enabled)",
MCA_BASE_VAR_TYPE_BOOL, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE, OPAL_INFO_LVL_3,
MCA_BASE_VAR_SCOPE_LOCAL, &opal_ddt_copy_debug);
if (0 > ret) {
return ret;
return ret;
}
ret = mca_base_var_register ("opal", "opal", NULL, "ddt_verbose",
@ -208,7 +217,7 @@ int opal_datatype_register_params(void)
OPAL_INFO_LVL_8, MCA_BASE_VAR_SCOPE_LOCAL,
&opal_cuda_verbose);
if (0 > ret) {
return ret;
return ret;
}
#endif

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

@ -31,7 +31,7 @@
#if OPAL_ENABLE_DEBUG
#include "opal/util/output.h"
#define DO_DEBUG(INST) if( opal_pack_debug ) { INST }
#define DO_DEBUG(INST) if( opal_ddt_pack_debug ) { INST }
#else
#define DO_DEBUG(INST)
#endif /* OPAL_ENABLE_DEBUG */

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

@ -33,7 +33,7 @@
#if OPAL_ENABLE_DEBUG
#include "opal/util/output.h"
#define DO_DEBUG(INST) if( opal_position_debug ) { INST }
#define DO_DEBUG(INST) if( opal_ddt_position_debug ) { INST }
#else
#define DO_DEBUG(INST)
#endif /* OPAL_ENABLE_DEBUG */

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

@ -33,7 +33,7 @@
#if OPAL_ENABLE_DEBUG
#include "opal/util/output.h"
#define DO_DEBUG(INST) if( opal_unpack_debug ) { INST }
#define DO_DEBUG(INST) if( opal_ddt_unpack_debug ) { INST }
#else
#define DO_DEBUG(INST)
#endif /* OPAL_ENABLE_DEBUG */