@@ -602,7 +602,7 @@ ompi_coll_base_reduce_intra_basic_linear(const void *sbuf, void *rbuf, int count
602602 ptrdiff_t extent , dsize , gap ;
603603 char * free_buffer = NULL ;
604604 char * pml_buffer = NULL ;
605- char * inplace_temp = NULL ;
605+ char * inplace_temp_free = NULL ;
606606 char * inbuf ;
607607
608608 /* Initialize */
@@ -624,18 +624,18 @@ ompi_coll_base_reduce_intra_basic_linear(const void *sbuf, void *rbuf, int count
624624
625625 if (MPI_IN_PLACE == sbuf ) {
626626 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 ) {
629629 return OMPI_ERR_OUT_OF_RESOURCE ;
630630 }
631- rbuf = inplace_temp - gap ;
631+ rbuf = inplace_temp_free - gap ;
632632 }
633633
634634 if (size > 1 ) {
635635 free_buffer = (char * )malloc (dsize );
636636 if (NULL == free_buffer ) {
637- if (NULL != inplace_temp ) {
638- free (inplace_temp );
637+ if (NULL != inplace_temp_free ) {
638+ free (inplace_temp_free );
639639 }
640640 return OMPI_ERR_OUT_OF_RESOURCE ;
641641 }
@@ -682,9 +682,9 @@ ompi_coll_base_reduce_intra_basic_linear(const void *sbuf, void *rbuf, int count
682682 ompi_op_reduce (op , inbuf , rbuf , count , dtype );
683683 }
684684
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 );
688688 }
689689 if (NULL != free_buffer ) {
690690 free (free_buffer );
0 commit comments