@@ -763,8 +763,8 @@ ompi_osc_portals4_put(const void *origin_addr,
763763 ompi_osc_portals4_module_t * module =
764764 (ompi_osc_portals4_module_t * ) win -> w_osc_module ;
765765 ptl_process_t peer = ompi_osc_portals4_get_peer (module , target );
766- size_t offset ;
767- OPAL_PTRDIFF_TYPE length , origin_lb , target_lb ;
766+ size_t offset , size ;
767+ OPAL_PTRDIFF_TYPE length , origin_lb , target_lb , extent ;
768768
769769 OPAL_OUTPUT_VERBOSE ((50 , ompi_osc_base_framework .framework_output ,
770770 "put: 0x%lx, %d, %s, %d, %lu, %d, %s, 0x%lx" ,
@@ -781,18 +781,22 @@ ompi_osc_portals4_put(const void *origin_addr,
781781 "MPI_Put: transfer of non-contiguous memory is not currently supported.\n" );
782782 return OMPI_ERR_NOT_SUPPORTED ;
783783 } else {
784- ret = ompi_datatype_get_extent (origin_dt , & origin_lb , & length );
784+ ret = ompi_datatype_get_true_extent (origin_dt , & origin_lb , & extent );
785785 if (OMPI_SUCCESS != ret ) {
786786 return ret ;
787787 }
788- ret = ompi_datatype_type_lb (target_dt , & target_lb );
788+ ret = ompi_datatype_get_true_extent (target_dt , & target_lb , & extent );
789789 if (OMPI_SUCCESS != ret ) {
790790 return ret ;
791791 }
792- length *= origin_count ;
792+ ompi_datatype_type_size (origin_dt , & size );
793+ length = size * origin_count ;
794+
793795 opal_atomic_add_64 (& module -> opcount , number_of_fragment (length , mca_osc_portals4_component .ptl_max_msg_size ));
796+
794797 OPAL_OUTPUT_VERBOSE ((90 , ompi_osc_base_framework .framework_output ,
795- "%s,%d Put" , __FUNCTION__ , __LINE__ ));
798+ "%s,%d Put(origin_count=%d, origin_lb=%lu, target_count=%d, target_lb=%lu, length=%lu, op_count=%ld)" ,
799+ __FUNCTION__ , __LINE__ , origin_count , origin_lb , target_count , target_lb , length , module -> opcount ));
796800 ret = splittedPtlPut (module -> md_h ,
797801 (ptl_size_t ) origin_addr + origin_lb ,
798802 length ,
0 commit comments