3
3
* Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
4
4
* University Research and Technology
5
5
* Corporation. All rights reserved.
6
- * Copyright (c) 2004-2012 The University of Tennessee and The University
6
+ * Copyright (c) 2004-2018 The University of Tennessee and The University
7
7
* of Tennessee Research Foundation. All rights
8
8
* reserved.
9
9
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@@ -250,9 +250,9 @@ int mca_pml_ob1_add_comm(ompi_communicator_t* comm)
250
250
continue ;
251
251
}
252
252
253
- add_fragment_to_unexpected :
254
-
255
253
if (((uint16_t )hdr -> hdr_seq ) == ((uint16_t )pml_proc -> expected_sequence ) ) {
254
+
255
+ add_fragment_to_unexpected :
256
256
/* We're now expecting the next sequence number. */
257
257
pml_proc -> expected_sequence ++ ;
258
258
opal_list_append ( & pml_proc -> unexpected_frags , (opal_list_item_t * )frag );
@@ -264,17 +264,16 @@ int mca_pml_ob1_add_comm(ompi_communicator_t* comm)
264
264
* situation as the cant_match is only checked when a new fragment is received from
265
265
* the network.
266
266
*/
267
- OPAL_LIST_FOREACH (frag , & pml_proc -> frags_cant_match , mca_pml_ob1_recv_frag_t ) {
268
- hdr = & frag -> hdr .hdr_match ;
269
- /* If the message has the next expected seq from that proc... */
270
- if (hdr -> hdr_seq != pml_proc -> expected_sequence )
271
- continue ;
272
-
273
- opal_list_remove_item (& pml_proc -> frags_cant_match , (opal_list_item_t * )frag );
274
- goto add_fragment_to_unexpected ;
275
- }
267
+ if ( NULL != pml_proc -> frags_cant_match ) {
268
+ frag = check_cantmatch_for_match (pml_proc );
269
+ if ( NULL != frag ) {
270
+ hdr = & frag -> hdr .hdr_match ;
271
+ goto add_fragment_to_unexpected ;
272
+ }
273
+ }
276
274
} else {
277
- opal_list_append ( & pml_proc -> frags_cant_match , (opal_list_item_t * )frag );
275
+ append_frag_to_ordered_list (& pml_proc -> frags_cant_match , frag ,
276
+ pml_proc -> expected_sequence );
278
277
}
279
278
}
280
279
return OMPI_SUCCESS ;
@@ -561,6 +560,23 @@ static void mca_pml_ob1_dump_frag_list(opal_list_t* queue, bool is_req)
561
560
}
562
561
}
563
562
563
+ void mca_pml_ob1_dump_cant_match (mca_pml_ob1_recv_frag_t * queue )
564
+ {
565
+ mca_pml_ob1_recv_frag_t * item = queue ;
566
+
567
+ do {
568
+ mca_pml_ob1_dump_hdr ( & item -> hdr );
569
+ if ( NULL != item -> range ) {
570
+ mca_pml_ob1_recv_frag_t * frag = item -> range ;
571
+ do {
572
+ mca_pml_ob1_dump_hdr ( & frag -> hdr );
573
+ frag = (mca_pml_ob1_recv_frag_t * )frag -> super .super .opal_list_next ;
574
+ } while ( frag != item -> range );
575
+ }
576
+ item = (mca_pml_ob1_recv_frag_t * )item -> super .super .opal_list_next ;
577
+ } while ( item != queue );
578
+ }
579
+
564
580
int mca_pml_ob1_dump (struct ompi_communicator_t * comm , int verbose )
565
581
{
566
582
struct mca_pml_comm_t * pml_comm = comm -> c_pml_comm ;
@@ -596,9 +612,9 @@ int mca_pml_ob1_dump(struct ompi_communicator_t* comm, int verbose)
596
612
opal_output (0 , "expected specific receives\n" );
597
613
mca_pml_ob1_dump_frag_list (& proc -> specific_receives , true);
598
614
}
599
- if ( opal_list_get_size ( & proc -> frags_cant_match ) ) {
615
+ if ( NULL != proc -> frags_cant_match ) {
600
616
opal_output (0 , "out of sequence\n" );
601
- mca_pml_ob1_dump_frag_list ( & proc -> frags_cant_match , false );
617
+ mca_pml_ob1_dump_cant_match ( proc -> frags_cant_match );
602
618
}
603
619
if ( opal_list_get_size (& proc -> unexpected_frags ) ) {
604
620
opal_output (0 , "unexpected frag\n" );
0 commit comments