diff --git a/ompi/datatype/convertor.c b/ompi/datatype/convertor.c index 7611eb5e8d..4859d1f246 100644 --- a/ompi/datatype/convertor.c +++ b/ompi/datatype/convertor.c @@ -80,6 +80,7 @@ OBJ_CLASS_INSTANCE(ompi_convertor_t, opal_object_t, ompi_convertor_construct, om * 1 if everything went fine and the data was completly converted * -1 something wrong occurs. */ +#include "ompi/communicator/communicator.h" inline int32_t ompi_convertor_pack( ompi_convertor_t* pConv, struct iovec* iov, uint32_t* out_size, size_t* max_data, int32_t* freeAfter ) @@ -92,6 +93,17 @@ inline int32_t ompi_convertor_pack( ompi_convertor_t* pConv, *max_data = 0; return 1; /* nothing to do */ } + /* JMS */ + if ( pConv->bConverted >= pConv->local_size ) { + sleep(ompi_mpi_comm_world.c_my_rank * 3); + printf("ASSERT FAILED\n"); + ompi_ddt_dump(pConv->pDesc); + fprintf(stderr, "--------------------------------------------\n"); + ompi_convertor_dump(pConv); + fprintf(stderr, "=============================================\n"); + sleep(10); + abort(); + } assert( pConv->bConverted < pConv->local_size ); /* We dont allocate any memory. The packing function should allocate it @@ -203,7 +215,8 @@ extern int ompi_ddt_local_sizes[DT_MAX_PREDEFINED]; extern int ompi_convertor_create_stack_with_pos_general( ompi_convertor_t* convertor, int starting_point, const int* sizes ); -inline int32_t ompi_convertor_set_position_nocheck( ompi_convertor_t* convertor, size_t* position ) +int32_t ompi_convertor_set_position_nocheck( ompi_convertor_t* convertor, + size_t* position ) { int32_t rc; @@ -251,9 +264,9 @@ ompi_convertor_personalize( ompi_convertor_t* convertor, uint32_t flags, * * I consider here that the convertor is clean, either never initialized or already cleanup. */ -inline int ompi_convertor_prepare( ompi_convertor_t* convertor, - const ompi_datatype_t* datatype, int32_t count, - const void* pUserBuf ) +int ompi_convertor_prepare( ompi_convertor_t* convertor, + const ompi_datatype_t* datatype, int32_t count, + const void* pUserBuf ) { uint32_t required_stack_length = datatype->btypes[DT_LOOP] + 1; diff --git a/ompi/datatype/convertor.h b/ompi/datatype/convertor.h index 5e8ae58158..dad8cf11b9 100644 --- a/ompi/datatype/convertor.h +++ b/ompi/datatype/convertor.h @@ -241,7 +241,7 @@ ompi_convertor_copy_and_prepare_for_recv( const ompi_convertor_t* pSrcConv, /* * Upper level does not need to call the _nocheck function directly. */ -OMPI_DECLSPEC inline int32_t +OMPI_DECLSPEC int32_t ompi_convertor_set_position_nocheck( ompi_convertor_t* convertor, size_t* position ); static inline int32_t diff --git a/ompi/datatype/new_pack.c b/ompi/datatype/new_pack.c index 3ef547fdbb..5364754c4b 100644 --- a/ompi/datatype/new_pack.c +++ b/ompi/datatype/new_pack.c @@ -265,7 +265,6 @@ int ompi_convertor_generic_simple_pack( ompi_convertor_t* pConvertor, iov[iov_count].iov_len -= iov_len_local; /* update the amount of valid data */ total_packed += iov[iov_count].iov_len; pConvertor->bConverted += iov[iov_count].iov_len; /* update the already converted bytes */ - assert( iov_len_local >= 0 ); /* We compute the checksum if we have to. But we will store the temporary * values in the a and b variables, and only at the end take in account the * value of the convertor checksum. diff --git a/ompi/datatype/new_position.c b/ompi/datatype/new_position.c index ddb62c8f61..7d607dd5b5 100644 --- a/ompi/datatype/new_position.c +++ b/ompi/datatype/new_position.c @@ -219,7 +219,6 @@ int ompi_convertor_generic_simple_position( ompi_convertor_t* pConvertor, complete_loop: (*position) -= iov_len_local; pConvertor->bConverted = *position; /* update the already converted bytes */ - assert( iov_len_local >= 0 ); if( (pConvertor->pending_length != iov_len_local) && (pConvertor->flags & CONVERTOR_RECV) ) { opal_output( 0, "Missing some data ?" ); diff --git a/ompi/datatype/new_unpack.c b/ompi/datatype/new_unpack.c index d20aa030a7..320841ca8e 100644 --- a/ompi/datatype/new_unpack.c +++ b/ompi/datatype/new_unpack.c @@ -278,7 +278,6 @@ int ompi_convertor_generic_simple_unpack( ompi_convertor_t* pConvertor, iov[iov_count].iov_len -= iov_len_local; /* update the amount of valid data */ total_unpacked += iov[iov_count].iov_len; pConvertor->bConverted += iov[iov_count].iov_len; /* update the already converted bytes */ - assert( iov_len_local >= 0 ); /* We compute the checksum if we have to. But we will store the temporary * values in the a and b variables, and only at the end take in account the * value of the convertor checksum.