@@ -602,7 +602,7 @@ ompi_coll_base_reduce_intra_basic_linear(const void *sbuf, void *rbuf, int count
602
602
ptrdiff_t extent , dsize , gap ;
603
603
char * free_buffer = NULL ;
604
604
char * pml_buffer = NULL ;
605
- char * inplace_temp = NULL ;
605
+ char * inplace_temp_free = NULL ;
606
606
char * inbuf ;
607
607
608
608
/* Initialize */
@@ -624,18 +624,18 @@ ompi_coll_base_reduce_intra_basic_linear(const void *sbuf, void *rbuf, int count
624
624
625
625
if (MPI_IN_PLACE == sbuf ) {
626
626
sbuf = rbuf ;
627
- inplace_temp = (char * )malloc (dsize );
628
- if (NULL == inplace_temp ) {
627
+ inplace_temp_free = (char * )malloc (dsize );
628
+ if (NULL == inplace_temp_free ) {
629
629
return OMPI_ERR_OUT_OF_RESOURCE ;
630
630
}
631
- rbuf = inplace_temp - gap ;
631
+ rbuf = inplace_temp_free - gap ;
632
632
}
633
633
634
634
if (size > 1 ) {
635
635
free_buffer = (char * )malloc (dsize );
636
636
if (NULL == free_buffer ) {
637
- if (NULL != inplace_temp ) {
638
- free (inplace_temp );
637
+ if (NULL != inplace_temp_free ) {
638
+ free (inplace_temp_free );
639
639
}
640
640
return OMPI_ERR_OUT_OF_RESOURCE ;
641
641
}
@@ -682,9 +682,9 @@ ompi_coll_base_reduce_intra_basic_linear(const void *sbuf, void *rbuf, int count
682
682
ompi_op_reduce (op , inbuf , rbuf , count , dtype );
683
683
}
684
684
685
- if (NULL != inplace_temp ) {
686
- err = ompi_datatype_copy_content_same_ddt (dtype , count , (char * )sbuf , inplace_temp );
687
- free (inplace_temp );
685
+ if (NULL != inplace_temp_free ) {
686
+ err = ompi_datatype_copy_content_same_ddt (dtype , count , (char * )sbuf , rbuf );
687
+ free (inplace_temp_free );
688
688
}
689
689
if (NULL != free_buffer ) {
690
690
free (free_buffer );
0 commit comments