@@ -763,8 +763,8 @@ ompi_osc_portals4_put(const void *origin_addr,
763
763
ompi_osc_portals4_module_t * module =
764
764
(ompi_osc_portals4_module_t * ) win -> w_osc_module ;
765
765
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 ;
768
768
769
769
OPAL_OUTPUT_VERBOSE ((50 , ompi_osc_base_framework .framework_output ,
770
770
"put: 0x%lx, %d, %s, %d, %lu, %d, %s, 0x%lx" ,
@@ -781,18 +781,22 @@ ompi_osc_portals4_put(const void *origin_addr,
781
781
"MPI_Put: transfer of non-contiguous memory is not currently supported.\n" );
782
782
return OMPI_ERR_NOT_SUPPORTED ;
783
783
} else {
784
- ret = ompi_datatype_get_extent (origin_dt , & origin_lb , & length );
784
+ ret = ompi_datatype_get_true_extent (origin_dt , & origin_lb , & extent );
785
785
if (OMPI_SUCCESS != ret ) {
786
786
return ret ;
787
787
}
788
- ret = ompi_datatype_type_lb (target_dt , & target_lb );
788
+ ret = ompi_datatype_get_true_extent (target_dt , & target_lb , & extent );
789
789
if (OMPI_SUCCESS != ret ) {
790
790
return ret ;
791
791
}
792
- length *= origin_count ;
792
+ ompi_datatype_type_size (origin_dt , & size );
793
+ length = size * origin_count ;
794
+
793
795
opal_atomic_add_64 (& module -> opcount , number_of_fragment (length , mca_osc_portals4_component .ptl_max_msg_size ));
796
+
794
797
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 ));
796
800
ret = splittedPtlPut (module -> md_h ,
797
801
(ptl_size_t ) origin_addr + origin_lb ,
798
802
length ,
0 commit comments