@@ -143,7 +143,7 @@ ompi_coll_base_bcast_intra_generic( void* buffer,
143143
144144 /* wait for and forward the previous segment to children */
145145 err = ompi_request_wait ( & recv_reqs [req_index ^ 0x1 ],
146- MPI_STATUSES_IGNORE );
146+ MPI_STATUS_IGNORE );
147147 if (err != MPI_SUCCESS ) { line = __LINE__ ; goto error_hndl ; }
148148
149149 for ( i = 0 ; i < tree -> tree_nextsize ; i ++ ) {
@@ -175,7 +175,7 @@ ompi_coll_base_bcast_intra_generic( void* buffer,
175175 }
176176
177177 /* Process the last segment */
178- err = ompi_request_wait ( & recv_reqs [req_index ], MPI_STATUSES_IGNORE );
178+ err = ompi_request_wait ( & recv_reqs [req_index ], MPI_STATUS_IGNORE );
179179 if (err != MPI_SUCCESS ) { line = __LINE__ ; goto error_hndl ; }
180180 sendcount = original_count - (ptrdiff_t )(num_segments - 1 ) * count_by_segment ;
181181 for ( i = 0 ; i < tree -> tree_nextsize ; i ++ ) {
@@ -240,8 +240,11 @@ ompi_coll_base_bcast_intra_generic( void* buffer,
240240 error_hndl :
241241 OPAL_OUTPUT ( (ompi_coll_base_framework .framework_output ,"%s:%4d\tError occurred %d, rank %2d" ,
242242 __FILE__ , line , err , rank ) );
243- if ( (MPI_SUCCESS != err ) && (NULL != send_reqs ) ) {
244- ompi_coll_base_free_reqs ( send_reqs , tree -> tree_nextsize );
243+ if ( MPI_SUCCESS != err ) {
244+ ompi_coll_base_free_reqs ( recv_reqs , 2 );
245+ if ( NULL != send_reqs ) {
246+ ompi_coll_base_free_reqs ( send_reqs , tree -> tree_nextsize );
247+ }
245248 }
246249
247250 return err ;
@@ -378,7 +381,6 @@ ompi_coll_base_bcast_intra_split_bintree ( void* buffer,
378381 ptrdiff_t type_extent , lb ;
379382 ompi_request_t * base_req , * new_req ;
380383 ompi_coll_tree_t * tree ;
381- mca_coll_base_comm_t * data = module -> base_data ;
382384
383385 size = ompi_comm_size (comm );
384386 rank = ompi_comm_rank (comm );
@@ -391,7 +393,7 @@ ompi_coll_base_bcast_intra_split_bintree ( void* buffer,
391393
392394 /* setup the binary tree topology. */
393395 COLL_BASE_UPDATE_BINTREE ( comm , module , root );
394- tree = data -> cached_bintree ;
396+ tree = module -> base_data -> cached_bintree ;
395397
396398 err = ompi_datatype_type_size ( datatype , & type_size );
397399
@@ -501,8 +503,8 @@ ompi_coll_base_bcast_intra_split_bintree ( void* buffer,
501503 comm , & new_req ));
502504 if (err != MPI_SUCCESS ) { line = __LINE__ ; goto error_hndl ; }
503505
504- /* wait for and forward current segment */
505- err = ompi_request_wait_all ( 1 , & base_req , MPI_STATUSES_IGNORE );
506+ /* wait for and forward the previous segment */
507+ err = ompi_request_wait ( & base_req , MPI_STATUS_IGNORE );
506508 for ( i = 0 ; i < tree -> tree_nextsize ; i ++ ) { /* send data to children (segcount[lr]) */
507509 err = MCA_PML_CALL (send ( tmpbuf [lr ], segcount [lr ], datatype ,
508510 tree -> tree_next [i ], MCA_COLL_BASE_TAG_BCAST ,
@@ -517,7 +519,7 @@ ompi_coll_base_bcast_intra_split_bintree ( void* buffer,
517519 } /* end of for segindex */
518520
519521 /* wait for the last segment and forward current segment */
520- err = ompi_request_wait_all ( 1 , & base_req , MPI_STATUSES_IGNORE );
522+ err = ompi_request_wait ( & base_req , MPI_STATUS_IGNORE );
521523 for ( i = 0 ; i < tree -> tree_nextsize ; i ++ ) { /* send data to children */
522524 err = MCA_PML_CALL (send (tmpbuf [lr ], sendcount [lr ], datatype ,
523525 tree -> tree_next [i ], MCA_COLL_BASE_TAG_BCAST ,
@@ -633,10 +635,8 @@ ompi_coll_base_bcast_intra_basic_linear(void *buff, int count,
633635 mca_coll_base_module_t * module )
634636{
635637 int i , size , rank , err ;
636- mca_coll_base_comm_t * data = module -> base_data ;
637638 ompi_request_t * * preq , * * reqs ;
638639
639-
640640 size = ompi_comm_size (comm );
641641 rank = ompi_comm_rank (comm );
642642
@@ -651,24 +651,20 @@ ompi_coll_base_bcast_intra_basic_linear(void *buff, int count,
651651 }
652652
653653 /* Root sends data to all others. */
654- preq = reqs = coll_base_comm_get_reqs (data , size - 1 );
654+ preq = reqs = coll_base_comm_get_reqs (module -> base_data , size - 1 );
655655 for (i = 0 ; i < size ; ++ i ) {
656656 if (i == rank ) {
657657 continue ;
658658 }
659659
660- err = MCA_PML_CALL (isend_init (buff , count , datatype , i ,
661- MCA_COLL_BASE_TAG_BCAST ,
662- MCA_PML_BASE_SEND_STANDARD ,
663- comm , preq ++ ));
660+ err = MCA_PML_CALL (isend (buff , count , datatype , i ,
661+ MCA_COLL_BASE_TAG_BCAST ,
662+ MCA_PML_BASE_SEND_STANDARD ,
663+ comm , preq ++ ));
664664 if (MPI_SUCCESS != err ) { goto err_hndl ; }
665665 }
666666 -- i ;
667667
668- /* Start your engines. This will never return an error. */
669-
670- MCA_PML_CALL (start (i , reqs ));
671-
672668 /* Wait for them all. If there's an error, note that we don't
673669 * care what the error was -- just that there *was* an error. The
674670 * PML will finish all requests, even if one or more of them fail.
0 commit comments