@@ -114,16 +114,16 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev,
114114#endif
115115
116116 ptl_request -> super .super .ompi_req -> req_status ._ucount = ev -> mlength ;
117- if (!MTL_PORTALS4_IS_SHORT_MSG (ev -> match_bits ) && ompi_mtl_portals4 .protocol == rndv ) {
118- /* If it's not a short message and we're doing rndv, we
117+ if (!MTL_PORTALS4_IS_SHORT_MSG (ev -> match_bits ) && ompi_mtl_portals4 .protocol == rndv && msg_length != ev -> mlength ) {
118+ /* If it's not a short message and we're doing rndv and the message is not complete, we
119119 only have the first part of the message. Issue the get
120120 to pull the second part of the message. */
121- ret = read_msg ((char * ) ptl_request -> delivery_ptr + ompi_mtl_portals4 . eager_limit ,
121+ ret = read_msg ((char * ) ptl_request -> delivery_ptr + ev -> mlength ,
122122 ((msg_length > ptl_request -> delivery_len ) ?
123- ptl_request -> delivery_len : msg_length ) - ompi_mtl_portals4 . eager_limit ,
123+ ptl_request -> delivery_len : msg_length ) - ev -> mlength ,
124124 ev -> initiator ,
125125 ev -> hdr_data ,
126- ompi_mtl_portals4 . eager_limit ,
126+ ev -> mlength ,
127127 ptl_request );
128128 if (OPAL_UNLIKELY (OMPI_SUCCESS != ret )) {
129129 if (NULL != ptl_request -> buffer_ptr ) free (ptl_request -> buffer_ptr );
@@ -164,7 +164,7 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev,
164164 }
165165
166166 /* set the received length in the status, now that we know
167- excatly how much data was sent. */
167+ exactly how much data was sent. */
168168 ptl_request -> super .super .ompi_req -> req_status ._ucount += ev -> mlength ;
169169
170170#if OMPI_MTL_PORTALS4_FLOW_CONTROL
@@ -280,12 +280,12 @@ ompi_mtl_portals4_recv_progress(ptl_event_t *ev,
280280 /* For long messages in the overflow list, ev->mlength = 0 */
281281 ptl_request -> super .super .ompi_req -> req_status ._ucount = 0 ;
282282
283- ret = read_msg ((char * ) ptl_request -> delivery_ptr + ev -> mlength ,
284- (( msg_length > ptl_request -> delivery_len ) ?
285- ptl_request -> delivery_len : msg_length ) - ev -> mlength ,
283+ ret = read_msg ((char * ) ptl_request -> delivery_ptr ,
284+ (msg_length > ptl_request -> delivery_len ) ?
285+ ptl_request -> delivery_len : msg_length ,
286286 ev -> initiator ,
287287 ev -> hdr_data ,
288- ev -> mlength ,
288+ 0 ,
289289 ptl_request );
290290 if (OPAL_UNLIKELY (OMPI_SUCCESS != ret )) {
291291 if (NULL != ptl_request -> buffer_ptr ) free (ptl_request -> buffer_ptr );
@@ -383,7 +383,7 @@ ompi_mtl_portals4_irecv(struct mca_mtl_base_module_t* mtl,
383383 PTL_ME_OP_PUT |
384384 PTL_ME_USE_ONCE |
385385 PTL_ME_EVENT_UNLINK_DISABLE ;
386- if (length <= ompi_mtl_portals4 .eager_limit ) {
386+ if (length <= ompi_mtl_portals4 .short_limit ) {
387387 me .options |= PTL_ME_EVENT_LINK_DISABLE ;
388388 }
389389 me .match_id = remote_proc ;
@@ -407,7 +407,7 @@ ompi_mtl_portals4_irecv(struct mca_mtl_base_module_t* mtl,
407407 /* if a long message, spin until we either have a comm event or a
408408 link event, guaranteeing progress for long unexpected
409409 messages. */
410- if (length > ompi_mtl_portals4 .eager_limit ) {
410+ if (length > ompi_mtl_portals4 .short_limit ) {
411411 while (true != ptl_request -> req_started ) {
412412 ompi_mtl_portals4_progress ();
413413 }
0 commit comments